Page 1 of 1

vmem output in 1.1.4

Posted: 21 Sep 2010 15:12
by alb84
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();

Re: vmem output in 1.1.4

Posted: 21 Sep 2010 19:11
by Rémi Denis-Courmont
vmem-lock, vmem-unlock and vmem-data have been removed. Passing pointers as command line parameters made absolutely no sense.

Re: vmem output in 1.1.4

Posted: 24 Sep 2010 12:07
by alb84
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 ?

Re: vmem output in 1.1.4

Posted: 29 Sep 2010 06:06
by Rémi Denis-Courmont
libvlc_video_set_callbacks()