Page 1 of 1

Vmem broken in RC1

Posted: 16 May 2009 17:37
by Schnittlauch
Hi
I've updatet my libVLC sdk from 0.9.9 to the RC1 Version and suddenly VMEM desn't work for me any more.
Is it broken, are there API changes or is my code simply wrong? :D

Re: Vmem broken in RC1

Posted: 16 May 2009 23:33
by Jean-Baptiste Kempf
There are API changes and vmem still works, can you share your code?

Re: Vmem broken in RC1

Posted: 17 May 2009 02:52
by Schnittlauch
Sure I can show you some important code parts.
But It's written in a language called BlitzMax and its a BASIC dialect.
This code works fine with libVLC 0.9.9

The parameters für the libVLC instance:

Code: Select all

Argument[0] = "-q" Argument[1] = "--plugin-path" Argument[2] = "plugins" Argument[3] = "--ignore-config" Argument[4] = "--vout" Argument[5] = "vmem" Argument[6] = "--vmem-chroma" Argument[7] = "RGBA32" Argument[8] = "--vmem-width" Argument[9] = String(Width) Argument[10] = "--vmem-height" Argument[11] = String(Height) Argument[12] = "--vmem-pitch" Argument[13] = String(Width*4) Argument[14] = "--vmem-lock" Argument[15] = String(Int(Byte Ptr(LockVideo))) Argument[16] = "--vmem-unlock" Argument[17] = String(Int(Byte Ptr(UnlockVideo))) Argument[18] = "--vmem-data" Argument[19] = String(Int(VarPtr(Index)))
And the Lock/Unlock functions:

Code: Select all

Function LockVideo:Byte ptr(Index:Int Ptr) Local Video:TVideo = TVideo(VideoObjects.ValueAtIndex(Index[0])) Return Video._Lock() End Function Function UnlockVideo(Index:Int Ptr) Local Video:TVideo = TVideo(VideoObjects.ValueAtIndex(Index[0])) Video._Unlock() End Function
The whole thing crashes when the LockVideo function is called the first time.

Re: Vmem broken in RC1

Posted: 17 May 2009 08:57
by Rémi Denis-Courmont
RGBA32? That should be either RGBA (R8G8B8A8) or RV32 (R8G8B8 + 8-bits padding).

Re: Vmem broken in RC1

Posted: 17 May 2009 16:41
by Schnittlauch
Okay, I've tryed this. But it still crashes.

I've found out, when I build the Lock function like this,

Code: Select all

void LockVideo(void* Data, void* PixelData)
sometimes it plays a few frames an then it chrashes, or
the crash happens direct after the startup before playing anything.

Windows says the crash appears in "setupapi.dll" and sometimes in "libswscale_plugin.dll".

Update:
I've tryed to play a Video with the VLC Instance Parameters:

Code: Select all

"-q" "--plugin-path" "plugins" "--ignore-config"
And exactly the same happens.
But the video I'am testing with works perfectly in die VLC Player RC1.
And.. my explorer appears to be in an endless loop after a few testings.. :D

Update2:
Okay, problem is solved.
For some reasons it doesn't like when I set the plugin-path.
If I let them away, evrything works fine.