I'm new into ONVIF. I made connection with camera's webservice and I can ask for some data from camera ( I used method described here : ONVIF Authentication in .NET 4.0 with Visual Studios 2010 ) . I also can ask for information from Media webservice. Unfortunately when I call GetOSDs() or CreateOSD() methods I get "Optional Action Not Implemented" exception. GetVideoSourceConfigurations() method is working so I assume that my handler to Media webservice is OK and those methods are really not implemented, but in desktop software provided with camera by manufacter I can modify OSDs so that application somehow receive this data, so maybe I'm doing something wrong. My code:
EndpointAddress serviceAddress = new EndpointAddress("http://192.168.1.64/onvif/device_service");
EndpointAddress mediaAddress = new EndpointAddress("http://192.168.1.64/onvif/Media");
HttpTransportBindingElement httpBinding = new HttpTransportBindingElement();
httpBinding.AuthenticationScheme = AuthenticationSchemes.Digest;
var messegeElement = new TextMessageEncodingBindingElement();
messegeElement.MessageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap12, AddressingVersion.None);
CustomBinding bind = new CustomBinding(messegeElement, httpBinding);
// Add our custom behavior - this require the Microsoft WSE 3.0 SDK
PasswordDigestBehavior behavior = new PasswordDigestBehavior("admin", "12345");
MediaClient media = new MediaClient(bind, mediaAddress);
DeviceClient client = new DeviceClient(bind, serviceAddress);
client.Endpoint.Behaviors.Add(behavior);
media.Endpoint.Behaviors.Add(behavior);
// We can now ask informations
var date = client.GetSystemDateAndTime(); // OK
var configs = media.GetVideoSourceConfigurations(); // OK
var osds = media.GetOSDs(configs.ElementAt(0).token); // exception Optional Method Not Implemented
var osds2 = media.GetOSDs(""); // exception Optional Method Not Implemented
My goal is to programmatically set some overlay text on screen every 2 seconds. It can be OSD, it can be name, but it must be later visible on record. Any ideas?