[mythtv] DVB Channel Change Patch..
Isaac Richards
ijr at po.cwru.edu
Wed Jul 23 11:26:01 EDT 2003
On Wednesday 23 July 2003 05:54 am, Kenneth Aafløy wrote:
> Hi!
>
> Here it is:
> + Fix for video changing during channel change
> + Cleanups in DVBChannel + CVBRecorder
> + Cleanups in XvVideoOutput
> + OSD Settings (most)
> - OSD Rescaling
> - Refinements
Comments on the patch:
@@ -103,7 +103,17 @@
bool AvFormatDecoder::CanHandle(char testbuf[2048], const QString &filename)
{
- av_register_all();
+ avcodec_init();
+// avcodec_register_all();
+ register_avcodec(&mp2_decoder);
+ register_avcodec(&mpeg_decoder);
+
+// av_register_all();
+ mpegps_init();
+
+ /* file protocols */
+// register_protocol(&file_protocol);
+ register_protocol(&pipe_protocol);
Why did you do that?
In ReOpenFile()
+ ringBuffer->Seek(0, SEEK_SET);
shouldn't be needed at all -- the ringbuffer should already be at the proper
position.
@@ -498,7 +565,7 @@
lastKey = frameNum;
if (!hasFullPositionMap)
- positionMap[lastKey / keyframedist] = pkt.startpos;
+ positionMap[lastKey / keyframedist] =
pkt.stream_index;
}
completely breaks seeking of video.
- cout << "opened DVB demux devices" << endl;
+// cout << "opened DVB demux devices" << endl;
Please just remove the lines instead of commenting them out like this.
-extern AVInputFormat mpegps_demux;
+extern static struct AVInputFormat mpegps_demux;
Is unnecessary.
void DVBRecorder::ProcessData(unsigned char *buffer, int len)
{
+ static unsigned int pktdrop = 0;
Don't use static variables in a threaded program.
- long long startpos = ringBuffer->GetFileWritePosition();
- startpos += pkt.startpos;
+ startpos += pkt.stream_index;
Again, this breaks seeking.
+++ mymyth/libs/libmythtv/filter.c 2003-07-22 03:35:27.000000000 +0200
@@ -8,7 +8,7 @@
#include "filter.h"
-static int filter_debug = 0;
+static int filter_debug = 1;
Why are you touching filter.c at all?
void NuppelVideoPlayer::Unpause(void)
{
+ VideoParamsChanged();
+
You need to do this elsewhere, not on every unpause, but you've mentioned that
already =)
@@ -781,7 +781,7 @@
if (readsallowed && used < fill_min && !ateof)
{
readsallowed = false;
- cerr << "rebuffering (" << used << " " << fill_min << ")\n";
+// cerr << "rebuffering (" << used << " " << fill_min << ")\n";
}
pthread_rwlock_unlock(&rwlock);
Please leave modifications that have absolutely nothing to do with what you're
patching out of the patch.
+void TVRec::ChangeDeinterlacer(int deint_mode)
+{
+ deinterlace_mode = deint_mode;
+ return;
+}
+
And it would be nice if you wouldn't re-add stuff that I removed...
Isaac
More information about the mythtv-dev
mailing list