I am developing a Windows Forms application in .NET Framework 4.0 which controls a DV-CAM using the Expression Encoder 4 SDK. In the past I used Windows Media Encoder for this, but I would like to upgrade to Expression Encoder, because it seems a lot more solid.
Overall, the SDK is working great, I can control and view the DV-CAM video using a LiveDeviceSource and LiveJob. But it seems a few features are missing (or I just can't find them). I use the following code to setup the connection with the DV-CAM:
HandleRef handleRef = new HandleRef(videoPanel, videoPanel.Handle);
_preview = new PreviewWindow(handleRef);
_job = new LiveJob();
Collection devices = EncoderDevices.FindDevices(EncoderDeviceType.Video);
if (devices.Count > 0)
_device = devices[0];
if (_device != null)
{
_source = _job.AddDeviceSource(_device, _device); // init a LiveDeviceSource
_source.PreviewWindow = _preview;
_job.ActivateSource(_source);
}
This all works fine. But I can't seem to find the current framerate and current status of the DV-CAM. I can get the total framerates by using:
_source.SourcePropertiesSnapshot().TotalFrames;
But this will keep increasing, even when the DV-CAM is paused. So I have the following questions:
How can I get the current frame position of the DV-CAM?
How can I get the current status (Playing/Paused/End of Tape etc) of the DV-CAM?
Thanks!