简体   繁体   English

Window Media Encoder 9.0系列的点网应用程序中的PrepareToEncode()方法引发异常。

[英]PrepareToEncode() method in dot net application with Window Media Encoder 9.0 series raising exception.

I am getting the ArgumentException:"Parameter is incorrect." 我收到ArgumentException:“参数不正确。” when I call a method "PrepareToEncode()" in an application. 当我在应用程序中调用方法“ PrepareToEncode()”时。

I am using... Windows Media Encoder 9 series with Visual Basics Dot Net Framework version 2.0. 我正在使用... Windows Media Encoder 9系列,带有Visual Basics Dot Net Framework 2.0版。

I am actually upgrading the application to newer framework but before that I have to run the older version just to know what is going on. 我实际上是在将应用程序升级到较新的框架,但在此之前,我必须运行较旧的版本才能知道发生了什么。 Older version of the application was not done by me so, I can't tell exactly what is going on. 我没有完成旧版本的应用程序,所以我无法确切知道发生了什么。 To add to that, I work on C# but the whole code is in VB.net. 除此之外,我在C#上工作,但是整个代码在VB.net中。 When I was building the solution it threw above mentioned exception. 当我构建解决方案时,它抛出了上述异常。

Now I think that I should read the proper documentation on the method so I can work my way from there. 现在,我认为我应该阅读有关该方法的正确文档,以便从那里开始工作。 I searched on internet but none of the results are of any help to me. 我在互联网上搜索,但没有任何结果对我有帮助。

Can anybody explain to me what is actual use of PrepareToEncode() method and the Exception. 谁能向我解释PrepareToEncode()方法和Exception的实际用法。 Just a little direction would suffice.(I just need to know if it was you, where, when and how would you use that "PrepareToEncode" method?) 一个简单的方向就足够了。(我只需要知道这是不是您,在什么地方,何时以及如何使用“ PrepareToEncode”方法?)

Thanks. 谢谢。 Regards. 问候。

PrepareToEncode must to have before the calling start recording .Can't attach or start the preview until the containers are ready start the camera. 呼叫开始录制前必须具有PrepareToEncode。在容器准备好启动照相机之前,无法附加或开始预览。

Usage is as follows: oEncoder.PrepareToEncode(True) 用法如下: oEncoder.PrepareToEncode(True)

PrepareToEncode is used to verify that the encoder is configured correctly before calling the Start method. PrepareToEncode用于在调用Start方法之前验证编码器是否已正确配置。 It checks that the port you have specified for broadcasting is available (for live streams), that the devices in a source are available and ready to start, etc. It is also used to prepare a source before switching to it to minimize delays when the switch actually occurs. 它会检查您指定用于广播的端口是否可用(用于实时流),源中的设备是否可用并可以启动等。它还用于在切换到源之前准备源,以最大程度地减少延迟时间。实际发生切换。

"Parameter is incorrect" indicates that to some method was of the wrong type. “参数不正确”表示某种方法的类型错误。 If you see that when you set PrepareToEncode, it means that a method used by that property was given an object of the wrong type, probably because some required setting is missing, or is set with a value that does not make sense in the context of what you are trying to do. 如果您看到在设置PrepareToEncode时表示该属性使用的方法的对象类型错误,可能是因为缺少某些必需的设置,或者设置了在上下文中没有意义的值您正在尝试做什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM