VLC C# Frontend - Some Coding Issues

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Marx
Blank Cone
Blank Cone
Posts: 21
Joined: 08 Jun 2008 12:17

VLC C# Frontend - Some Coding Issues

Postby Marx » 08 Jun 2008 12:45

I have been writing a C# front-end for VLC and its about 90% finished now. Everything works, but I have a few outstanding issues that need to be resolved. This frontend will be GPL'ed as soon as I get this finished. Hopefully, that will be this week.

1. When playing an MP3 file, or DVD, VLC_LengthGet returns zero. If I play an avi, wmv, etc., it returns the length of the media. How can I obtain the length of the media in a consistent fashion?

2. How would I obtain a playlist for a CD (cdda://)?

3. How would I obtain the Titles, Chapters for a DVD (dvd://, dvdsimple://)?

4. From either list, in points 2 and 3, how do I control which item in the playlist to play (VLC_Play does not allow me to pass any index)?

5. What function exposes the 'Next Chapter' control (note: not next in playlist)?

Please remember that I'm using InterOp, so any info on types would be appreciated.

Marx
Blank Cone
Blank Cone
Posts: 21
Joined: 08 Jun 2008 12:17

Re: VLC C# Frontend - Some Coding Issues

Postby Marx » 08 Jun 2008 19:02

To save everyone the trouble, I have found the source of this issue. I've been using the libVLC_old API and its not feature complete. I've begun working on a DLL that performs InterOp with the new API. This seems to be coming along smoothly enough and should only add a few days to development.

So, until I get a chance to test this, I don't know if the proper length is reported. Answers to the other questions would help speed up integration of the frontend with the new API:

1. How would I obtain a playlist for a CD (cdda://)?
2. How would I obtain the Titles, Chapters for a DVD (dvd://, dvdsimple://)?
3. From either list, in points 2 and 3, how do I control which item in the playlist to play (VLC_Play does not allow me to pass any index)?
4. What function exposes the 'Next Chapter' control (note: not next in playlist)?

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: VLC C# Frontend - Some Coding Issues

Postby Jean-Baptiste Kempf » 08 Jun 2008 20:44

1/ Use the new API.
2/ Send your questions to pdherbemont@ (this domain).org
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.

Marx
Blank Cone
Blank Cone
Posts: 21
Joined: 08 Jun 2008 12:17

Re: VLC C# Frontend - Some Coding Issues

Postby Marx » 09 Jun 2008 10:03

Cheers J-B.

I just downloaded the nightly build and I've managed to get a screen up and running with the new API. I've tried attaching the video to a different window using libvlc_media_player_set_drawable. It doesn't appear to be functioning. I've passed through an int, IntPtr and even setup a libvlc_drawable_t type. Its just not doing anything with the handle.

Has this function been implemented, or is a stub?

Marx
Blank Cone
Blank Cone
Posts: 21
Joined: 08 Jun 2008 12:17

Re: VLC C# Frontend - Some Coding Issues

Postby Marx » 10 Jun 2008 02:19

For anyone else having issues with this, it appears that the trunk tutorial is incorrect, or refers to yet-to-be-implemented code.

http://wiki.videolan.org/LibVLC_Tutorial

Rather than using libvlc_media_player_set_drawable to set the video output window, use libvlc_video_set_parent and pass it a handle.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 20 guests