diff options
author | Nathan Harris <nharris@eoimaging.com> | 2009-06-16 18:56:28 (GMT) |
---|---|---|
committer | Nathan Harris <nharris@eoimaging.com> | 2009-06-16 18:56:28 (GMT) |
commit | a3cc7a8ca28ca1b58077963d46f6b18d8bb92fe0 (patch) | |
tree | 2b4b9767fbabf9f92c33fec823d290d8bee9b232 | |
parent | 7ea54e94edf113f577fecc27793fe03a8a5080da (diff) | |
download | linhes_pkgbuild-a3cc7a8ca28ca1b58077963d46f6b18d8bb92fe0.zip linhes_pkgbuild-a3cc7a8ca28ca1b58077963d46f6b18d8bb92fe0.tar.gz linhes_pkgbuild-a3cc7a8ca28ca1b58077963d46f6b18d8bb92fe0.tar.bz2 |
mythtv-svn: updated to svn 20713 plus new HD-PVR patches
19 files changed, 830 insertions, 35 deletions
diff --git a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD index 5f12179..350cf2f 100644 --- a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD @@ -1,5 +1,5 @@ pkgname=morethemes-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Additional themes for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=themes build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr || return 1 diff --git a/abs/core-testing/mythtv/trunk/mp_all.sh b/abs/core-testing/mythtv/trunk/mp_all.sh index 47f70ba..45ea44e 100755 --- a/abs/core-testing/mythtv/trunk/mp_all.sh +++ b/abs/core-testing/mythtv/trunk/mp_all.sh @@ -1,5 +1,5 @@ #!/bin/sh -_svnver=20684 +_svnver=20713 # NOTE: Make sure to build and install mythtv first BEFORE building anything else buildlist=('mythtv' 'mytharchive' 'mythbrowser' 'mythflix' 'mythgallery' 'mythgame' 'mythmovies' 'mythmusic' 'mythnews' 'mythvideo' 'mythweather' 'mythzoneminder' 'mythweb' 'myththemes' 'morethemes') @@ -9,9 +9,8 @@ for i in `echo ${buildlist[@]:0}` do echo "---------- building $i ----------" cd ./$i - mp -f --holdver || exit 1 - pacman -U /data/pkg_repo/i686/core-testing/$i-svn-$_svnver* || exit 1 - rm -rf pkg src + mp -f -i --holdver || exit 1 + rm -rf pkg rm -f *~ cd .. done diff --git a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD index 917d741..14230b1 100644 --- a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mytharchive-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows." url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mytharchive || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD index 466263b..3bd4d74 100644 --- a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythbrowser-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Mini web browser for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythbrowser || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD index 7f12ef5..b3fa81c 100644 --- a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythflix-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Netflix access plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythflix || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD index 77100ed..521a1e2 100644 --- a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythgallery-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Image gallery plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythgallery || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD index 6bbd780..d6e8922 100644 --- a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythgame-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Emulation plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythgame || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD index 6b6fc7c..8b9aeb1 100644 --- a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythmovies-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Displays information about movies playing in the area." url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythmovies || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD index 4c255df..8754ba0 100644 --- a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythmusic-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Music playing plugin for MythTV" url="http://www.mythtv.org" @@ -21,7 +21,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -37,6 +37,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythmusic --enable-libvisual --enable-fftw --enable-sdl \ diff --git a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD index 0bb3b5a..8bf0298 100644 --- a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythnews-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="News checking plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythnews || return 1 diff --git a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD index dd58a50..b031fde 100755 --- a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD @@ -1,5 +1,5 @@ pkgname=myththemes-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Themes for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=myththemes build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythtv/H264Parser-fixes-v1.1.patch b/abs/core-testing/mythtv/trunk/mythtv/H264Parser-fixes-v1.1.patch new file mode 100644 index 0000000..f8e2100 --- /dev/null +++ b/abs/core-testing/mythtv/trunk/mythtv/H264Parser-fixes-v1.1.patch @@ -0,0 +1,368 @@ +Index: libs/libmythtv/mpeg/H264Parser.cpp +=================================================================== +--- libs/libmythtv/mpeg/H264Parser.cpp.orig ++++ libs/libmythtv/mpeg/H264Parser.cpp +@@ -3,7 +3,9 @@ + + extern "C" { + // from libavcodec +- extern const uint8_t *ff_find_start_code(const uint8_t * p, const uint8_t *end, uint32_t * state); ++ extern const uint8_t *ff_find_start_code(const uint8_t * p, ++ const uint8_t *end, ++ uint32_t * state); + #include "avcodec.h" + } + +@@ -88,19 +90,18 @@ static const float eps = 1E-5; + H264Parser::H264Parser(void) + { + Reset(); ++ I_is_keyframe = false; + } + + void H264Parser::Reset(void) + { + state_changed = false; +- seen_sps = seen_IDR = false; ++ seen_sps = false; ++ is_keyframe = false; + + sync_accumulator = 0xffffffff; +- find_AU = false; + AU_pending = false; + +- NAL_type = UNKNOWN; +- + frame_num = prev_frame_num = -1; + slice_type = SLICE_UNDEF; + prev_pic_parameter_set_id = pic_parameter_set_id = -1; +@@ -112,7 +113,7 @@ void H264Parser::Reset(void) + prev_delta_pic_order_cnt_bottom = delta_pic_order_cnt_bottom = 0; + prev_delta_pic_order_cnt[0] = delta_pic_order_cnt[0] = 0; + prev_delta_pic_order_cnt[1] = delta_pic_order_cnt[1] = 0; +- prev_nal_unit_type = nal_unit_type = 0; ++ prev_nal_unit_type = nal_unit_type = UNKNOWN; + prev_idr_pic_id = idr_pic_id = 0; + + log2_max_frame_num = log2_max_pic_order_cnt_lsb = 0; +@@ -136,8 +137,6 @@ void H264Parser::Reset(void) + + AU_offset = frame_start_offset = keyframe_start_offset = 0; + on_frame = on_key_frame = false; +- +- wait_for_IDR = false; + } + + +@@ -214,13 +213,7 @@ bool H264Parser::new_AU(void) + { + // Need previous slice information for comparison + +- if (NAL_type == AU_DELIMITER || +- NAL_type == SPS || +- NAL_type == PPS || +- NAL_type == SEI || +- (NAL_type > SPS_EXT && NAL_type < AUXILIARY_SLICE)) +- result = true; +- else if (NAL_type != SLICE_IDR && frame_num != prev_frame_num) ++ if (nal_unit_type != SLICE_IDR && frame_num != prev_frame_num) + result = true; + else if (prev_pic_parameter_set_id != -1 && + pic_parameter_set_id != prev_pic_parameter_set_id) +@@ -230,9 +223,6 @@ bool H264Parser::new_AU(void) + else if ((bottom_field_flag != -1 && prev_bottom_field_flag != -1) && + bottom_field_flag != prev_bottom_field_flag) + result = true; +- else if ((nal_ref_idc == 0 || prev_nal_ref_idc == 0) && +- nal_ref_idc != prev_nal_ref_idc) +- result = true; + else if ((pic_order_cnt_type == 0 && prev_pic_order_cnt_type == 0) && + (pic_order_cnt_lsb != prev_pic_order_cnt_lsb || + delta_pic_order_cnt_bottom != +@@ -256,7 +246,6 @@ bool H264Parser::new_AU(void) + prev_pic_parameter_set_id = pic_parameter_set_id; + prev_field_pic_flag = field_pic_flag; + prev_bottom_field_flag = bottom_field_flag; +- prev_nal_ref_idc = nal_ref_idc; + prev_pic_order_cnt_lsb = pic_order_cnt_lsb; + prev_delta_pic_order_cnt_bottom = delta_pic_order_cnt_bottom; + prev_delta_pic_order_cnt[0] = delta_pic_order_cnt[0]; +@@ -273,7 +262,7 @@ uint32_t H264Parser::addBytes(const uint + { + const uint8_t *byteP = bytes; + const uint8_t *endP = bytes + byte_count; +- ++ const uint8_t *nalP; + uint8_t first_byte; + + state_changed = false; +@@ -305,10 +294,11 @@ uint32_t H264Parser::addBytes(const uint + 11 End of stream end_of_stream_rbsp( ) + */ + first_byte = *(byteP - 1); +- NAL_type = first_byte & 0x1f; ++ nal_unit_type = first_byte & 0x1f; + nal_ref_idc = (first_byte >> 5) & 0x3; + +- if (NALisSlice(NAL_type) || NAL_type == SPS || NAL_type == PPS) ++ if (nal_unit_type == SPS || nal_unit_type == PPS || ++ nal_unit_type == SEI || NALisSlice(nal_unit_type)) + { + /* + bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE +@@ -318,27 +308,51 @@ uint32_t H264Parser::addBytes(const uint + { + init_get_bits(&gb, byteP, 8 * (endP - byteP)); + +- if (NAL_type == SPS) ++ if (nal_unit_type == SEI) ++ { ++ nalP = ff_find_start_code(byteP+1, endP, ++ &sync_accumulator) - 8; ++ decode_SEI(&gb, (nalP - byteP) * 8); ++ set_AU_pending(stream_offset); ++ } ++ else if (nal_unit_type == SPS) ++ { + decode_SPS(&gb); +- else if (NAL_type == PPS) ++ set_AU_pending(stream_offset); ++ } ++ else if (nal_unit_type == PPS) ++ { + decode_PPS(&gb); ++ set_AU_pending(stream_offset); ++ } + else +- find_AU = decode_Header(&gb); ++ { ++ decode_Header(&gb); ++ if (new_AU()) ++ set_AU_pending(stream_offset); ++ } + + byteP += (get_bits_count(&gb) / 8); + } + } +- +- if (find_AU && new_AU()) ++ else if (!AU_pending) + { +- /* After finding a new AU, don't look for another one +- until we decode a SLICE */ +- find_AU = false; +- AU_pending = true; +- AU_offset = stream_offset; ++ if (nal_unit_type == AU_DELIMITER || ++ (nal_unit_type > SPS_EXT && ++ nal_unit_type < AUXILIARY_SLICE)) ++ { ++ AU_pending = true; ++ AU_offset = stream_offset; ++ } ++ else if ((nal_ref_idc == 0 || prev_nal_ref_idc == 0) && ++ nal_ref_idc != prev_nal_ref_idc) ++ { ++ AU_pending = true; ++ AU_offset = stream_offset; ++ } + } +- +- if (AU_pending && NALisSlice(NAL_type)) ++ ++ if (AU_pending && NALisSlice(nal_unit_type)) + { + /* Once we know the slice type of a new AU, we can + * determine if it is a keyframe or just a frame */ +@@ -349,10 +363,11 @@ uint32_t H264Parser::addBytes(const uint + on_frame = true; + frame_start_offset = AU_offset; + +- if (isKeySlice(slice_type) && (!wait_for_IDR || seen_IDR)) ++ if (is_keyframe) + { + on_key_frame = true; + keyframe_start_offset = AU_offset; ++ is_keyframe = false; + } + else + on_key_frame = false; +@@ -360,6 +375,8 @@ uint32_t H264Parser::addBytes(const uint + else + on_frame = on_key_frame = false; + ++ prev_nal_ref_idc = nal_ref_idc; ++ + return byteP - bytes; + } + } +@@ -440,8 +457,6 @@ bool H264Parser::decode_Header(GetBitCon + */ + + frame_num = get_bits(gb, log2_max_frame_num); +- if (NAL_type == SLICE_IDR || frame_num == 0) +- seen_IDR = true; + + /* + field_pic_flag equal to 1 specifies that the slice is a slice of a +@@ -475,8 +490,14 @@ bool H264Parser::decode_Header(GetBitCon + second such IDR access unit. The value of idr_pic_id shall be in + the range of 0 to 65535, inclusive. + */ ++ + if (nal_unit_type == SLICE_IDR) ++ { ++ is_keyframe = true; + idr_pic_id = get_ue_golomb(gb); ++ } ++ else ++ is_keyframe |= (I_is_keyframe && isKeySlice(slice_type)); + + /* + pic_order_cnt_lsb specifies the picture order count modulo +@@ -806,6 +827,44 @@ void H264Parser::decode_PPS(GetBitContex + #endif + } + ++void H264Parser::decode_SEI(GetBitContext * gb, int bitlen) ++{ ++ int recovery_frame_cnt = -1; ++ bool exact_match_flag = false; ++ bool broken_link_flag = false; ++ int changing_group_slice_idc = -1; ++ ++ while (get_bits_count(gb) < bitlen) ++ { ++ int type = 0, size = 0; ++ ++ do { ++ type += show_bits(gb, 8); ++ } while (get_bits(gb, 8) == 255); ++ ++ do { ++ size += show_bits(gb, 8); ++ } while (get_bits(gb, 8) == 255); ++ ++ switch (type) ++ { ++ case SEI_TYPE_RECOVERY_POINT: ++ recovery_frame_cnt = get_ue_golomb(gb); ++ exact_match_flag = get_bits1(gb); ++ broken_link_flag = get_bits1(gb); ++ changing_group_slice_idc = get_bits(gb, 2); ++ is_keyframe |= (recovery_frame_cnt >= 0); ++ return; ++ ++ default: ++ skip_bits(gb, size * 8); ++ break; ++ } ++ ++ align_get_bits(gb); ++ } ++} ++ + void H264Parser::vui_parameters(GetBitContext * gb) + { + /* +Index: libs/libmythtv/mpeg/H264Parser.h +=================================================================== +--- libs/libmythtv/mpeg/H264Parser.h.orig ++++ libs/libmythtv/mpeg/H264Parser.h +@@ -53,6 +53,12 @@ class H264Parser { + AUXILIARY_SLICE = 19 + }; + ++ enum SEI_type { ++ SEI_TYPE_PIC_TIMING = 1, ++ SEI_TYPE_USER_DATA_UNREGISTERED = 5, ++ SEI_TYPE_RECOVERY_POINT = 6 ++ }; ++ + /* + slice_type values in the range 5..9 specify, in addition to the + coding type of the current slice, that all other slices of the +@@ -90,9 +96,7 @@ class H264Parser { + + bool stateChanged(void) const { return state_changed; } + +- // seenIDR implies that a SPS has also been seen +- bool seenIDR(void) const { return seen_IDR; } +- uint8_t lastNALtype(void) const { return NAL_type; } ++ uint8_t lastNALtype(void) const { return nal_unit_type; } + + frame_type FieldType(void) const + { +@@ -130,29 +134,36 @@ class H264Parser { + nal_type == SLICE_IDR); + } + +- void waitForIDR(bool wait) { wait_for_IDR = wait; } ++ void use_I_forKeyframes(bool val) { I_is_keyframe = val; } + + private: + enum constants {EXTENDED_SAR = 255}; + +- bool is_first_VCL_NAL_unit(void); ++ inline void set_AU_pending(const uint64_t & stream_offset) ++ { ++ if (!AU_pending) ++ { ++ AU_pending = true; ++ AU_offset = stream_offset; ++ } ++ } ++ + bool new_AU(void); + bool decode_Header(GetBitContext *gb); + void decode_SPS(GetBitContext *gb); + void decode_PPS(GetBitContext * gb); ++ void decode_SEI(GetBitContext * gb, int len); + void vui_parameters(GetBitContext * gb); + +- bool find_AU; + bool AU_pending; + bool state_changed; + bool seen_sps; +- bool seen_IDR; ++ bool is_keyframe; ++ bool I_is_keyframe; + + uint32_t sync_accumulator; + GetBitContext gb; + +- uint8_t NAL_type; +- + int prev_frame_num, frame_num; + uint slice_type; + int prev_pic_parameter_set_id, pic_parameter_set_id; +@@ -188,8 +199,6 @@ class H264Parser { + + uint64_t AU_offset, frame_start_offset, keyframe_start_offset; + bool on_frame, on_key_frame; +- +- bool wait_for_IDR; + }; + + #endif /* H264PARSER_H */ +Index: libs/libmythtv/mpegrecorder.cpp +=================================================================== +--- libs/libmythtv/mpegrecorder.cpp.orig ++++ libs/libmythtv/mpegrecorder.cpp +@@ -423,6 +423,7 @@ bool MpegRecorder::OpenV4L2DeviceAsInput + bzero(_stream_id, sizeof(_stream_id)); + bzero(_pid_status, sizeof(_pid_status)); + memset(_continuity_counter, 0xff, sizeof(_continuity_counter)); ++ m_h264_parser.use_I_forKeyframes(true); + } + else + { +@@ -1373,8 +1374,6 @@ void MpegRecorder::ResetForNewFile(void) + bzero(_stream_id, sizeof(_stream_id)); + bzero(_pid_status, sizeof(_pid_status)); + memset(_continuity_counter, 0xff, sizeof(_continuity_counter)); +- +- m_h264_parser.waitForIDR(true); + } + + void MpegRecorder::Reset(void) diff --git a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD index a4cbd8d..73842f5 100755 --- a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythtv-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="A personal video recorder for Linux" url="http://www.mythtv.org" @@ -16,7 +16,8 @@ groups=('pvr') #MAKEFLAGS="-j6" install='mythtv.install' -patchs=('smolt_jump.patch' 'myththemedmenu.h.patch' 'myththemedmenu.cpp.patch') +patchs=('smolt_jump.patch' 'myththemedmenu.h.patch' 'myththemedmenu.cpp.patch' 'H264Parser-fixes-v1.1.patch' \ + 'hdpvr-signalmonitor.patch' 'ringbuffer_reset_v2.diff' ) #patchs=('svn_main_menu_popup.patch' 'smolt_jump.patch') source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` 'mythbackend.lr' 'mythfrontend.lr' 'pretty') arch=('i686' 'x86_64') @@ -27,11 +28,13 @@ _svnmod=mythtv build() { + # get clean copy from SVN repo svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/mythtv + # apply patches echo "--------------------------applying patches----------------------------------------------------" for i in `echo ${patchs[@]:0} ` do @@ -46,6 +49,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up from last build + make distclean + # configure ./configure --prefix=/usr --arch=${ARCH} \ --enable-vdpau --enable-xvmc --enable-xvmc-pro \ diff --git a/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch b/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch new file mode 100644 index 0000000..2465cfe --- /dev/null +++ b/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch @@ -0,0 +1,292 @@ +Index: libs/libmythtv/analogsignalmonitor.cpp +=================================================================== +--- libs/libmythtv/analogsignalmonitor.cpp.orig ++++ libs/libmythtv/analogsignalmonitor.cpp +@@ -4,23 +4,92 @@ + #include <cerrno> + #include <unistd.h> + #include <sys/ioctl.h> ++#include <poll.h> + + #include "videodev_myth.h" + #include "mythcontext.h" + #include "analogsignalmonitor.h" + #include "v4lchannel.h" + +-#define LOC QString("AnalogSM: ").arg(channel->GetDevice()) +-#define LOC_ERR QString("AnalogSM, Error: ").arg(channel->GetDevice()) ++#define LOC QString("AnalogSM: %1 ").arg(channel->GetDevice()) ++#define LOC_ERR QString("AnalogSM, Error: %1 ").arg(channel->GetDevice()) + +-AnalogSignalMonitor::AnalogSignalMonitor( +- int db_cardnum, V4LChannel *_channel, uint64_t _flags) : ++AnalogSignalMonitor::AnalogSignalMonitor(int db_cardnum, V4LChannel *_channel, ++ uint64_t _flags) : + SignalMonitor(db_cardnum, _channel, _flags), +- usingv4l2(false) ++ m_usingv4l2(false), ++ m_stage(0) + { + int videofd = channel->GetFd(); + if (videofd >= 0) +- usingv4l2 = CardUtil::hasV4L2(videofd); ++ { ++ m_usingv4l2 = CardUtil::hasV4L2(videofd); ++ CardUtil::GetV4LInfo(videofd, m_card, m_driver, m_version); ++ VERBOSE(VB_RECORD, LOC + QString("card '%1' driver '%2' version '%3'") ++ .arg(m_card).arg(m_driver).arg(m_version)); ++ } ++} ++ ++bool AnalogSignalMonitor::handleHDPVR(int videofd) ++{ ++ struct v4l2_encoder_cmd command; ++ struct pollfd polls; ++ int idx; ++ ++ if (m_stage == 0) ++ { ++ VERBOSE(VB_RECORD, LOC + "hd-pvr start encoding"); ++ // Tell it to start encoding, then wait for it to actually feed us ++ // some data. ++ memset(&command, 0, sizeof(struct v4l2_encoder_cmd)); ++ command.cmd = V4L2_ENC_CMD_START; ++ if (ioctl(videofd, VIDIOC_ENCODER_CMD, &command) == 0) ++ m_stage = 1; ++ else ++ VERBOSE(VB_IMPORTANT, LOC_ERR + "Start encoding failed" + ENO); ++ } ++ ++ if (m_stage == 1) ++ { ++ VERBOSE(VB_RECORD, LOC + "hd-pvr wait for data"); ++ ++ polls.fd = videofd; ++ polls.events = POLLIN; ++ polls.revents = 0; ++ ++ if (poll(&polls, 1, 1500) > 0) ++ m_stage = 2; ++ else ++ { ++ VERBOSE(VB_RECORD, LOC + "Poll timed-out. Resetting"); ++ memset(&command, 0, sizeof(struct v4l2_encoder_cmd)); ++ command.cmd = V4L2_ENC_CMD_STOP; ++ ioctl(videofd, VIDIOC_ENCODER_CMD, &command); ++ m_stage = 0; ++ } ++ } ++ ++ if (m_stage == 2) ++ { ++ VERBOSE(VB_RECORD, LOC + "hd-pvr data ready. Stop encoding"); ++ ++ command.cmd = V4L2_ENC_CMD_STOP; ++ if (ioctl(videofd, VIDIOC_ENCODER_CMD, &command) == 0) ++ m_stage = 3; ++ } ++ ++ if (m_stage == 3) ++ { ++ struct v4l2_format vfmt; ++ memset(&vfmt, 0, sizeof(vfmt)); ++ vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ ++ VERBOSE(VB_RECORD, LOC + "hd-pvr waiting for valid resolution"); ++ if ((ioctl(videofd, VIDIOC_G_FMT, &vfmt) == 0) && vfmt.fmt.pix.width) ++ m_stage = 4; ++ } ++ ++ return (m_stage == 4); + } + + void AnalogSignalMonitor::UpdateValues(void) +@@ -33,19 +102,24 @@ void AnalogSignalMonitor::UpdateValues(v + return; + + bool isLocked = false; +- if (usingv4l2) ++ if (m_usingv4l2) + { +- struct v4l2_tuner tuner; +- bzero(&tuner, sizeof(tuner)); +- +- if (ioctl(videofd, VIDIOC_G_TUNER, &tuner, 0) < 0) +- { +- VERBOSE(VB_IMPORTANT, +- LOC_ERR + "Failed to probe signal (v4l2)" + ENO); +- } ++ if (m_driver == "hdpvr") ++ isLocked = handleHDPVR(videofd); + else + { +- isLocked = tuner.signal; ++ struct v4l2_tuner tuner; ++ bzero(&tuner, sizeof(tuner)); ++ ++ if (ioctl(videofd, VIDIOC_G_TUNER, &tuner, 0) < 0) ++ { ++ VERBOSE(VB_IMPORTANT, ++ LOC_ERR + "Failed to probe signal (v4l2)" + ENO); ++ } ++ else ++ { ++ isLocked = tuner.signal; ++ } + } + } + else +Index: libs/libmythtv/analogsignalmonitor.h +=================================================================== +--- libs/libmythtv/analogsignalmonitor.h.orig ++++ libs/libmythtv/analogsignalmonitor.h +@@ -19,7 +19,13 @@ class AnalogSignalMonitor : public Signa + virtual void UpdateValues(void); + + private: +- bool usingv4l2; ++ bool handleHDPVR(int videofd); ++ ++ bool m_usingv4l2; ++ QString m_card; ++ QString m_driver; ++ uint32_t m_version; ++ int m_stage; + }; + + #endif // _ANALOG_SIGNAL_MONITOR_H_ +Index: libs/libmythtv/mpegrecorder.cpp +=================================================================== +--- libs/libmythtv/mpegrecorder.cpp.orig ++++ libs/libmythtv/mpegrecorder.cpp +@@ -1041,14 +1041,6 @@ void MpegRecorder::StartRecording(void) + + if (driver == "hdpvr") + { +- if (curRecording->recgroup == "LiveTV") +- { +- // Don't bother checking resolution, always use best bitrate +- int maxbitrate = std::max(high_mpeg4peakbitrate, +- high_mpeg4avgbitrate); +- SetBitrate(high_mpeg4avgbitrate, maxbitrate, "LiveTV"); +- } +- + int progNum = 1; + MPEGStreamData *sd = new MPEGStreamData(progNum, true); + sd->SetRecordingType(_recording_type); +@@ -1492,7 +1484,7 @@ bool MpegRecorder::StartEncoding(int fd) + memset(&command, 0, sizeof(struct v4l2_encoder_cmd)); + command.cmd = V4L2_ENC_CMD_START; + +- if (driver == "hdpvr" && curRecording->recgroup != "LiveTV") ++ if (driver == "hdpvr") + HandleResolutionChanges(); + + VERBOSE(VB_RECORD, LOC + "StartEncoding"); +@@ -1615,64 +1607,6 @@ void MpegRecorder::HandleSingleProgramPM + DTVRecorder::BufferedWrite(*(reinterpret_cast<TSPacket*>(&buf[i]))); + } + +-/// After a resolution change, it can take the HD-PVR a few +-/// seconds before it is usable again. +-bool MpegRecorder::WaitFor_HDPVR(void) +-{ +- struct v4l2_encoder_cmd command; +- struct v4l2_format vfmt; +- struct pollfd polls; +- int idx; +- +- // Tell it to start encoding, then wait for it to actually feed us +- // some data. +- QMutexLocker locker(&start_stop_encoding_lock); +- +- // Sleep any less than 1.5 seconds, and the HD-PVR will +- // return the old resolution, when the resolution is changing. +- usleep(1500 * 1000); +- +- memset(&command, 0, sizeof(struct v4l2_encoder_cmd)); +- command.cmd = V4L2_ENC_CMD_START; +- +- for (idx = 0; idx < 20; ++idx) +- { +- if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) == 0) +- break; +- usleep(100 * 1000); +- } +- +- if (idx == 20) +- return false; +- +- polls.fd = readfd; +- polls.events = POLLIN; +- polls.revents = 0; +- +- if (poll(&polls, 1, 5000) <= 0) +- return false; +- +- // HD-PVR should now be "ready" +- command.cmd = V4L2_ENC_CMD_STOP; +- +- if (ioctl(readfd, VIDIOC_ENCODER_CMD, &command) < 0) +- return false; +- +- memset(&vfmt, 0, sizeof(vfmt)); +- vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; +- +- for (idx = 0; idx < 20; ++idx) +- { +- if (0 == ioctl(chanfd, VIDIOC_G_FMT, &vfmt)) +- return true; +- // Typically takes 0.9 seconds after a resolution change +- usleep(100 * 1000); +- } +- +- VERBOSE(VB_RECORD, LOC + "WaitForHDPVR failed"); +- return false; +-} +- + void MpegRecorder::SetBitrate(int bitrate, int maxbitrate, + const QString & reason) + { +@@ -1710,9 +1644,6 @@ void MpegRecorder::HandleResolutionChang + memset(&vfmt, 0, sizeof(vfmt)); + vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + +- if (driver == "hdpvr") +- WaitFor_HDPVR(); +- + if (0 == ioctl(chanfd, VIDIOC_G_FMT, &vfmt)) + { + VERBOSE(VB_RECORD, LOC + QString("Got Resolution %1x%2") +Index: libs/libmythtv/mpegrecorder.h +=================================================================== +--- libs/libmythtv/mpegrecorder.h.orig ++++ libs/libmythtv/mpegrecorder.h +@@ -86,7 +86,6 @@ class MpegRecorder : public DTVRecorder, + + void ResetForNewFile(void); + +- bool WaitFor_HDPVR(void); + void SetBitrate(int bitrate, int maxbitrate, const QString & reason); + void HandleResolutionChanges(void); + +Index: libs/libmythtv/signalmonitor.h +=================================================================== +--- libs/libmythtv/signalmonitor.h.orig ++++ libs/libmythtv/signalmonitor.h +@@ -287,6 +287,7 @@ inline bool SignalMonitor::IsRequired(co + return (CardUtil::IsDVBCardType(cardtype) || + (cardtype.toUpper() == "HDTV") || + (cardtype.toUpper() == "HDHOMERUN") || ++ (cardtype.toUpper() == "HDPVR") || + (cardtype.toUpper() == "FIREWIRE") || + (cardtype.toUpper() == "FREEBOX")); + } +@@ -295,6 +296,7 @@ inline bool SignalMonitor::IsSupported(c + { + return (IsRequired(cardtype) || + (cardtype.toUpper() == "V4L") || ++ (cardtype.toUpper() == "HDPVR") || + (cardtype.toUpper() == "MPEG")); + } + diff --git a/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff b/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff new file mode 100644 index 0000000..7876a2e --- /dev/null +++ b/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff @@ -0,0 +1,91 @@ +Index: libs/libmythtv/recorderbase.cpp +=================================================================== +--- libs/libmythtv/recorderbase.cpp (revision 20635) ++++ libs/libmythtv/recorderbase.cpp (working copy) +@@ -241,6 +241,8 @@ + rb_changed = true; + + StartNewFile(); ++ ++ ResetStreamParser(); + } + nextRingBufferLock.unlock(); + +Index: libs/libmythtv/mpegrecorder.h +=================================================================== +--- libs/libmythtv/mpegrecorder.h (revision 20635) ++++ libs/libmythtv/mpegrecorder.h (working copy) +@@ -63,6 +63,9 @@ + // ReaderPausedCB + virtual void ReaderPaused(int fd) { pauseWait.wakeAll(); } + ++ // Reset stream parsers when necessary ++ virtual void ResetStreamParser(void); ++ + private: + void SetIntOption(RecordingProfile *profile, const QString &name); + void SetStrOption(RecordingProfile *profile, const QString &name); +Index: libs/libmythtv/recorderbase.h +=================================================================== +--- libs/libmythtv/recorderbase.h (revision 20635) ++++ libs/libmythtv/recorderbase.h (working copy) +@@ -212,6 +212,11 @@ + */ + virtual void CheckForRingBufferSwitch(void); + ++ /** \brief Inherited method for the stream parser to be reset after ++ a ringbuffer change. Used mainly in mpegrecorder for H264Parser. ++ */ ++ virtual void ResetStreamParser(void) { }; ++ + /** \brief Save the seektable to the DB + */ + void SavePositionMap(bool force = false); +Index: libs/libmythtv/mpegrecorder.cpp +=================================================================== +--- libs/libmythtv/mpegrecorder.cpp (revision 20635) ++++ libs/libmythtv/mpegrecorder.cpp (working copy) +@@ -1430,12 +1430,7 @@ + { + VERBOSE(VB_RECORD, LOC + "PauseAndWait unpause"); + +- if (driver == "hdpvr") +- { +- m_h264_parser.Reset(); +- _wait_for_keyframe_option = true; +- _seen_sps = false; +- } ++ ResetStreamParser(); + + // Some drivers require streaming to be disabled before + // an input switch and other channel format setting. +@@ -1500,12 +1495,7 @@ + + if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0) + { +- if (driver == "hdpvr") +- { +- m_h264_parser.Reset(); +- _wait_for_keyframe_option = true; +- _seen_sps = false; +- } ++ ResetStreamParser(); + + VERBOSE(VB_RECORD, LOC + "Encoding started"); + return true; +@@ -1762,3 +1752,15 @@ + SetBitrate(bitrate, maxbitrate, "New"); + } + } ++ ++void MpegRecorder::ResetStreamParser(void) ++{ ++ if (driver == "hdpvr") ++ { ++ m_h264_parser.Reset(); ++ _wait_for_keyframe_option = true; ++ _seen_sps = false; ++ } ++ ++ RecorderBase::ResetStreamParser(); ++} diff --git a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD index 9611b87..43a5699 100644 --- a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythvideo-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Video playback and browsing plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythvideo || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD index 675418c..d1f888f 100644 --- a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythweather-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Weather checking plugin for MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythweather || return 1 diff --git a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD index 11d02c0..9a7f892 100644 --- a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythweb-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Web interface for MythTV's backend" url="http://www.mythtv.org" @@ -21,7 +21,7 @@ DOCROOT=/data/srv/httpd/htdocs/mythweb build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod diff --git a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD index c01bef8..4403524 100644 --- a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythzoneminder-svn -pkgver=20684 +pkgver=20713 pkgrel=1 pkgdesc="Integrates ZoneMinder into MythTV" url="http://www.mythtv.org" @@ -19,7 +19,7 @@ _svnmod=mythplugins build() { svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod -# svn co $_svntrunk --config-dir ./ $_svnmod + svn revert -R $_svnmod cd $startdir/src/$_svnmod @@ -35,6 +35,9 @@ build() { [ "$CARCH" = "i686" ] && ARCH="i686" [ "$CARCH" = "x86_64" ] && ARCH="x86-64" + # clean up + make distclean + # configure ./configure --prefix=/usr --cpu=${ARCH} --disable-all --enable-opengl \ --enable-mythzoneminder || return 1 |