使用 Expression Encoder 4 SDK 检索 DV 摄像机信息

发布于 2024-09-28 14:32:51 字数 1025 浏览 0 评论 0原文

我正在 .NET Framework 4.0 中开发一个 Windows 窗体应用程序,该应用程序使用 Expression Encoder 4 SDK 控制 DV-CAM。过去我使用 Windows Media Encoder 来实现此目的,但我想升级到 Expression Encoder,因为它看起来更可靠。

总体而言,该 SDK 运行良好,我可以使用 LiveDeviceSource 和 LiveJob 控制和查看 DV-CAM 视频。但似乎缺少一些功能(或者我只是找不到它们)。我使用以下代码设置与 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);
}

一切正常。但我似乎无法找到 DV-CAM 的当前帧速率和当前状态。我可以通过使用以下方法获得总帧速率:

_source.SourcePropertiesSnapshot().TotalFrames;

但即使 DV-CAM 暂停,该帧速率也会不断增加。所以我有以下问题:

  • 如何获取 DV-CAM 的当前帧位置?

  • 如何获取 DV-CAM 的当前状态(播放/暂停/磁带结束等)?

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文