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

Derk-Jan Hartman hartman at videolan.org
Sun Jul 24 01:32:51 CEST 2005

On 23 jul 2005, at 23:21, R. Bernstein wrote:
> 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
> Information"

You want to present information about available inputs? Well, we have  
the open Disc dialog for that don't we?
I really don't see your problem. You wanna do what? Present meta data  
about a media before it is actually added to the playlist or something?

Then you will need to create a new input element, probe the element  
(the vlm core does this as well).
If you want to use libcdio to do disc probing or something, then you  
simply need to link the wxwindows gui module to a subset of the  
libcdio library or module. But i personally would like to keep the  
GUI as independent from non-OS provided elements as possible.

> 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
> you.

Again i don't see the issue. I drag and drop the disc i want to VLC,  
and it just plays. Or I setup the OS to let VLC autoplay discs. But i  
reckon that Windows is a bit more sucky OS that isn't so easy to  
operate :D

>> 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.

Well we have playlist Services Discovery modules for this purpose  
basically. But i really see no use for Discs to be wrapped by such  

>>> 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.

There is no reason for this. In The Mac OS X version of VLC you can  
call the Media Information Dialog on any playlist item.

> 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.

Multiple input elements are not supported in VLC. At least not from a  
playlist and interface point of view. The VLM scheduler area for  
instance DOES allow this. It doesn't use any part of the playlist.

>>> (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,  
> And speaking of hacky thoughts, It would appear that someone thought
> that this was/is hack. ;-)

Of course it is. Any Interactive Menu is. It's NOT video and doesn't  
behave like video so it inherently is a 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!

Hell I don't even use DVDs. Internet + Hard Drive baby !! :D
And VCDs are surely not about freedom. Anyone who uses VCDs for that  
reason needs to find better ways of occupying himself with our  
freedoms. I suggest Creative Commons or something.

> 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.

Sure. VLC was never designed for things like this.
But i don't see Xine streaming a OSD menu in a separate DVB SPU  
track, or creating a Mosaiq as VLC can create. We all have our strong  

> 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. ;-)

Well, most developers are there 24/7. Just a lot of the time AFK or  
in their beds.

>> 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.

You cannot visually present anything without a input. So i still  
don't see the problem.

>>> 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.

Might be handled by variables then. The thing is that Title's and  
Chapters are totally seperate things in term of definition. A Title  
is basically a DVD Vob (Basically a file on the disc). A chapter is a  
Timecode within that VOB. Their nature is totally different and that  
is why they are implemented differently.

>> 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
> http://www.vcdimager.org/documentation.phtml
> (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

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