Hi,

Am 25.10.2011 09:22, schrieb IOhannes m zmoelnig:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi all,
>
> what is the reason that animated GIFs lack duration information and are
> not seekable?

Because the format itself doesn't support seeking and I didn't implement
building a file index :)

> running bgav_get_frame_table() returns a NULL-pointer, and
> bgav_get_duration() returns 0.
>
> it would be nice if animated GIFs could be treated like any other video
> file...or am i doing something wrong?

No you don't, it's just a missing feature.

 From what I see there are just 3 things necessary to implement seeking:

- in open_gif(), set ctx->index_mode to INDEX_MODE_SIMPLE and
   s->flags |= STREAM_INTRA_ONLY

- in next_packet_gif() set p->position to the file position
   (ctx->input->position), which is valid at the beginning of the function
   (i.e. such that re-seeking to that position will output the same packet 
again).

- Write a function resync_gif(), which looks like:

   static void resync_gif(bgav_demuxer_context_t * ctx, bgav_stream_t * s)
     {
     gif_priv_t * priv;
     priv = ctx->priv;
     priv->video_pts = STREAM_GET_SYNC(s);
     }

   and add it to the demuxer functions.

A quite simple demuxer, which is made seekable this way is in demux_y4m.c

Try this and if this doesn't work, I'll look into that.

Burkhard


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Gmerlin-general mailing list
Gmerlin-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gmerlin-general

Reply via email to