summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/mythtv/trunk/mythtv
diff options
context:
space:
mode:
authorNathan Harris <nharris@eoimaging.com>2009-08-17 20:59:48 (GMT)
committerNathan Harris <nharris@eoimaging.com>2009-08-17 20:59:48 (GMT)
commit9800bb0789a9b3655a679e996841bdb51a609d22 (patch)
tree1413386f6cc0e3d54bc9c91ab8459033db788acc /abs/core-testing/mythtv/trunk/mythtv
parent2f5d04a604af2cdcf0df9d264ae7f7e7705a99ff (diff)
downloadlinhes_pkgbuild-9800bb0789a9b3655a679e996841bdb51a609d22.zip
linhes_pkgbuild-9800bb0789a9b3655a679e996841bdb51a609d22.tar.gz
linhes_pkgbuild-9800bb0789a9b3655a679e996841bdb51a609d22.tar.bz2
mythtv-svn: bumped to svn 21333
Diffstat (limited to 'abs/core-testing/mythtv/trunk/mythtv')
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv/H264Parser-fixes-v1.1.patch368
-rwxr-xr-xabs/core-testing/mythtv/trunk/mythtv/PKGBUILD7
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch292
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.cpp.patch183
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.h.patch24
-rw-r--r--abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff91
6 files changed, 2 insertions, 963 deletions
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
deleted file mode 100644
index f8e2100..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/H264Parser-fixes-v1.1.patch
+++ /dev/null
@@ -1,368 +0,0 @@
-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 4aad5af..df4afb8 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=21228
+pkgver=21333
pkgrel=1
pkgdesc="A personal video recorder for Linux"
url="http://www.mythtv.org"
@@ -17,10 +17,7 @@ groups=('pvr')
install='mythtv.install'
patchs=()
-#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')
+#patchs=('smolt_jump.patch')
source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` 'mythbackend.lr' 'mythfrontend.lr' 'pretty')
arch=('i686' 'x86_64')
#md5sums=()
diff --git a/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch b/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch
deleted file mode 100644
index 2465cfe..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/hdpvr-signalmonitor.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-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/myththemedmenu.cpp.patch b/abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.cpp.patch
deleted file mode 100644
index fbb85c3..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.cpp.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-Index: libs/libmythui/myththemedmenu.cpp
-===================================================================
---- libs/libmythui/myththemedmenu.cpp (revision 20249)
-+++ libs/libmythui/myththemedmenu.cpp (working copy)
-@@ -88,6 +88,8 @@
- m_state(state), m_allocedstate(false), m_foundtheme(false),
- m_exitModifier(-1), m_ignorekeys(false), m_wantpop(false)
- {
-+ m_menuPopup = NULL;
-+
- if (!m_state)
- {
- m_state = new MythThemedMenuState(parent, "themedmenustate");
-@@ -269,6 +271,10 @@
- }
- }
- }
-+ else if (action == "MENU")
-+ {
-+ doMenu();
-+ }
- else
- handled = false;
- }
-@@ -290,6 +296,158 @@
- updateLCD();
- }
-
-+void MythThemedMenu::doMenu()
-+{
-+ if( m_menuPopup != NULL )
-+ return;
-+
-+ int allowsd = GetMythDB()->GetNumSetting("AllowQuitShutdown");
-+ int override_menu = GetMythDB()->GetNumSetting("OverRideExitMenu");
-+ QString label = "System Menu";
-+ MythScreenStack* mainStack = GetMythMainWindow()->GetMainStack();
-+ m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
-+
-+ if (m_menuPopup->Create())
-+ mainStack->AddScreen(m_menuPopup);
-+
-+ if (override_menu == 0)
-+ {
-+ if ( (allowsd != 0) && (allowsd != 4) )
-+ {
-+ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
-+ m_menuPopup->AddButton("Shutdown");
-+ m_menuPopup->AddButton("Reboot");
-+ }
-+ else
-+ {
-+ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
-+ }
-+ }
-+ if (override_menu == 5)
-+ { // reboot
-+ m_menuPopup->SetReturnEvent(this,"popmenu_reboot");
-+ m_menuPopup->AddButton("Reboot");
-+ }
-+ else if (override_menu == 2 || override_menu == 4)
-+ { // shutdown
-+ m_menuPopup->SetReturnEvent(this,"popmenu_shutdown");
-+ m_menuPopup->AddButton("Shutdown");
-+ }
-+ else if (override_menu == 3 || override_menu == 6)
-+ { // both
-+ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
-+ m_menuPopup->AddButton("Shutdown");
-+ m_menuPopup->AddButton("Reboot");
-+ }
-+ else
-+ {
-+ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
-+ }
-+
-+ m_menuPopup->AddButton("About");
-+ m_menuPopup->AddButton("Cancel");
-+
-+}
-+
-+void MythThemedMenu::aboutScreen()
-+{
-+
-+ extern const char* myth_source_version;
-+ extern const char* myth_source_path;
-+ QString distro_line;
-+ distro_line = "";
-+
-+ QFile file("/etc/os_myth_release");
-+ if (file.open(QFile::ReadOnly))
-+ {
-+ QTextStream t( &file ); // use a text stream
-+ distro_line = t.readLine();
-+ file.close();
-+ }
-+
-+ QString label = "";
-+ label.append(QObject::tr("Revision: ") + myth_source_version + " \n Branch:" + myth_source_path + "\n" + distro_line );
-+
-+ MythScreenStack* mainStack = GetMythMainWindow()->GetMainStack();
-+ m_menuPopup = new MythDialogBox(label, mainStack, "About");
-+ if (m_menuPopup->Create())
-+ mainStack->AddScreen(m_menuPopup);
-+
-+ m_menuPopup->SetReturnEvent(this, "About");
-+ m_menuPopup->AddButton("OK!");
-+
-+}
-+
-+void MythThemedMenu::customEvent(QEvent *event)
-+{
-+ if (event->type() == kMythDialogBoxCompletionEventType)
-+ {
-+ DialogCompletionEvent *dce =
-+ dynamic_cast<DialogCompletionEvent*>(event);
-+
-+ QString resultid = dce->GetId();
-+ int buttonnum = dce->GetResult();
-+ QString halt_cmd = GetMythDB()->GetSetting("HaltCommand");
-+ QString reboot_cmd = GetMythDB()->GetSetting("RebootCommand");
-+
-+ if (resultid == "popmenu_exit")
-+ {
-+ if (buttonnum == 0)
-+ {
-+ if (!halt_cmd.isEmpty())
-+ system(halt_cmd.toAscii());
-+ }
-+
-+ if (buttonnum == 1)
-+ {
-+ if (!reboot_cmd.isEmpty())
-+ system(reboot_cmd.toAscii());
-+ }
-+
-+ if (buttonnum == 2)
-+ {
-+ aboutScreen();
-+ }
-+ }
-+
-+ if (resultid == "popmenu_noexit")
-+ {
-+ if (buttonnum == 0)
-+ aboutScreen();
-+ }
-+
-+ if (resultid == "popmenu_reboot")
-+ {
-+ if (buttonnum == 0)
-+ {
-+ if (!reboot_cmd.isEmpty())
-+ system(reboot_cmd.toAscii());
-+ }
-+
-+ if (buttonnum == 1)
-+ {
-+ aboutScreen();
-+ }
-+ }
-+
-+ if (resultid == "popmenu_shutdown")
-+ {
-+ if (buttonnum == 0)
-+ {
-+ if (!halt_cmd.isEmpty())
-+ system(halt_cmd.toAscii());
-+ }
-+
-+ if (buttonnum == 1)
-+ {
-+ aboutScreen();
-+ }
-+ }
-+
-+ m_menuPopup = NULL;
-+ }
-+}
-+
- /** \brief Parses the element's tags and set the ThemeButton's type,
- * text, depends, and action, then adds the button.
- *
diff --git a/abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.h.patch b/abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.h.patch
deleted file mode 100644
index 688e99c..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/myththemedmenu.h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: libs/libmythui/myththemedmenu.h
-===================================================================
---- libs/libmythui/myththemedmenu.h (revision 20249)
-+++ libs/libmythui/myththemedmenu.h (working copy)
-@@ -2,6 +2,7 @@
- #define MYTHTHEMEDMENU_H_
-
- #include "mythscreentype.h"
-+#include "mythdialogbox.h"
- #include "mythuistatetype.h"
- #include "mythuibuttonlist.h"
- #include "xmlparsebase.h"
-@@ -79,6 +80,11 @@
- void ReloadExitKey(void);
- virtual void aboutToShow(void);
-
-+ void doMenu();
-+ void aboutScreen();
-+ MythDialogBox* m_menuPopup;
-+ void customEvent(QEvent *event);
-+
- protected:
- virtual bool keyPressEvent(QKeyEvent *e);
-
diff --git a/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff b/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff
deleted file mode 100644
index 7876a2e..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff
+++ /dev/null
@@ -1,91 +0,0 @@
-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();
-+}