本文介绍了Encoder 3来自windows服务的实时编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用编码器3 SDK从Windows服务编码和广播实时视频?启动我的服务时出现以下错误。我正在运行该服务作为本地系统,我已经尝试允许它与桌面交互无济于事。任何其他进程绝对不会使用视频设备。我可以作为控制台应用程序运行该服务,一切正常。谢谢。

服务无法启动。 Microsoft.Expression.Encoder.SystemErrorException:无法创建设备。该设备可能正被另一个程序使用。 ---> System.Runtime.InteropServices.COMException(0x813A000D):来自HRESULT的异常:0x813A000D


在System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)

$ b在MS的ThrowHRESULT(Int32 hr)


的System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)


的$ b

。在MS.Internal.Expression.Encoder.Live.LiveEncode.AddDeviceSource(LiveDevice videoDevice,LiveDevice audioDevice)中的Internal.Expression.Encoder.Live.LiveEncode.CreateTimelineSegments()



at Microsoft.Expression.Encoder.Live.LiveJob.AddDeviceSource(LiveDevice videoDevice,LiveDevice audioDevice)


---内部异常堆栈跟踪结束---


at Microsoft.Expression.Encoder.Live.LiveJob.AddDeviceSource(LiveDevice videoDevice,LiveDevice audioDevice)



解决方案

Is it possible to encode and broadcast live video from a windows service using the encoder 3 SDK?  I'm getting the following error starting up my service.  I'm running the service as Local System and I've tried allowing it to interact with the desktop to no avail.  The video device is definitely not in use by any other process.  I can run the service as a console app and everything works fine.  Thanks.

Service cannot be started. Microsoft.Expression.Encoder.SystemErrorException: Cannot create device. The device may be in use by another program. ---> System.Runtime.InteropServices.COMException (0x813A000D): Exception from HRESULT: 0x813A000D

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)

at ThrowHRESULT(Int32 hr)

at MS.Internal.Expression.Encoder.Live.LiveEncode.CreateTimelineSegments()

at MS.Internal.Expression.Encoder.Live.LiveEncode.AddDeviceSource(LiveDevice videoDevice, LiveDevice audioDevice)

at Microsoft.Expression.Encoder.Live.LiveJob.AddDeviceSource(LiveDevice videoDevice, LiveDevice audioDevice)

--- End of inner exception stack trace ---

at Microsoft.Expression.Encoder.Live.LiveJob.AddDeviceSource(LiveDevice videoDevice, LiveDevice audioDevice)

 

解决方案


这篇关于Encoder 3来自windows服务的实时编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 11:55