diff options
author | James Meyer <james.meyer@operamail.com> | 2009-04-10 23:00:34 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-04-10 23:00:34 (GMT) |
commit | df49f7938e10664ead4e809a8c15408c8dea9ac7 (patch) | |
tree | 559d922096f8b1ccd8e58d61a694d869c386742f /abs/extra-testing | |
parent | 34fd09ecfdc4c0b1f2742325646517064920c515 (diff) | |
download | linhes_pkgbuild-df49f7938e10664ead4e809a8c15408c8dea9ac7.zip linhes_pkgbuild-df49f7938e10664ead4e809a8c15408c8dea9ac7.tar.gz linhes_pkgbuild-df49f7938e10664ead4e809a8c15408c8dea9ac7.tar.bz2 |
mythtv: apply patch for lirc delays
http://svn.mythtv.org/trac/ticket/6406
ref FS#318
Diffstat (limited to 'abs/extra-testing')
-rw-r--r-- | abs/extra-testing/community/mythtv-vdpau/PKGBUILD | 7 | ||||
-rw-r--r-- | abs/extra-testing/community/mythtv-vdpau/mpegpspatch | 66 |
2 files changed, 71 insertions, 2 deletions
diff --git a/abs/extra-testing/community/mythtv-vdpau/PKGBUILD b/abs/extra-testing/community/mythtv-vdpau/PKGBUILD index e89a93b..59ef863 100644 --- a/abs/extra-testing/community/mythtv-vdpau/PKGBUILD +++ b/abs/extra-testing/community/mythtv-vdpau/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythtv-vdpau pkgver=0.21 -pkgrel=9 +pkgrel=12 pkgdesc="A Homebrew PVR project" arch=('i686' 'x86_64') depends=('bash' 'mysql-clients>=5.0' 'qt3' 'lame' 'lirc-utils' 'ffmpeg' \ @@ -9,7 +9,7 @@ backup=(etc/mythtv/mythbackend.conf etc/mythtv/mysql.txt usr/share/mythtv/is.xml source=(ftp://ftp.knoppmyth.net/R6/sources/mythtv-${pkgver}-fixes.tar.bz2 \ mythbackend myththemedmenu.cpp.patch myththemedmenu.h.patch \ smolt_jump.patch pretty \ - http://www.avenard.org/files/media/vdpau/mythtv-fixes-glvdpau20300.patch.gz) + http://www.avenard.org/files/media/vdpau/mythtv-fixes-glvdpau20300.patch.gz mpegpspatch) #md5sums=('e316ed18d7ac837cf8c4af54b1478793' '7ef6de58240e7aad389a0b13d91b1cf6'\ # 'a0ecb7f476cb71c0c1ac90d349fc7695') @@ -33,6 +33,9 @@ build() { patch -p0 < ../smolt_jump.patch # patch -p0 < ../2.6.28_dvb_api_version.diff patch -p1 < ../mythtv-fixes-glvdpau20300.patch + cd libs/libavformat + patch -p0 < $startdir/src/mpegpspatch + cd - . /etc/profile.d/qt3.sh diff --git a/abs/extra-testing/community/mythtv-vdpau/mpegpspatch b/abs/extra-testing/community/mythtv-vdpau/mpegpspatch new file mode 100644 index 0000000..eed08eb --- /dev/null +++ b/abs/extra-testing/community/mythtv-vdpau/mpegpspatch @@ -0,0 +1,66 @@ +--- orig_mpeg.c 2009-03-23 11:26:22.000000000 -0700 ++++ mpeg.c 2009-03-23 11:28:09.000000000 -0700 +@@ -66,35 +66,40 @@ + + static int mpegps_probe(AVProbeData *p) + { ++ uint32_t code= -1; ++ int sys=0, pspack=0, priv1=0, vid=0, audio=0, invalid=0; + int i; +- int size= FFMIN(2048, p->buf_size); +- uint32_t code=0xFF; ++ int score=0; + +- /* we search the first start code. If it is a packet start code, +- then we decide it is mpeg ps. We do not send highest value to +- give a chance to mpegts */ +- /* NOTE: the search range was restricted to avoid too many false +- detections */ +- +- for (i = 0; i < size; i++) { +- code = (code << 8) | p->buf[i]; ++ for(i=0; i<p->buf_size; i++){ ++ code = (code<<8) + p->buf[i]; + if ((code & 0xffffff00) == 0x100) { +- if (code == PACK_START_CODE || +- code == SYSTEM_HEADER_START_CODE || +- (code >= 0x1e0 && code <= 0x1ef) || +- (code >= 0x1c0 && code <= 0x1df) || +- code == PRIVATE_STREAM_2 || +- code == PROGRAM_STREAM_MAP || +- code == PRIVATE_STREAM_1 || +- code == PADDING_STREAM || +- code >= 0x100 && code <= 0x1b0) +- return AVPROBE_SCORE_MAX - 2; +- else +- return 0; ++ int pes= check_pes(p->buf+i, p->buf+p->buf_size); ++ ++ if(code == SYSTEM_HEADER_START_CODE) sys++; ++ else if(code == PRIVATE_STREAM_1) priv1++; ++ else if(code == PACK_START_CODE) pspack++; ++ else if((code & 0xf0) == VIDEO_ID && pes) vid++; ++ else if((code & 0xe0) == AUDIO_ID && pes) audio++; ++ ++ else if((code & 0xf0) == VIDEO_ID && !pes) invalid++; ++ else if((code & 0xe0) == AUDIO_ID && !pes) invalid++; + } + } + +- return 0; ++ if(vid+audio > invalid) /* invalid VDR files nd short PES streams */ ++ score= AVPROBE_SCORE_MAX/4; ++ ++//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1, pspack,vid, audio, p->buf_size); ++ if(sys>invalid && sys*9 <= pspack*10) ++ return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg ++ if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10) ++ return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg ++ if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */ ++ return AVPROBE_SCORE_MAX/2+2; ++ ++ //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 ++ return score; + } + + typedef struct MpegDemuxContext { |