[mythtv] DVB Channel Change Patch (Comments)..

Kenneth Aafløy ke-aa at frisurf.no
Wed Jul 23 18:36:57 EDT 2003


Isaac wrote:

> 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:
I'm doomed!:)

> @@ -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?
'me' testing & getting to know libav codec/format

> In ReOpenFile()
>
> +    ringBuffer->Seek(0, SEEK_SET);
>
> shouldn't be needed at all -- the ringbuffer should already be at the
proper
Wasn't sure at the time...safe side :)

> 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.
Tried to upgrade ffmpeg's libav c/f

> -    cout << "opened DVB demux devices" << endl;
> +//    cout << "opened DVB demux devices" << endl;
>
> Please just remove the lines instead of commenting them out like this.
Had seen that message SO many times...

> -extern AVInputFormat mpegps_demux;
> +extern static struct AVInputFormat mpegps_demux;
>
> Is unnecessary.
Tried to upgrade ffmpeg's libav c/f

>  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.
Tried to upgrade ffmpeg's libav c/f & was tired..

> +++ 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?
Mesa testing..thought the filter was gonna put out some debugging..was
wrong.

>  void NuppelVideoPlayer::Unpause(void)
>  {
> +    VideoParamsChanged();
> +
>
> You need to do this elsewhere, not on every unpause, but you've mentioned
> that already =)
Yea, but that's why I came up with the new method that I sent a while ago :)

> @@ -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.
Was a mess at the time...think I had 3 versions of libmythtv...

>
> +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...
The night I claimed that CVS was broken, guess it got stuck.


BIG YELLOW NOTE: THIS WAS NOT MENT TO BE SENT TO ANYTHING OTHER THAN MY
TRASHCAN :)

Kenneth



More information about the mythtv-dev mailing list