takeSnapshot() causes BSOD ?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
mario123
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2011 16:21

takeSnapshot() causes BSOD ?

Postby mario123 » 15 Mar 2011 14:34

Hi!

I am using VLC version 1.1.7, WinXP, and VS2010. I made a form with the VLC ActiveX on it. Playing avi files works fine. But if I call the takeSnapshot() function after VLC stopped playing an avi, I have a BSOD when I close my form! I tried the same program on an other PC (also WinXP), again the same problem.

Also calling the takeSnapshot() function when VLC is still playing the avi does not work. In this case, VLC shows briefly the location of the snapshot, but at that location, there is no snapshot file!

Does anybody knows how to use this function correctly? Has anyone had success, using the snapshot function with this (or another) version of VLC?

The sourcecode of my form:

Code: Select all

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace VLCActiveXinCS { public partial class Form1 : Form { public Form1() { InitializeComponent(); } delegate void UpdateTextFieldDelegate(String newText); private void UpdateTextField(String someText) { this.tbTime.Text = someText; } private void btnPlay_Click(object sender, EventArgs e) { int item = this.axVLCPlugin21.playlist.add(tbUrl.Text); this.axVLCPlugin21.playlist.playItem(item); } private void axVLCPlugin21_MediaPlayerTimeChanged(object sender, AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEvent e) { this.Invoke(new UpdateTextFieldDelegate(UpdateTextField), Convert.ToString(e.time)); } private void btnTest_Click(object sender, EventArgs e) { double length = this.axVLCPlugin21.input.Length; this.axVLCPlugin21.input.Time = 18000; //double pos = this.axVLCPlugin21.input.Position; //this.axVLCPlugin21.input.Position = 0.5; } private void btnStop_Click(object sender, EventArgs e) { this.axVLCPlugin21.playlist.stop(); } private void btnPauseToggle_Click(object sender, EventArgs e) { this.axVLCPlugin21.playlist.togglePause(); } private void btnSlower_Click(object sender, EventArgs e) { double step = 0.5; if (this.axVLCPlugin21.input.rate > step) { this.axVLCPlugin21.input.rate -= step; } } private void btnFaster_Click(object sender, EventArgs e) { this.axVLCPlugin21.input.rate += 0.5; } private void trackBar1_MouseUp(object sender, MouseEventArgs e) { this.axVLCPlugin21.input.Time = this.trackBar1.Value / 100.0 * 30000.0; } private void Form1_FormClosed(object sender, FormClosedEventArgs e) { } private void btnSnapshot_Click(object sender, EventArgs e) { this.axVLCPlugin21.playlist.togglePause(); AXVLC.IPictureDisp picture = this.axVLCPlugin21.video.takeSnapshot(); this.axVLCPlugin21.playlist.togglePause(); } } }

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests