[FFmpeg-devel] [PATCH] rl2 format demuxer

Michael Niedermayer michaelni
Sun Mar 16 12:24:39 CET 2008


On Sun, Mar 16, 2008 at 12:04:56PM +0100, Sascha Sommer wrote:
> Hi,
> 
> On Sonntag, 16. M?rz 2008, Michael Niedermayer wrote:
> > On Sat, Mar 15, 2008 at 10:08:53PM +0100, Sascha Sommer wrote:
> > > Hi,
> > >
> > > attached patch adds support for the rl2 format as described on
> > > http://wiki.multimedia.cx/index.php?title=RL2
> > > It depends on the rl2 decoder patch that I sent earlier
> >
> > [...]
> >
> > > +typedef struct {
> > > +    int stream_index; ///< audio or video stream index
> > > +    uint32_t offset;  ///< chunk offset relative to the file start
> > > +    uint32_t size;    ///< size of the chunk
> > > +    int64_t pts;      ///< presentation timestamp
> > > +} rl2_sample_t;
> >
> > You should use  AVStream.index_entries / av_add_index_entry()
> >
> 
> And then do
> 
> pos = url_ftell(s->pb);
> and search in the read function in the index_entries if the stream at pos is a 
> video or audio stream?

There are many ways it can be done ...

I likely would have tried a index_pos[2]
and
stream_id=   s->streams[0].index_entries[ index_pos[0] ].pos
           > s->streams[1].index_entries[ index_pos[1] ].pos;

st= s->streams[ stream_id ];
url_fseek(st->index_entries[ index_pos[stream_id] ].pos);
...
index_pos[stream_id]++;

of course as said there are many ways and this might not be the best ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080316/c64c75ef/attachment.pgp>



More information about the ffmpeg-devel mailing list