[mythtv] [mythtv-commits] Ticket #1356: DTVRecorder::FindKeyframes in 0.19 causes video gltiches in firewire recordings
Jim Westfall
jwestfall at surrealistic.net
Tue Feb 28 05:19:06 UTC 2006
Steven Adeff <adeffs.mythtv at gmail.com> wrote [02.27.06]:
> >
> > I just let it run till I noticed some major glitches and it still showed
> > firewire: total dropped packets 0
> > when I exited livetv.
> >
> > let me know what to do next
>
> well, it certainly hasn't fixed the glitches, but now I get a bunch of
> glitches during playback that are not in the actual recording, if I
> rewind and play the same section back it doesn't show the glitch...
>
> --
> Steve
I was able to reproduce livetv glitches if my backend gets over loaded.
Can you verify this isnt happened to you? you do streaming?
also, could you try the following 2 patches and see if they help at all.
Both should cut down on cpu usage when the backend is recording/livetv.
thanks
jim
-------------- next part --------------
Index: libs/libmythtv/firewirerecorder.cpp
===================================================================
--- libs/libmythtv/firewirerecorder.cpp (revision 9175)
+++ libs/libmythtv/firewirerecorder.cpp (working copy)
@@ -64,7 +64,7 @@
fwport(-1), fwchannel(-1), fwspeed(-1), fwbandwidth(-1),
fwfd(-1), fwconnection(kConnectionP2P),
fwoplug(-1), fwiplug(-1), fwmodel(""), fwnode(0),
- fwhandle(NULL), fwmpeg(NULL), isopen(false), lastpacket(0),
+ fwhandle(NULL), fwmpeg(NULL), isopen(false),
_mpeg_stream_data(NULL)
{
_mpeg_stream_data = new MPEGStreamData(1, true);
@@ -240,23 +240,11 @@
_recording = true;
iec61883_mpeg2_recv_start(fwmpeg,fwchannel);
- lastpacket = time(NULL);
while (_request_recording)
{
if (PauseAndWait())
continue;
- if (time(NULL) - lastpacket > kTimeoutInSeconds)
- {
- VERBOSE(VB_IMPORTANT, LOC +
- QString("No Input in %1 seconds [P:%2 N:%3] (time)")
- .arg(kTimeoutInSeconds).arg(fwport).arg(fwnode));
-
- iec61883_mpeg2_recv_stop(fwmpeg);
- _error = true;
- return;
- }
-
FD_ZERO(&rfds);
FD_SET(fwfd, &rfds);
tv.tv_sec = kTimeoutInSeconds;
@@ -346,7 +334,6 @@
BufferedWrite(tspacket);
}
- lastpacket = time(NULL);
_ts_stats.IncrTSPacketCount();
if (0 == _ts_stats.TSPacketCount()%1000000)
VERBOSE(VB_RECORD, _ts_stats.toString());
Index: libs/libmythtv/firewirerecorder.h
===================================================================
--- libs/libmythtv/firewirerecorder.h (revision 9175)
+++ libs/libmythtv/firewirerecorder.h (working copy)
@@ -74,7 +74,6 @@
raw1394handle_t fwhandle;
iec61883_mpeg2_t fwmpeg;
bool isopen;
- time_t lastpacket;
MPEGStreamData *_mpeg_stream_data;
TSStats _ts_stats;
-------------- next part --------------
Index: libs/libmythtv/dtvrecorder.cpp
===================================================================
--- libs/libmythtv/dtvrecorder.cpp (revision 9175)
+++ libs/libmythtv/dtvrecorder.cpp (working copy)
@@ -217,9 +217,10 @@
// 00 00 01 B3: seq_start_code
// (there are others that we don't care about)
uint i = tspacket->AFCOffset();
+ const unsigned char *data = tspacket->data();
for (; i < TSPacket::SIZE; i++)
{
- const unsigned char k = tspacket->data()[i];
+ const unsigned char k = data[i];
if (0 == _header_pos)
_header_pos = (k == 0x00) ? 1 : 0;
else if (1 == _header_pos)
More information about the mythtv-dev
mailing list