im having trouble taking snapshots , im using VLC1.1.4 in a winform C# app. Everyting works great except for libvlc_video_take_snapshot. when i ask for a snapshot nothring happenes :
code:
Code: Select all
[DllImport("libvlc")]
internal static extern void libvlc_video_take_snapshot(IntPtr p_media_player, [MarshalAs(UnmanagedType.LPStr)] string psz_filepath, uint i_width, uint i_height);
Code: Select all
public void TakeSnapShot(String file, int width, int height)
{
uint width_1 = (uint)width;
uint height_1 = (uint)height;
LibVlc.libvlc_video_take_snapshot(Handle, file, width_1, height_1);
}
public int Height
{
get
{
int rtn = LibVlc.libvlc_video_get_height(Handle);
return rtn;
}
}
public int Width
{
get
{
int rtn = LibVlc.libvlc_video_get_width(Handle);
return rtn;
}
}
so when i click to take a snapshot ..
Code: Select all
private void toolStripButton4_Click(object sender, EventArgs e)
{
TakeSnapShot("photo.png",Width,Height);
//also tried "C:\\snapshotFolders\\photo.png"
// tried having Width and Height set to equal "0" as a default
}
my args are:
Code: Select all
args = new string[] {
"-I", "dummy", "--ignore-config",
@"--plugin-path=C:\Users\bin\Debug\plugins"};