Page 1 of 1

VLC C# Frontend - Some Coding Issues

Posted: 08 Jun 2008 12:45
by Marx
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.

Re: VLC C# Frontend - Some Coding Issues

Posted: 08 Jun 2008 19:02
by Marx
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)?

Re: VLC C# Frontend - Some Coding Issues

Posted: 08 Jun 2008 20:44
by Jean-Baptiste Kempf
1/ Use the new API.
2/ Send your questions to pdherbemont@ (this domain).org

Re: VLC C# Frontend - Some Coding Issues

Posted: 09 Jun 2008 10:03
by Marx
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?

Re: VLC C# Frontend - Some Coding Issues

Posted: 10 Jun 2008 02:19
by Marx
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.