Merge branch 'master' into epg-rewrite

This commit is contained in:
Adam Sutton 2012-06-08 22:30:31 +01:00
commit 19ed956693
11 changed files with 70 additions and 96 deletions

View file

@ -8,24 +8,21 @@
set -eu
BUILD_API_VERSION=2
BUILD_API_VERSION=3
EXTRA_BUILD_NAME=""
JARGS=""
JOBSARGS=""
TARGET=""
RELEASE="--release"
WORKINGDIR="/var/tmp/showtime-autobuild"
UPLOAD_BUILD_ARTIFACTS=1
while getopts "vht:e:j:w:R" OPTION
OP="build"
while getopts "vht:e:j:w:o:c:" OPTION
do
case $OPTION in
v)
echo $BUILD_API_VERSION
exit 0
;;
R)
UPLOAD_BUILD_ARTIFACTS=0
;;
h)
echo "This script is intended to be used by the autobuild system only"
exit 0
@ -43,10 +40,12 @@ do
w)
WORKINGDIR="$OPTARG"
;;
o)
OP="$OPTARG"
;;
esac
done
if [[ -z $TARGET ]]; then
echo "target (-t) not specified"
exit 1
@ -59,11 +58,11 @@ fi
# $4 = filename
#
artifact() {
if [ $UPLOAD_BUILD_ARTIFACTS -eq 1 ]; then
echo "doozer-artifact:$PWD/$1:$2:$3:$4"
else
echo "Ignoring: $1:$2:$3:$4"
fi
echo "doozer-artifact:$PWD/$1:$2:$3:$4"
}
versioned_artifact() {
echo "doozer-versioned-artifact:$PWD/$1:$2:$3:$4"
}
if [ -f Autobuild/${TARGET}.sh ]; then
@ -72,3 +71,4 @@ else
echo "target $TARGET not supported"
exit 1
fi

View file

@ -1,26 +1,57 @@
BUILD_DEPS=`awk 'BEGIN {cnt = 1;} /^Build-Depends:/ {split($0, line, ":");split(line[2], deps, ",");for (i in deps) {d = deps[i];sub(/^ */, "", d);sub(/ *$/, "", d);split(d, tokens, " ");packages[cnt] = tokens[1];cnt++;}} END {out = ""; for(i = 1; i <= cnt; i++) {out = out packages[i] " ";} print out; }' debian/control`
CHANGELOG=debian/changelog
NOW=`date -R`
VER=`git describe | sed "s/\([0-9]*\)\.\([0-9]*\)-\([0-9]*\)-.*/\1.\2.\3/"`
echo >${CHANGELOG} "tvheadend (${VER}) unstable; urgency=low"
echo >>${CHANGELOG}
echo >>${CHANGELOG} " * The full changelog can be found at "
echo >>${CHANGELOG} " http://www.lonelycoder.com/tvheadend/download"
echo >>${CHANGELOG}
echo >>${CHANGELOG} " -- Andreas Öman <andreas@lonelycoder.com> ${NOW}"
cat ${CHANGELOG}
export JOBSARGS
export JARGS
dpkg-buildpackage -b -us -uc
for a in ../tvheadend*${VER}*.deb; do
artifact $a deb application/x-deb `basename $a`
rm -f $a
done
build()
{
echo >${CHANGELOG} "tvheadend (${VER}) unstable; urgency=low"
echo >>${CHANGELOG}
echo >>${CHANGELOG} " * The full changelog can be found at "
echo >>${CHANGELOG} " http://www.lonelycoder.com/tvheadend/download"
echo >>${CHANGELOG}
echo >>${CHANGELOG} " -- Andreas Öman <andreas@lonelycoder.com> ${NOW}"
export JOBSARGS
export JARGS
export AUTOBUILD_CONFIGURE_EXTRA
dpkg-buildpackage -b -us -uc
for a in ../tvheadend*${VER}*.changes; do
artifact $a changes text/plain `basename $a`
rm -f $a
done
for a in ../tvheadend*${VER}*.deb; do
versioned_artifact "$a" deb application/x-deb `basename $a`
done
rm -f ${CHANGELOG}
dh_clean
for a in ../tvheadend*${VER}*.changes; do
versioned_artifact "$a" changes text/plain `basename $a`
done
}
clean()
{
for a in ../tvheadend*${VER}*.deb; do
rm -f "$a"
done
for a in ../tvheadend*${VER}*.changes; do
rm -f "$a"
done
rm -f ${CHANGELOG}
dh_clean
}
deps()
{
if [[ $EUID -ne 0 ]]; then
echo "Build dependencies must be installed as root"
exit 1
fi
apt-get -y install ${BUILD_DEPS}
}
buildenv()
{
echo $BUILD_DEPS | shasum | awk '{print $1}'
}
eval $OP

View file

@ -0,0 +1,2 @@
AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA} --arch=x86_64"
source Autobuild/debian.sh

View file

@ -0,0 +1,2 @@
AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA} --arch=i686"
source Autobuild/debian.sh

View file

@ -1 +0,0 @@
source Autobuild/debian.sh

View file

@ -1 +0,0 @@
source Autobuild/debian.sh

View file

@ -314,9 +314,6 @@ void dvb_transport_notify_by_adapter(th_dvb_adapter_t *tda);
htsmsg_t *dvb_transport_build_msg(struct service *t);
int dvb_transport_get_signal_status(struct service *t,
signal_status_t *status);
/**
* DVB Frontend
*/

View file

@ -476,20 +476,3 @@ dvb_transport_notify(service_t *t)
htsmsg_add_str(m, "adapterId", tdmi->tdmi_adapter->tda_identifier);
notify_by_msg("dvbService", m);
}
/**
* Get the signal status from a DVB transport
*/
int
dvb_transport_get_signal_status(service_t *t, signal_status_t *status)
{
th_dvb_mux_instance_t *tdmi = t->s_dvb_mux_instance;
status->status_text = dvb_mux_status(tdmi);
status->snr = tdmi->tdmi_snr;
status->signal = tdmi->tdmi_signal;
status->ber = tdmi->tdmi_ber;
status->unc = tdmi->tdmi_uncorrected_blocks;
return 0;
}

View file

@ -217,6 +217,8 @@ htsp_flush_queue(htsp_connection_t *htsp, htsp_msg_q_t *hmq)
{
htsp_msg_t *hm;
pthread_mutex_lock(&htsp->htsp_out_mutex);
if(hmq->hmq_length)
TAILQ_REMOVE(&htsp->htsp_active_output_queues, hmq, hmq_link);
@ -224,6 +226,7 @@ htsp_flush_queue(htsp_connection_t *htsp, htsp_msg_q_t *hmq)
TAILQ_REMOVE(&hmq->hmq_q, hm, hm_link);
htsp_msg_destroy(hm);
}
pthread_mutex_unlock(&htsp->htsp_out_mutex);
}
@ -1583,7 +1586,6 @@ htsp_stream_deliver(htsp_subscription_t *hs, th_pkt_t *pkt)
htsp_send(htsp, m, pkt->pkt_payload, &hs->hs_q, pktbuf_len(pkt->pkt_payload));
if(hs->hs_last_report != dispatch_clock) {
signal_status_t status;
/* Send a queue and signal status report every second */
@ -1617,26 +1619,6 @@ htsp_stream_deliver(htsp_subscription_t *hs, th_pkt_t *pkt)
/* We use a special queue for queue status message so they're not
blocked by anything else */
htsp_send_message(hs->hs_htsp, m, &hs->hs_htsp->htsp_hmq_qstatus);
if(!service_get_signal_status(hs->hs_s->ths_service, &status)) {
m = htsmsg_create_map();
htsmsg_add_str(m, "method", "signalStatus");
htsmsg_add_u32(m, "subscriptionId", hs->hs_sid);
htsmsg_add_str(m, "feStatus", status.status_text);
if(status.snr != -2)
htsmsg_add_u32(m, "feSNR", status.snr);
if(status.signal != -2)
htsmsg_add_u32(m, "feSignal", status.signal);
if(status.ber != -2)
htsmsg_add_u32(m, "feBER", status.ber);
if(status.unc != -2)
htsmsg_add_u32(m, "feUNC", status.unc);
htsp_send_message(hs->hs_htsp, m, &hs->hs_htsp->htsp_hmq_qstatus);
}
}
pkt_ref_dec(pkt);
}

View file

@ -1092,22 +1092,3 @@ service_get_encryption(service_t *t)
}
return 0;
}
/**
* Get the signal status from a service
*/
int
service_get_signal_status(service_t *t, signal_status_t *status)
{
// get signal status from the service
switch(t->s_type) {
#if ENABLE_LINUXDVB
case SERVICE_TYPE_DVB:
return dvb_transport_get_signal_status(t, status);
#endif
default:
return -1;
}
}

View file

@ -570,8 +570,6 @@ int tss2errcode(int tss);
uint16_t service_get_encryption(service_t *t);
int service_get_signal_status(service_t *t, signal_status_t *status);
void service_set_dvb_default_charset(service_t *t, const char *dvb_default_charset);
void service_set_dvb_eit_enable(service_t *t, int dvb_eit_enable);