[FFmpeg-devel] [PATCH] libgme support

wm4 nfxjfg at googlemail.com
Tue Jul 2 01:34:48 CEST 2013


On Mon, 1 Jul 2013 10:33:02 +0200
Stefano Sabatini <stefasab at gmail.com> wrote:

> > I would prefer to add the tracks as streams, but since you can play
> > only one track at a time, this is perhaps not possible. I wonder if
> > there is some way to change the current track at runtime? The GME
> > API allows it.
> 
> I don't think so. You could check the track option at each iteration,
> and change stream if the option was set to a new value. Not very clean
> but at the moment we lack a different system. A possibility would be
> to add a command API (like the one in libavfilter).

It would also be possible to keep a Music_Emu instance for each track,
but that would require loading the file multiple times.

Yes, a command API would be nice. Polling the option could also work.
But I think the required logic for this is a bit too fragile and
annoying (e.g. what happens if setting the new track fails), so I'll
stay away from it for now.

> > +static void add_meta(AVFormatContext *s, const char *name, const
> > char *value)
> 
> nit: you could inline this

I'd prefer not to, because it gets a bit repetitious. But if you think
it should be changed, I can do that.

> > +    int n_tracks = gme_track_count(gme->music_emu);
> 
> nit++: int track_count for consistency

OK. I also decided to remove the n_tracks > 1 check before adding it
as meta data; this seemed silly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-add-support-for-libgme.patch
Type: text/x-patch
Size: 10389 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130702/b0fd60ae/attachment.bin>


More information about the ffmpeg-devel mailing list