Add a video stream

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
ric
Posts: 17
Joined: Wed Nov 16, 2011 4:35 am

Add a video stream

Post by ric »

Good morning. I'm trying to activate a video stream between an Axis IP camera and my iX application. With the developing PC I didn't find any problem, with a Media Element object and this script line:

void Video_Opened(System.Object sender, System.EventArgs e)
{
pbVideo1.Source = new Uri("axrtsphttp://192.168.1.101/mpeg4/media.amp", UriKind.Absolute);
}

Running the application on Windows 7 with iX Developer there's no problem. But when I try to run the application in Windows XP with ix Runtime I don't see anything e the stream doesn't start.

Any suggestion?

Thank's,
Ric

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Add a video stream

Post by Ron L. »

It could be an Ethernet issue connecting from this other PC. Are you able to ping 192.168.1.101?

I would also put a try/catch block around the function call to see what information you can get from the exception. The code looks something like this.

void Video_Opened(System.Object sender, System.EventArgs e)
{
try {
pbVideo1.Source = new Uri("axrtsphttp://192.168.1.101/mpeg4/media.amp", UriKind.Absolute);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

}
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

ric
Posts: 17
Joined: Wed Nov 16, 2011 4:35 am

Re: Add a video stream

Post by ric »

Ok, it wasn't an iX problem but just caused from an old version of Windows Media Player and Axis Media Control.

charlyprouteau
Posts: 33
Joined: Wed Jan 23, 2013 2:01 am

Re: Add a video stream

Post by charlyprouteau »

Dear Sir,
When I try to add the scrip code I have this error message:
"Unable to convert implicitly type 'System.Uri' to 'String'.

Could you explain how solve this error.

thanks for your support.

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Add a video stream

Post by mark.monroe »

System.URI is not supported on WinCE .NET framework. If you are not targeting a Windows PC or TxC, you will get this error. I currently do not know of a way to stream video to the Media player on a WinCE HMI. We are currently trying to find a way.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply