[MPlayer-dev-eng] Re: [PATCH] GUI: fix audio/video id in gtk/menu.c

Stanislav Maslovski stanislav.maslovski at gmail.com
Sun Apr 23 21:05:14 CEST 2006


On Sun, Apr 23, 2006 at 07:09:07PM +0200, Guillaume POIRIER wrote:
> Hi,
> 
> Stanislav Maslovski wrote:
> >The OGG and MATROSKA demuxers are handled in a new manner, respectively to
> >how they enumerate the streams.
> >
> >The patch with removed cosmetics (i.e. with bad identation) is attached.
> >Tell me when you need the patch that keeps good identation.
> >
> >Please check it against MATROSKA movies, I do not have MSV movies that have
> >several audio/video streams. It works for OGGs I have.
> 
> I tested with an mkv file, and I don't see anything that allows to 
> switch audio channel on the menu that appears if I do a "right click".

True. Today I installed mkvtoolnix, converted couple of my OGMs to
MKV and noticed the same. When writing that patch I assumed MKV demuxer
does the same thing as OGM demuxer. I did not notice the difference
from a quick look on its code.

The OGM dexumer calls new_sh_audio()/new_sh_video() on every audio/video
stream it sees on opening the muxed stream. This way a_streams[]/v_streams[]
get filled with stream IDs. Those are used later in the GUI (not my idea).

Contrary, the MKV demuxer keeps audio/video track indices in a private
structure. It calls new_sh_audio()/new_sh_video only once, only for selected
audio/video tracks. That is why the GUI code sees this situation as
if there was 1 audio and 1 video track in total and does not display the
menu item. 

What do ppl here think about adding more commands to the demux_control()
interface of OGM and MKV (and maybe other) demuxers?
Commands like DEMUX_GET_NUM_AUDIO, DEMUX_GET_NUM_VIDEO would be quite helpful.
I can do that myself if nobody disagress.

--
Stanislav




More information about the MPlayer-dev-eng mailing list