Image capture

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
DMora
New Cone
New Cone
Posts: 2
Joined: 28 Feb 2007 18:34

Image capture

Postby DMora » 28 Feb 2007 19:12

Hello all,

We want to use VCL player in a C++ Builder project to make video processing. We are trying it using the ActiveX component, but we need to capture single frames into memory. Which is not being simple...

The snapshot function (not available in activeX) only sends the image to a file. Does anyone have any idea how can we capture single frames using the ActiveX component or using the VCL DLL to a Picture GUI component?

Thanks for help,
Andre Mora

DMora
New Cone
New Cone
Posts: 2
Joined: 28 Feb 2007 18:34

Postby DMora » 28 Feb 2007 20:59

It is probably important to say that we are using DVDs.
Andre Mora

matt271
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Mar 2007 09:19

Postby matt271 » 10 Apr 2007 07:44

i been trying to do this also. let me know if you have any success.

cmacholz
New Cone
New Cone
Posts: 4
Joined: 18 Jul 2007 21:43

Re: Image capture

Postby cmacholz » 19 Jul 2007 19:20

I also need this functionality. Haven't found a solution so far.

andreaplanet
New Cone
New Cone
Posts: 2
Joined: 04 Aug 2007 22:21

Re: Image capture

Postby andreaplanet » 04 Aug 2007 22:39

I also need this functionality. I'm available to write some code for VLC if someone give me a suggestions for the right path...
I just need to export some frames to a file.

cmacholz
New Cone
New Cone
Posts: 4
Joined: 18 Jul 2007 21:43

Re: Image capture

Postby cmacholz » 17 Aug 2007 18:13

Add this code to the NativeLibVLC.cs

Works for *.jpg or *.png file names. I found that the jpg are not created correctly, but most image viewers can render it correctly.

//Craig added 7/19/2007
public bool SaveCurrentView(string file)
{
bool worked = false;
try
{
using (VlcPlaylistObject vpobj = new VlcPlaylistObject(this.vlcHandle))
{
if (vpobj.SubObject != IntPtr.Zero)
{
IntPtr p_input = libvlc_playlist_get_input(ref vpobj.libvlc, ref vpobj.exception);
if (vpobj.exception.WasExceptionRaised())
{
this.lastErrorMessage = Marshal.PtrToStringAnsi(vpobj.exception.psz_message);
}
else
{
try
{
libvlc_video_take_snapshot(p_input, file, ref vpobj.exception);
if (!vpobj.exception.WasExceptionRaised())
{
worked = true;
}
else
{
worked = false;
}
}
finally
{
libvlc_input_free(p_input);
}
}
}
}
}
catch (Exception ex)
{
this.lastErrorMessage = ex.Message;
}
return worked;

}


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 1 guest