[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    Re: [xine-devel] Re: [xine-cvs] CVS: xine-lib/src/liba52 xine_decoder.c,1.61,1.62
From:       Michael Roitzsch <mroi () users ! sourceforge ! net>
Date:       2003-11-17 19:32:57
[Download RAW message or body]

Hi James,

> If you think about this more, you will see that one can use either
> variable. I just choose the first one. decoder_info[1]
> If info[1]=1, PTS =  PTS for the a52 frame that starts in this fifo
> block. (aka.this a52 frame)
> If info[2]=2, PTS = PTS for this a52 frame, and PTS=0 for next a52
> frame.

Ok, so I think the correct code in liba52 to fill PTS list would be 
something like this:

Replace this:

  /* FIXME: the code here does not match the explanation above */
  if (buf->pts) {
    int32_t info;
    info = buf->decoder_info[1];
    this->pts = buf->pts;
    this->pts_list[this->pts_list_position]=buf->pts;
    this->pts_list_position++;
    if( this->pts_list_position > 3 )
      this->pts_list_position = 3;
    if (info == 2) {
      this->pts_list[this->pts_list_position]=0;
      this->pts_list_position++;
      if( this->pts_list_position > 3 )
        this->pts_list_position = 3;
    }
  }

with this:

  pts = buf->pts;
  for (i = buf->decoder_info[1]; i > 0; i--) {
    if (this->pts_list_position < 5)
      this->pts_list[this->pts_list_position++] = pts;
    else
      XINE_ASSERT(0, "PTS fifo overflow");
    pts = 0;
  }

Does this look correct?

> I have been thinking about the possiblility of moving liba52 sync
> code into the demuxer. Just forcing the demuxer to always output
> complete A52 frames and deal with the PTS value in the demuxer
> instead.

You know that there are 6 demuxer capable of outputting A52 and this 
number could still grow. That would be a lot of redundant code. I think 
this should be encapsulated on the decoder side. Decoders should never 
assume a certain buffer fragmentation they like.

Michael

-- 
"Unix? What's that? Is that like Linux?" 



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic