libvlc_new arguments

This forum is about all development around libVLC.
Belbear
Blank Cone
Blank Cone
Posts: 25
Joined: 01 Apr 2010 10:58

libvlc_new arguments

Postby Belbear » 30 Apr 2010 17:32

Now that vlcplayer happily plays video on my Bluefish card, I'm moving up to the next stage: Using libvlc in my MS Visual C++ 6.0 application.

I now rebuilt the 1.2.0-git version from scratch, with the 'bluemotion" video out plugin.

To get my project linked with libvlc I needed to do some modifications to the stdint.h header, since this Microsoft compiler does not understand "long long". I changed that to "__int64"

To link I needed a vlclib.lib file. Renaming the vlclib.dll.a file to vlclib.lib actually linked and at least the libvlc_new function returns a pointer.

I used the sample code at http://wiki.videolan.org/LibVLC_SampleCode_SDL and found something strange:

In all code examples I found, vlc_new appears to require a third parameter of type libvlc_exception_t*
libvlc_exception_t is however not declared. (and not found in any of the headers) All the other libvlc_ types are OK.

In my libvlc.h, libvlc_new is now declared as

Code: Select all

libvlc_new( int argc , const char *const *argv );
Note the absence of the exception parameter.

Is this new to version 1.2.0-git?

This is the code I used, at least vlc_new returns a pointer so it looks good.
The bluemotion module and vbm-instancehdl parameter are specific to my project

Code: Select all

bool CVlcSurface::InitVlcPlayer(int instance) { char InstStr[8]; sprintf(InstStr, "%i", instance); // libvlc_exception_t ex; libvlc_instance_t *libvlc = NULL; libvlc_media_t *Media = NULL; libvlc_media_player_t *MediaPlayer = NULL; char const *vlc_argv[] = { // "-q", "--ignore-config", /* Don't use VLC's config files */ "--plugin-path", "C:\\program files\\VLC\\plugins", "--vout", "bluemotion", "--vbm-instancehdl", InstStr, }; int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); libvlc = libvlc_new(vlc_argc, vlc_argv); if(!libvlc) return false; //TODO: Further libvlc code return true; }

CHR57
New Cone
New Cone
Posts: 1
Joined: 20 May 2010 09:47

Re: libvlc_new arguments

Postby CHR57 » 20 May 2010 09:53

Hi.

How did you get video out on your Bluefish?
Can you post the plugin for that and some info how to use it?

/Chr

jlz
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Jul 2009 12:09

Re: libvlc_new arguments

Postby jlz » 20 May 2010 23:06


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

Re: libvlc_new arguments

Postby Rémi Denis-Courmont » 25 May 2010 18:48

The exception parameter was removed in VLC 1.1.0.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Belbear
Blank Cone
Blank Cone
Posts: 25
Joined: 01 Apr 2010 10:58

Re: libvlc_new arguments

Postby Belbear » 28 Jun 2010 18:07

Hi.

How did you get video out on your Bluefish?
Can you post the plugin for that and some info how to use it?

/Chr
My Bluefish output plugin just passed the proof-of-concept stage, and I had to suspend my VLC project end of may because of other, more urgent needs.

Apart from the VLC plugin (which I will post here when finished), my project consists of a MSVisualC++ class that communicates with the VLC plugin (which I will also post) It is only intended for the MSVC MFC environment, other environments will need modification. Getting rid of CString and other MFC classes.
One also needs to use the Bluefish444 SDK, which is available on the bluefish444.com website.

The rest is my "blueMotion" toolkit: an on-air graphics system with multiple timelines, which is outside the scope of VLC and will not be posted here.
It consists of an MFC control panel, some still-image drawing functions based on the GNU DevIL library, an output thread that calls them and an SDK class that wraps the Bluefish SDK functions and implements the double buffered output. To get it up to full-HD specs the pixel-processing functions need to use multiple threads for parallel processing on a multicore CPU.

However, using the Bluefish444 toolkit you could write your own output routine. VLC can deliver video in a suitable ARGB format. The Bluefish card can output the VLC shared buffer buffer directly towards the DMA output function. (of course without windowing, multiple VLC players on one screen, keyframed animations, transparency etc...)
Eventually even calling Bluefish SDK functions from within the vlc plugin code itself, but for now I will not pursue this path.

In any case, the Bluefish SDK cannot be included with VLC contribs because it's not GNU, so out-of-the-box playout on Bluefish cards is not likely possible.

My most important TODO's are:
-Outputting embedded audio from VLC on the new Epoch range of cards (Just received them). This will require writing a VLC audio output plugin as well.

-Using LibVLC out-of-process. My VLC plugin is already suited for this (vmem is not!), but calling LibVLC functions directly causes vlc to run in the same process as BlueMotion, which is wrecking running animations when vlc loads and starts a new file. While stuttering is taken for granted in a multimedia-PC environment, it is unacceptable for on-air graphics. When I run VLC in its own graphic window (definitely out of process) I have no stutter problems.

-Synchronising VLC's playback (of videos with suitable framerate) to output synch, a.k.a. genlocking. Will probably require a ring-buffer and some co-operation from the Videolan gurus as well. Creating additional lip-sync problems for audio as well.

laszloj
New Cone
New Cone
Posts: 9
Joined: 28 Jun 2010 10:04

Re: libvlc_new arguments

Postby laszloj » 29 Jun 2010 17:04

Hi Belbear,

I am kinda new to vlc, but I think the best way to get pcm audio data from the video is using smem module. This module can provide you the video data as well, but seems, you already solved that. I've just spent a couple of days to discover how it works, as no one explained. See my post about using smem. Might be useful for you too.

Jozsef

Mudassar
New Cone
New Cone
Posts: 8
Joined: 17 Mar 2009 18:06

Re: libvlc_new arguments

Postby Mudassar » 20 Sep 2010 15:22

Hi, Jozef,,

I want to read live audio data from a floating point array into libvlc, and then multiplex it with an rtsp video stream. Can you help me how Can I read audio from memory using imem option in C

Regards

Mudassar


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests