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
Add a video stream
Re: Add a video stream
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);
}
}
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
Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer
Re: Add a video stream
Ok, it wasn't an iX problem but just caused from an old version of Windows Media Player and Axis Media Control.
-
- Posts: 33
- Joined: Wed Jan 23, 2013 2:01 am
Re: Add a video stream
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.
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.
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Add a video stream
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
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer