i'm developing software to display ip camera "Acti", i tried to use axnvUnifiedControl but i cannot find any information about it.
my goal is to connect to the camera using IP, username, and password and display the camera image in windows form.
i'm using c# .net 4.0
This can be done using the following code snippet:
First you should reference the OCX in your toolbox, and drag it to your form. but i tried to use it in design mode, but the VS is hang and force close.
camMedia.MediaSource = CameraIP;
camMedia.MediaUsername = UserName;
camMedia.MediaPassword = Password;
camMedia.HttpPort = HttpPort;//80
camMedia.RegisterPort = RegisterPort;//6000
camMedia.ControlPort = ControlPort;//6001
camMedia.StreamingPort = StreamingPort;//6002
camMedia.Connect(0);
where the camMedia is the OCX object name.
ACTi has quite a wide range of cameras, and they do not share uniform API. You have to look for documentation for your model of interest and check the vendor's sample code and SDKs. The cameras also have some support for well known protocols, such as RTSP and M-JPEG over HTTP so you can leverage certain libraries to visualize the feed, but again you will need documentation, specification and SDKs to find out the essential information.
Related
I've got Sony A6000 camera with the latest firmware(3.20) and latest Smart Remote Control application (4.30). I've been trying to write application for transferring images, but faced with issues.
I can't switch camera function to Contents Transfer mode.
Repro steps:
Run Smart Remote Control app on my camera;
Sucesfully connect device to camera via WI-FI;
Discover the camera with parameter ST=urn:schemas-sony-com:service:ScalarWebAPI:1;
Receive response Location http://ip:port/scalarwebapi_dd.xml (instead mentioned in doc http://ip:port/dd.xml);
Parsed scalarwebapi_dd.xml contains guide, accessControl and camera services (instead mentioned in doc camera, system and avContent);
Request with getAvailableApiList method return the following:
getVersions, getMethodTypes, getApplicationInfo, getAvailableApiList, getEvent, startRecMode, stopRecMode.
Successfully run request with "startRecMode" method;
"getAvailableApiList" result doesn't contain "getCameraFunction" and
"setCameraFunction"
"getCameraFunction" return the following result:
{"id":1,"error":[1,"Not Available Now"]}
What I'm doing wrong?
Smart Remote 4.30 should give you the avContent services. I had an older version that had the same guide, accessControl, camera but after I updated it had the avContent service.
You can also try using getEvent to troubleshoot the camera status. This could shed some light into why the services aren't available.
I'm developing an application using Gmap in c# (great API, btw), not to confuse with google-map API, and I did some really cool and useful stuff ever since.
My problem is that some of my clients won't have an internet connection, and that is why I need to be able to display the background (the map) offline. I used to use the property GMap.NET.AccessMode.ServerAndCache; to get my data from the server, and now I would like to be able to use GMap.NET.AccessMode.CacheOnly with a full cache.
Letting them load the cache with a connection to prepare for an offline use is not an option, the PCs will never be connected to the internet. After some research, I learned OpenStreetMap is the only open source map that would allow me to use their map for free (and that is good because they have very good maps). I downloaded a 20GB map of Europe, but I have no idea how to specify it as the cache (I know how to locate the cache folder).
Most of the time, my Google searches showed me people trying to create a virtual sqlite server with all the map's tiles in a DB accessed via localhost, but honestly I think this is very complex and I would like to know if anybody has an idea to allow me to use those maps offline or a link for the doc of this api, impossible to find on the net (I found the sources, but almost no comment and no explanation).
Thanks in advance, and sorry for my bad English.
réponses en français bienvenues.
you can create a separate program to prefetch tiles for offline use. Or use the GMap NET demo program (https://github.com/radioman/greatmaps/tree/master/Demo.WindowsPresentation)
The code below is for a button press after you've selected an area using ALT + mouse first button.
RectLatLng area = mapView.SelectedArea;
if (!area.IsEmpty)
{
for (int i = (int)mapView.Zoom; i <= mapView.MaxZoom; i++)
{
TilePrefetcher obj = new TilePrefetcher();
obj.Title = "Prefetching Tiles";
obj.Icon = this.Icon;
obj.Owner = this;
obj.ShowCompleteMessage = false;
obj.Start(area, i, mapView.MapProvider, 100);
}
DialogResult = true;
Close();
}
else
{
MessageBox.Show("No Area Chosen", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
(mostly copied from Gmap NET Demo source)
https://github.com/radioman/greatmaps/tree/master/Demo.WindowsPresentation
The Files are stored in C:\Users\[your user name]\AppData\Local\GMap.NET\TileDBv5\en
Once you've successfully prefetched the tiles you can copy the files to the same location in the offline pc and it should use it (or just copy the whole GMap.NET folder to the offline pc via usb or whatever)
use gmap.CacheLocation = #"C:\Users\xxx\Desktop\"; to specify the cache location.
Just copy the cache to different machine under the same directory will work.
To cache the map data, check my github https://github.com/williamwdu/GMap.NETChacher
The cache directory will look like this TileDBv5\en\Data.gmdb
Pay attention that the Provider of the MAP that you have downloaded be the same provider that you have used in your code.
eq: GMap.NET.MapProviders.GMapProviders.OpenStreetMap
Windows Phone 8 gives the ability to change the default camera app with another one downloaded from the store, making this new app the one that's launched when you hit the camera hardware button.
So I was wondering if is there any chance to launch this app using the CameraCaptureTask.
What I'd like to do is something simple like
var camera = new CameraCaptureTask();
camera.Show();
camera.Completed += new EventHandler<PhotoResult>(camera_Completed);
but I want this to work with the default app that the user chose on its device, and not with the basic Microsoft's one.
I've not found anything online, so I'm asking to you guys if I can make what I want.
Sorry, not possible with the current API.
I want to connect a single wiiMote to my app using WiiMoteLib, but I want the connection done internally ie. the user has only to run the app (and should have no need to connect the wiiMote with windows wizard or bluesoleil). The app is in C# and the language cannot be changed.
Thanks!
Does 32feet.NET do the job?
BluetoothAddress addr = ... address from discovery or known address...
var dev = new BluetoothDeviceInfo(addr);
dev.SetServiceState(BluetoothService.HumanInterfaceDevice, true); // this line!
You may also need to handle pairing, perhaps using BluetoothWin32Authentication and handling its callback, see http://32feet.codeplex.com/wikipage?title=Bluetooth%20Security and http://32feet.codeplex.com/wikipage?title=BluetoothWin32Authentication
There is an example of how to do this here using the Microsoft Bluetooth API and the HID API:
http://www.richlynch.com/code/wiipair
It works quire well.
Its in C++, but its pretty easy to convert to C#.
I'd like to ask your help regarding having a Google Talk Bot that will communicate with my code on my server.
I have downloaded Jabber-Net from code.google.com, but the examples there are not enough... I am new to these technologies, and have no clue about:
How will client arrive to my server? where should I change [if any] DNS to my server?
Which server side library should I use?
From the examples I understood that I need to have a Desktop-app running in the background constantly, which doesn't make sense to me.
Does anyone has an example of some better references to understand this better?
[Sorry for my ignorance...]
I'm not sure if I understand what you ask correctly. If you're asking how to connect to chosen server, console sample shows how to do it simply, you basically fill out JID class.
Sample from Jabber-Net
JabberClient jc = new JabberClient();
JID j = new JID(jid);
jc.User = j.User;
jc.Server = j.Server;
jc.NetworkHost = networkHost;
jc.Port = port;
jc.Resource = "Jabber.Net Console Client";
jc.Password = pass;
jc.AutoStartTLS = TLS;
jc.AutoPresence = initialPresence;
If you want to create your own server, there's a library (also running under .NET) called agsxmpp, it allows to create both, server and client, it's open source on MIT/GPL license afair. I don't know if jabber-net enables this feature. On the other hand, there are plenty of free jabber-server if you don't want to just use one of "public" ones, so it may be worth to consider just using something that is ready to be launched.
There's a console sample in the project, you don't need desktop-app (if this is what you were asking?), so you can write service, console app or anything else.
Here's a recent post that shows an example of replying to incoming messages on Gtalk using .NET