C# Wrapper for libvlc 0.9.0 - Testers Required

This forum is about all development around libVLC.
enrike
New Cone
New Cone
Posts: 7
Joined: 15 Apr 2009 13:48

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby enrike » 16 Apr 2009 14:25

thanks, i just arrived here yesterday and it is such a long topic that i find it difficult to get my head around all the possibilities and different techniques.

i took the code from the page 2 now and updated my code. still get the same exception :

A first chance exception of type 'System.AccessViolationException' occurred in Marx_libvlc_wrapper.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

this time it comes from this line
libvlc_media_player.video_set_parent(libvlc_core.Handle, pictureBox1.Handle, ref ex);

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby tamiro44 » 16 Apr 2009 15:42

make sure that near to the EXE:
1. libvlc.dll
2. libvlccore.dll
3. plugins folder

enrike
New Cone
New Cone
Posts: 7
Joined: 15 Apr 2009 13:48

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby enrike » 17 Apr 2009 08:00

all are included in the Debug folder next to the exe. they are from version vlc-0.9.9-win32 and i am running Windows Vista Service pack 1

alirezanoori
New Cone
New Cone
Posts: 5
Joined: 28 Apr 2009 23:44

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby alirezanoori » 28 Apr 2009 23:48

I tried to run the wrapper test but I couldn't do it.
Am I doing something wrong? I copied libvlc.dll and plugins folder to debug folder, then ran the program.
Here's the output from console window:
-I: unknown option or missing mandatory argument `--ignore-config'
Try `-I --help' for more information.
The command line options couldn't be loaded, check that they are valid.

Press the RETURN key to continue...


Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry
point named 'libvlc_media_new' in DLL 'libvlc'.
at Marx_libvlc_wrapper.Marx_libvlc_media.libvlc_media_new(Marx_libvlc_core_ha
ndle libvlc_core_handle, String mri, libvlc_exception_struct& ex)
at Marx_libvlc_wrapper.Marx_libvlc_media..ctor(Marx_libvlc_core_handle libvlc
_core_handle, String filename, libvlc_exception_struct& ex) in H:\My Files\Data\
My Documents\Downloads\Marx_libvlc_wrapper\Marx_libvlc_wrapper\Marx_libvlc_media
.cs:line 79
at Marx_libvlc_wrapper_test.Program.Main(String[] args) in H:\My Files\Data\M
y Documents\Downloads\Marx_libvlc_wrapper\Marx_libvlc_wrapper_test\Program.cs:li
ne 51
Press any key to continue . . .

oppio
New Cone
New Cone
Posts: 4
Joined: 05 May 2009 16:31

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby oppio » 05 May 2009 16:35

Hi all,

I just found this topic about Marx's C# wrapper, I'd like to know what's the highest version of VLC can be used with the wrapper.

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby tamiro44 » 05 May 2009 17:02

I'm using 0.9.8a (I think 0.9.9 is good also)

alirezanoori
New Cone
New Cone
Posts: 5
Joined: 28 Apr 2009 23:44

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby alirezanoori » 17 May 2009 21:26

Can anyone please answer my question?

David_Libido
New Cone
New Cone
Posts: 1
Joined: 09 Jun 2009 11:32

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby David_Libido » 09 Jun 2009 11:42

Hi, I'm kinda new to VLC developing, but this wrapper seems promising. I downloaded a sample project, but when I start it I just keep getting this errro:
"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
I already checked some thinsgs mentioned in this thread, and the files libvlc.dll, libvlccore.dll and plugins folder are there. How do I get this to work?

tsikiksr
New Cone
New Cone
Posts: 3
Joined: 11 Jun 2009 15:40

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby tsikiksr » 11 Jun 2009 16:18

Hi.
I'm trying to make a module that will read the stream STATISTICS (frames received, bitrate, etc.) from libvlc.dll
Does anyone know a way to do this?

Thanks

drewdb
New Cone
New Cone
Posts: 8
Joined: 09 Jan 2009 08:53

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby drewdb » 12 Jun 2009 01:01

Has anyone found a solution for the "Read/Write Protected Memory" error when using with Vista.

I have been using this wrapper quite successfully in XP for some time now and have changed to Vista. For some reason there is the Protected Memory error when trying to set_parent. I don't understand the difference between XP and Vista that should cause this.

I think from reading here, a few people are finding the same.

Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby Jeremiah » 12 Jun 2009 02:32

when trying to set_parent.
try to use set_drawable

drewdb
New Cone
New Cone
Posts: 8
Joined: 09 Jan 2009 08:53

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby drewdb » 12 Jun 2009 04:03

Thanks for that but set_drawable just opens a window to show the video rather than rendering it on my picturebox.

drewdb
New Cone
New Cone
Posts: 8
Joined: 09 Jan 2009 08:53

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby drewdb » 12 Jun 2009 04:35

Just worked out that if i have set_drawable before play, all is good. works on vista now. thanks

socialjazz
Blank Cone
Blank Cone
Posts: 17
Joined: 19 May 2009 09:14

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby socialjazz » 19 Jun 2009 12:29

Hi,

where can i download your code and do a test on it?
i assueme your code works on all version of 0.9.x

Snotface
New Cone
New Cone
Posts: 1
Joined: 24 Jun 2009 16:01

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby Snotface » 24 Jun 2009 16:10

Hi,

i've been experiencing the same problem as drewdb, except i am not trying to play video, merely MP3s, so there is no drawable surface per say.
It runs perfectly under XP, but as soon as i switch to Vista 32 or 64, i also get the protected memory problem.
Please help. The code is included below, it is failing as soon as i call audio_set_track. Exception is <Input is Null>, but everything is populated and it works on XP:

Code: Select all

// Create new libvlc instance, media instance from file and media player instance from media string[] argv = new string[] { "--no-video-title-show" }; ex = new libvlc_exception_struct(); exClass = new Marx_libvlc_exception(ref ex); libvlc_core = new Marx_libvlc_core(argv, ref ex); libvlc_media = new Marx_libvlc_media(libvlc_core.Handle, link, ref ex); libvlc_media_player = new Marx_libvlc_media_player(libvlc_media.Handle, ref ex); // Dispose of media Handle libvlc_media.Handle.Dispose(); libvlc_media = null; try { libvlc_media_player.audio_set_track(libvlc_media_player.Handle, 1, ref ex); //<====== FAILS HERE. Vista only. } catch { throw new Exception(exClass.get_message(ref ex)); } try { libvlc_media_player.play(ref ex); SetStatus(PlayerStatus.Playing); _positionTimer.Enabled = true; } catch { throw new Exception(exClass.get_message(ref ex)); }
Thanks

charlest
Blank Cone
Blank Cone
Posts: 51
Joined: 24 May 2007 13:28
Location: Sydney, Australia

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby charlest » 21 Jul 2009 03:14

Hi,
Does anyone know what is the correct way to retrieve the current video frame in a bitmap object?

t.goral
New Cone
New Cone
Posts: 2
Joined: 14 Aug 2009 12:24

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby t.goral » 14 Aug 2009 12:33

Hi,

How to propely use the --mem-data in the VB.net to get bitmap?

Code: Select all

Dim m_standardArgs As New ArrayList(New String() {"--ignore-config", "--no-video-title-show", _ "--vout", "vmem", _ "--vmem-width", "720", _ "--vmem-height", "576", _ "--vmem-pitch", "2880", _ "--vmem-chroma", "RV32", _ "--vmem-lock", Marshal.GetFunctionPointerForDelegate(delegate_dolock1).ToInt32.ToString, _ "--vmem-unlock", Marshal.GetFunctionPointerForDelegate(delegate_unlock1).ToInt32.ToString, _ "--vmem-data", ctx_ptr.ToInt32.ToString, _ "--no-plugins-cache", "--plugin-path", dllInstallDirectory & "\plugins"})
Is this the code is correct ?, because the function dolock does not receive anything.

{Edit, 2009.08.24}

Found error, i forgot put "--" befor vmem-lock and vmem-unlock, now everything is ok.

I created a small test program it's working, but after copying wrapper to a large program, does not receive data from vlc, why?

arun_ncce
New Cone
New Cone
Posts: 6
Joined: 14 Sep 2009 06:02

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby arun_ncce » 14 Sep 2009 06:24

Hi All

I am new to this forum. I am developing the application related to streaming and fortunately i found this forum. I download the wrapper code and tried to run it.
But unfortunately it is giving me exception related to:

libvlc_exception_init(ref ex); in Marx_libvlc_wrapper project.

does anybody faced same issue. I just downloaded the project and ran that. can any body suggest me what should is the workaround for this exception.

I really appreciate any response.
Thanks
Arun Mittal

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby tamiro44 » 14 Sep 2009 07:50

Put plugins folder next to EXE

K Prasad Rao
New Cone
New Cone
Posts: 2
Joined: 15 Sep 2009 13:13

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby K Prasad Rao » 15 Sep 2009 14:08

charlest,

To get a frame use

VLC_PUBLIC_API mediacontrol_RGBPicture *
mediacontrol_snapshot( mediacontrol_Instance *self,
const mediacontrol_Position *a_position,
mediacontrol_Exception *exception );

which is declared in mediacontrols.h

You will have to implement interop for few structures mediacontrol_RGBPicture, mediacontrol_Position , mediacontrol_Exception and few methods before you can call it. It will give you data in PNG format but it castable to Bitmap and Image Object in C#.

Regards,
K. Prasad Rao

navidinline
New Cone
New Cone
Posts: 2
Joined: 14 May 2009 17:55

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby navidinline » 23 Sep 2009 17:40

Hello guys
I have some problem using the Marx c# wrapper for libvlc.
I want to add the subtitle on the movies, but when the movie is rendered the subtitles always are in a fixed mode(e.g the color font is always black). I added this line in the argv ("--freetype-color=<string>") to have more colors, but the subtitle font color is still Black.
I also render the movies in "--vout", "vmem".
A strange result is this: when I render the movie in "--vout", "directx" instead of "--vout", "vmem" the problem is resolved.
Would you mind helping me guys?
Thank you in advance for your attention.

arun_ncce
New Cone
New Cone
Posts: 6
Joined: 14 Sep 2009 06:02

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby arun_ncce » 27 Sep 2009 20:50

Hi

I am trying to build the code in suse linux and Ubuntu but i am getting error in both systems.

In suse linux when i typed ./bootstrap then it gave me following error


configure.ac:5390: warning: macro `AM_PATH_LIBGCRYPT' not found in library
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
Putting files in AC_CONFIG_AUX_DIR, `autotools'.
configure.ac:5390: warning: macro `AM_PATH_LIBGCRYPT' not found in library
autoreconf: running: /usr/local/bin/autoconf --include=m4 --force
configure.ac:1: error: possibly undefined macro: dnl
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:11: error: possibly undefined macro: AC_SUBST
configure.ac:34: error: possibly undefined macro: AS_IF
configure.ac:52: error: possibly undefined macro: AC_ARG_ENABLE
configure.ac:56: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:76: error: possibly undefined macro: AC_DEFINE
configure.ac:103: error: possibly undefined macro: AS_HELP_STRING
configure.ac:134: error: possibly undefined macro: AC_MSG_WARN
configure.ac:308: error: possibly undefined macro: AC_TRY_LINK
configure.ac:482: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:491: error: possibly undefined macro: AC_CACHE_CHECK
configure.ac:583: error: possibly undefined macro: AC_CHECK_HEADERS
configure.ac:2254: error: possibly undefined macro: AC_PATH_PROG
configure.ac:5051: error: possibly undefined macro: AC_PATH_PROGS
configure.ac:5390: error: possibly undefined macro: AM_PATH_LIBGCRYPT
autoreconf: /usr/local/bin/autoconf failed with exit status: 1

and something similar kind of error comes in ubuntu as well. I will post that error as well.

Please let me know if somebody faced this kind of issue.
I will really appreciate.
Thanks

Arun Mittal

arun_ncce
New Cone
New Cone
Posts: 6
Joined: 14 Sep 2009 06:02

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby arun_ncce » 27 Sep 2009 21:19

Hi Guys

I have one more question and that can be stupid.

On the website it was written VLC uses gcc, automake, autoconf and friends for compilation

is friends some kind of plugin , if yes can somebody post a link to download that.

Thanks

Arun Mittal

arun_ncce
New Cone
New Cone
Posts: 6
Joined: 14 Sep 2009 06:02

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby arun_ncce » 28 Sep 2009 00:07

Hi Guys

I tried to build it in Ubuntu as well but it is giving same errors.

I will really appreciate if somebody helps me to solve this.

Thanks

Arun Mittal

roco4444
New Cone
New Cone
Posts: 1
Joined: 08 Oct 2009 22:50

Re: C# Wrapper for libvlc 0.9.0 - Testers Required

Postby roco4444 » 08 Oct 2009 23:01

Charles

Could you resolve this problem
To help you, we need messages, to completely understand what your problems is.
To fix this, please be sure before you start the playback to:
  1. Open: Tools -> Messages.
  2. Set Verbosity to 2
  3. Start playback to reproduce your issue
  4. Save text in a file or copy into clipboard
  5. Then paste the full resulting log here between [​code]and[​/code] (or use Pastebin.com if it's too long)
Also don't forget to name your Operating System and provide the VLC media player version.
if you do, please send me the code
thanks!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests