display filename???

This forum is about all development around libVLC.
parker
Blank Cone
Blank Cone
Posts: 39
Joined: 21 Sep 2010 05:25

display filename???

Postby parker » 13 Oct 2010 20:14

Function used to display the file name on the video screen in VLC?
Image
Thank You!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: display filename???

Postby Jean-Baptiste Kempf » 15 Oct 2010 00:50

How is that a question?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Diamonddrake
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Oct 2010 05:04

Re: display filename???

Postby Diamonddrake » 20 Oct 2010 02:26

I can't seem to get it to work either, i believe the question is :
"which function is responsible for displaying the filename over the video?"

I believe its "libvlc_video_set_marquee_string" although the libvlc documentation link is broken for information about its options. So I can't seem to get it to work either.

Any further information on this would be appreciated.

Rémi Denis-Courmont
Developer
Developer
Posts: 15280
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: display filename???

Postby Rémi Denis-Courmont » 20 Oct 2010 19:12

It's done internally.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Diamonddrake
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Oct 2010 05:04

Re: display filename???

Postby Diamonddrake » 21 Oct 2010 23:54

Using libvlc directly (by default at least) doesn't display the filename on the video like it does in VLC player. I don't understand why you say this.

the take snapshot feature, does by default show the filename of the image and shows the image as an icon on the video. But when you open media using new media location. it doesn't show the file name on the screen. So is there an option that needs to be added? I have yet to figure that out.

But you can do it your self by first calling.

libvlc_video_set_marquee_int(m_player*, 0, 1) then libvlc_video_set_marquee_string(m)player*, 1, char*(filename text here));

you should set the timeout too, or it will just stay there forever. Never figured out how to get the fade out either. I assumed you have to manually decrement the opacity. Although I believe that there is an internal function that handles it, but I am not sure. I am new to libvlc. I am currently learning as I am writing a wrapper for .net aimed at version 1.1.2 (should work with newest version but this is what i was using when I started.) The documentation is pretty strait forward. I got got all the basic playback features wrapped, along with video adjust, and subtitles wrapped. Just now started on marquee, I got it working a little bit, still working out the particulars.

I really should be using the libvlc source code as a reference, But I'm not deeply versed in C and I have trouble following it at times. the correlation between where a function's signature is in header files, vs where it is defined and such I find hard to follow since C# was my first real programming language. I started with scripting languages, and that's an entirely different game there.

Anyway, hope this helps the OP, and hope it leads to more answers from Rémi or other developers.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: display filename???

Postby sherington » 22 Oct 2010 09:13

Using libvlc directly (by default at least) doesn't display the filename on the video like it does in VLC player.
I'm not sure that's right.

By default using libvlc I do see the filename displayed on the video, in fact I have to specify "--no-video-title-show" as an argument when I invoke libvlc_new() to prevent the filename being displayed.

Diamonddrake
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Oct 2010 05:04

Re: display filename???

Postby Diamonddrake » 22 Oct 2010 22:40

using libvlc 1.1.2 regardless of arguments to libvlc_new It never show's the filename.

I am unclear why. This is how I am creating my media player.

create an instance with libvlc_new empty args, or occasionally with a pluginpath.
Create a media object with libvlc_media_new_location(libvlcinstance, mrl)
Create a media player from the media object with libvlc_media_player_new_from_media(media)
set the player's drawing surface with libvlc_media_player_set_hwnd(player,control handle)
then play the video with libvlc_media_player_play(player)

I get no filename marquee.

Anyone know why?
Its the simplest possible code to start playing a video, I can't seem to understand why it would be any different.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: display filename???

Postby sherington » 23 Oct 2010 15:25

using libvlc 1.1.2 regardless of arguments to libvlc_new It never show's the filename.

I am unclear why. This is how I am creating my media player.

create an instance with libvlc_new empty args, or occasionally with a pluginpath.
Create a media object with libvlc_media_new_location(libvlcinstance, mrl)
Create a media player from the media object with libvlc_media_player_new_from_media(media)
set the player's drawing surface with libvlc_media_player_set_hwnd(player,control handle)
then play the video with libvlc_media_player_play(player)
Well, I do things slightly differently...

libvlc_new
libvlc_media_player_new
(set video surface by whatever means)
libvlc_media_new_path
libvlc_media_player_set_media
libvlc_media_player_play

So maybe there's a difference when using libvlc_media_new_location like you do as compared with libvlc_media_new_path like I do, at least so far as your video title not appearing.

Diamonddrake
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Oct 2010 05:04

Re: display filename???

Postby Diamonddrake » 23 Oct 2010 18:53

I changed just one line of code in my application for using new_location to using libvlc_media_new_path.
And yes, now the the filename is displayed on the video.

new_location is for setting a MRL, while new_path is reserved for setting a file path.

This is an interesting find, I will work on utilizing this information.
I assume that there is no difference in creating a media player from media or just as new except that it sets the media to the new player automatically.

Thank you.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: display filename???

Postby sherington » 24 Oct 2010 09:03

new_location is for setting a MRL, while new_path is reserved for setting a file path.
Just a brief foot-note on this from me, I exclusively use new_path for MRLs as well as file paths. I never really thought about it before because it seems to just work for anything I send to it - local file, dvd iso image, streaming server and streaming client MRLs, everything I tried works with new_path.

Diamonddrake
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Oct 2010 05:04

Re: display filename???

Postby Diamonddrake » 24 Oct 2010 21:53

I have tried it with both, for everything. It really seems that they both work in all situations, But I haven't really check the source code to find the real difference. The only obvious difference is location doesn't show the file name, where as path does.

parker
Blank Cone
Blank Cone
Posts: 39
Joined: 21 Sep 2010 05:25

Re: display filename???

Postby parker » 12 Jan 2011 05:35

Using libvlc directly (by default at least) doesn't display the filename on the video like it does in VLC player. I don't understand why you say this.

the take snapshot feature, does by default show the filename of the image and shows the image as an icon on the video. But when you open media using new media location. it doesn't show the file name on the screen. So is there an option that needs to be added? I have yet to figure that out.

But you can do it your self by first calling.

libvlc_video_set_marquee_int(m_player*, 0, 1) then libvlc_video_set_marquee_string(m)player*, 1, char*(filename text here));

you should set the timeout too, or it will just stay there forever. Never figured out how to get the fade out either. I assumed you have to manually decrement the opacity. Although I believe that there is an internal function that handles it, but I am not sure. I am new to libvlc. I am currently learning as I am writing a wrapper for .net aimed at version 1.1.2 (should work with newest version but this is what i was using when I started.) The documentation is pretty strait forward. I got got all the basic playback features wrapped, along with video adjust, and subtitles wrapped. Just now started on marquee, I got it working a little bit, still working out the particulars.

I really should be using the libvlc source code as a reference, But I'm not deeply versed in C and I have trouble following it at times. the correlation between where a function's signature is in header files, vs where it is defined and such I find hard to follow since C# was my first real programming language. I started with scripting languages, and that's an entirely different game there.

Anyway, hope this helps the OP, and hope it leads to more answers from Rémi or other developers.
can you give me some example pls.

timdinh
New Cone
New Cone
Posts: 1
Joined: 14 Jan 2011 16:46

Re: display filename???

Postby timdinh » 14 Jan 2011 16:50

I am new to developing around VLC.

I read some tutorials on creating modules for VLC, but i understand you will need to rebuild it entirely.

What i wanted to do is to make a stand alone plugin that interacts with VLC, and my main function is to get the filename and use it for other purposes like storing it etc.

Can anybody help m,e in the right direction?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 52 guests