[vlc-devel] Re: 3 developer questions: media info, keyboard/mouse input, navigation entries

R. Bernstein rocky at panix.com
Sat Jul 23 23:21:35 CEST 2005

Derk-Jan Hartman writes:
 > On 23 jul 2005, at 18:07, R. Bernstein wrote:
 > > Any ideas as to how to get "Media Information" appear in "Stream and
 > > Media Info" when there is no stream initialized?
 > >
 > > For bookmarks there is
 > >     (input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,  
 > >
 > > to find a stream so that the bookmarks can squirrel that information
 > > away.
 > >
 > > First, it strikes me as a little bit unclean to look for input objects
 > > anywhere. In my case, I really don't want the input object, but a
 > > handle to that "Stream and Media" page.
 > >
 > psz_temp = vlc_input_item_GetInfo( &p_item->input, _("Meta- 
 > information"), _("Artist") );
 > Where p_item is the playlistitem which you would like to query.

I'm sorry I wasn't clear enough. I want to probe media and present
what's available. The place that seemed the most logical to me is in
the "Media Information" part of the window called "Stream and Media

The Media available, such as on a computer, has nothing to do with a
playlist. In fact it usually goes the other way around: you say you
want to play what's in a CD-ROM or DVD drive or a particular kind of
medium (e.g. DVD, CD-DA or VCD) and a playlist entry is created for

 > Correct, if nothing is playing, then there is no active input object  
 > in the object chain.

But there still is media that is available and the problem remains as
to how/where to present it. 

 > > One thought I had was to create a dummy null stream. But now this
 > > might cause problems in those other places. For example if that
 > > bookmark place found the dummy null stream, it wouldn't have anything
 > > to bookmark and worse it would keep it from bookmarking another stream
 > > should it exist.
 > please get rid of any such terrible hacky thoughts you have.

Actually the hacky thought might have been to tie "Media Information"
with a particular input stream. When one stops a stream, the media
that's one had in a CD-ROM or DVD drive, is still probably there
although it disappears from this window; this isn't all that helpful.

And if there are multiple input media streams, are multiple sets of
"Media Information" shown? If so right now the tagging of which media
information goes with which input seems to be lacking.

 > > (This brings up a related point: is there a way to find *all* input
 > > objects? The above just finds a single *any* one. If so probably the
 > > bookmark code and other place shuld be changed to work on all rather
 > > than any.)
 > Use the playlist.

Okay. If that's the case, then it would seem to be that
BookmarksDialog::Update() should be fixed to use that. *Can* there be
multiple input streams?

 > > Another downside of the dummy stream idea, is that somehow I'd need to
 > > arrange for it to get destroyed.
 > >
 > >  - - -
 > >
 > > I'd like to get mouse and keyboard input in the VCD plugin. Looking at
 > > code in modules/access/dvdnav.c and I think in a past queries I
 > > believe I was told that one has to add code for a custom demuxer.  In
 > > the past made forays into doing that; it's a bit complex and I was not
 > > successful.
 > I don't think this is really necessary. I say a separate Eventthread  
 > such as present in dvdnav.c (housing EventMouse and EventKey) that  
 > polls the mouse and key variables should be enough.

The goal is not to have to write a demuxer at least not
initially. (And I've tried and wasn't that successful). The existing
common code demuxer demuxes fine for now; a custom demuxer seems to
duplicate and complicate things. But perhaps you are correct and an
Eventthread can be created without writing a demuxer. Such as via this
code in dvdnav:

    /* FIXME hack hack hack hack FIXME */
    /* Get p_input and create variable */
    p_sys->p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );

And speaking of hacky thoughts, It would appear that someone thought
that this was/is hack. ;-)

 > > (Nor have I been successful in getting someone to
 > > volunteer to do so.)
 > Well those VCDs with menus never really did catch on in Europe. I  
 > gather that explains this more than anything.

This is a rather parochial view. My own personal interest has to with
freedom. VCD's are not subject to the DMCA -- sorry I mean EUCD which
*did* catch on in Europe. In order for VCD's to be a viable
alternative for those who care about freedom without violating the
law, decent media players need to exist (and presently vlc's is
lacking). The VCD player in xine has been much more complete for a
while now, and you know what? The majority of the people using it that
I've had contact with in fact are from Europe!

The lack of a volunteer or the fact that it has to be asked for in the
first place may also be as much a reflection of the state of vlc's
ability to support kinds of media in a general way that can perform
navigation or change stream formats midway.

Also it may be as much a reflection of the state of its developer
documentation. (Yes, I know all you have to do is get on the IRC and
ask.  Been there, and done that no several times. Almost always it's
been a dud.  In fact earler today when I tried it some IRC person
volunteered the information that I send email to the mailing list. ;-)

 > These events are already present. Simply place callbacks on the  
 > respective mouse and key variables. The callbacks will be executed  
 > when the variable receives a changed value. The OS interfaces will  
 > set the correct variables whenever mouse position or key command is  
 > entered in the vout window.

I think this assumes an input thread and that's what the whole
discussion has been about. But again, I'll try the vlc_object_find()
trick above; maybe I can get one. Thanks.

 > > In the VCD plugin I set up "Navigation" menus to select "LIDs" and
 > > "Segments." However, I find that the VCD plugin gets called back via
 > > SET_TITLE with the positon of the parent "Segment" or "LID". I'm at a
 > > loss as to how I can get the submenu value.
 > SET_CHAPTER perhaps? I'm just making a guess, since i have no idea  

Yep, you are making a guess - I don't believe there is any such
thing. I don't see it in vlc_access.h where SET_TITLE is defined and
you won't find that in any other access module or vlc-trunk/include.

 > what LIDs are exactly.

I'm not sure how knowing what a LID would have helped here. (It allows
one to invent a *better* non-existent name?). But at any rate you can
look the term up in the vcdimager glossary in

(For reasons I don't understand yet, the glossary is missing from the
HTML version or I'd give that URL, however it is in the TXT, DVI and
PS and PDF formats)

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list