COMException in C#.NET application

All the issues related to streaming of recorded media.

COMException in C#.NET application

Postby csw1234 » Tue Nov 25, 2014 6:25 am


I have downloaded the SDK and am referencing the UMediaServer.exe which give me access to the UMEDIASERVERLib namespace and allows me to create a object of type IMPEG2TSBroadcastTrigger.

This all seems fine but when I try to run the application I get the following error:

Error HRESULT E_FAIL has been returned from a call to a COM component.

I am using the following code:

IMPEG2TSBroadcastTrigger t = new MPEG2TSBroadcastTrigger();
string psItem, psAddress;
t.IsBroadcasting("MediaRoot/test.avi", out psItem, out psAddress);
Console.WriteLine(psItem + " " + psAddress);

Does anyone know how to fix this?
Posts: 0
Joined: Tue Nov 25, 2014 6:19 am

Re: COMException in C#.NET application

Postby admin » Tue Nov 25, 2014 2:14 pm

If you get E_FAIL, that means no file from this folder is currently being MPEG2-TS broadcasted.

And this call is for folder, not for file; the correct way is:
IsBroadcasting("MediaRoot", out psItem, out psAddress);

If some file is being MPEG2-TS broadcasted, this method will succeed and you will have psItem and psAddress filled.
Site Admin
Posts: 1038
Joined: Fri Aug 21, 2009 10:13 am

Return to Streaming Files

Who is online

Users browsing this forum: No registered users and 1 guest