vmem output in 1.1.4

This forum is about all development around libVLC.
alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

vmem output in 1.1.4

Postby alb84 » 21 Sep 2010 15:12

I've tried to update my project with libvlc 1.1.4 but I noticed some of the basic high level api for setting up the VLC instance have changed.

I followed the new sample code at http://wiki.videolan.org/LibVLC_Tutorial

Is it necessary to define the media and then the media player or I can create a media player and then associate a media to it as in the old version?

I used libvlc_media_add_option to set up the vmem output, but now it does not work any longer, is there something to change to enable vmem with 1.1.4?
If it has already been covered in another thread or tutorial could you please give me the link?

This is the old code I used to set up vmem, now it does not crash but all I see is black

Code: Select all

sprintf( clock, ":vmem-lock=%lld", (long long int)(intptr_t)lock ); sprintf( cunlock, ":vmem-unlock=%lld", (long long int)(intptr_t)unlock ); sprintf( cdata, ":vmem-data=%lld", (long long int)(intptr_t)ctx ); sprintf( width, ":vmem-width=%i", VIDEO_WIDTH ); sprintf( height, ":vmem-height=%i", VIDEO_HEIGHT ); sprintf( chroma, ":vmem-chroma=%s", "RV32" ); sprintf( pitch, ":vmem-pitch=%i", VIDEO_WIDTH * 4 ); // List of options char const* media_options[] = { ":vout=vmem", width, height, chroma, pitch, clock, cunlock, cdata }; int media_options_size = sizeof( media_options ) / sizeof( *media_options ); // Adding each option from the array to the media for ( int i = 0; i < media_options_size; ++i ) { libvlc_media_add_option( m_vlcMedia, media_options[i], &m_ex ); catchException(); } // Put the media into the mediaplayer libvlc_media_player_set_media( m_vlcMediaplayer, m_vlcMedia, &m_ex ); catchException();

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

Re: vmem output in 1.1.4

Postby Rémi Denis-Courmont » 21 Sep 2010 19:11

vmem-lock, vmem-unlock and vmem-data have been removed. Passing pointers as command line parameters made absolutely no sense.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

Re: vmem output in 1.1.4

Postby alb84 » 24 Sep 2010 12:07

So is there a way for setting the pointers of the callback functions in the new version?
Is there any working example code for vmem output using 1.1.4 ?

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

Re: vmem output in 1.1.4

Postby Rémi Denis-Courmont » 29 Sep 2010 06:06

libvlc_video_set_callbacks()
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 27 guests