Story : I've implemented video streaming application using AFORGE.net, in c# from my laptop camera, using TCP protocol.And it worked excellent.I tested the application on multiple pc's using lan cable and it worked good. I've never worked with IP-Cameras but i read this forum ( http://www.aforgenet.com/forum/viewtopic.php?f=4&t=36 ) and it says that every ip-cam needs a source string that is a URL in order to connect with AFORGE.net's MJPEGStream class:
MJPEGStream mpeg = new MJPEGStream();
mpeg.Login = "username";
mpeg.Password = "pass";
mpeg.Source = "http://ip:port/img/mjpeg.cgi";
mpeg.Start();
Problem : Now i want to use my android phone as an ip-camera for video streaming. I've also created an android application that send images continuously to an address using TCP.
All i want to know that if its possible to use android device as ip-camera? And if yes then what source string i should use with MJPEGStream class.?
Thanks in advance for suggestions and guides.
Related
I'm trying to develop winform(C#) application to search file from connected portable device(mobile device) using MTP.
I can get connected or disconnected status from wndproc method using WM_DEVICECHANGE.
But what I really want to develop is to cause an event when internal storage is created (it is able to read on window) after the deivce is connected from MTP.
So I was trying to create wndProc and input the code below in this code "if (m.Msg == UsbAlert.WM_DEVICECHANGE){ ... }"
if (devType == UsbAlert.DBT_DEVTUP_VOLUME)
{
Console.WriteLine("DBT DEVTUP VOLUME");
DEV_BROADCAST_VOLUME vol;
vol = (DEV_BROADCAST_VOLUME)Marshal.PtrToStructure(m.LParam, typeof(DEV_BROADCAST_VOLUME));
Console.WriteLine(vol.dbcv_unitmask);
}
But it is only can operate portable device such as USB not a mobile phone (android, ios)
There are so many codes for connecting device to windows but not for mobile phone.
Please let me know how can set an event when internal storage is ready to scan on windows.
Can I use WndProc function to develop this or not.
Thank you.
I just solved by myself not using the WM_DEVTUP_VOLUME using wnd_proc fuctions.
This article make me solved the problem below.
How to get MTP device Available Storage & Storage Capacity using C#?
You can get storage voulme using WPD lib from windows.
I need to create a service that starts a mobile hotspot using bluetooth. I've found the code to create a hotspot service, but this creates a hotspot with the Ethernet adapter.
I've read the documentation and can't find anything to specify bluetooth like in the settings UI.
This is the code to initialize the hotspot with the Ethernet adapter.
var connectionProfile = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile();
var tetheringManager = Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager.CreateFromConnectionProfile(connectionProfile);
The problem with this is that the network is shared through WiFi, and not Bluetooth.
Here are my current connections:
My OS were unfortiunately installed in Norwegian, but the display should look familiar in English.
GetConnectionProfiles returns a IReadOnlyList of ConnectionProfile. You can then try to select a specific profile from the list to operate on, instead of using the default one you have in your snippet.
Is there any way to know the game is running in an emulator application or a real device ?
Some Applications like VirtualXposed are virtual emulator for android devices. Such Applications allow users to install a game / application multiple times on their device with different identifies.
I want to know is there any way to recognize my game / application is running in emulator or a physical device in unity3d ?
something like :
if(isemulator)
{
dosomething();
}
It's not easy to do since there are many emulators out there. The answer from this post says that you can use Build.FINGERPRINT.contains("generic") to do that.
You can port the Java code to C# in Unity with the AndroidJavaClass class and without building Java plugin. Below is the ported version in C#:
public bool IsEmulator()
{
AndroidJavaClass osBuild;
osBuild = new AndroidJavaClass("android.os.Build");
string fingerPrint = osBuild.GetStatic<string>("FINGERPRINT");
return fingerPrint.Contains("generic");
}
To make sure that this covers most emulator, use the android-emulator-detector plugin. This plugin seems to be rigorously tested and detects most emulators. You can use AndroidJavaClass to communicate with it and UnityPlayer.UnitySendMessage to make callback into your Unity code in C#.
Maybe you can look for some emulator specific SystemInfos (Unity Docs SystemInfo) eg. SystemInfo.deviceModel
Target Platform : Samsung S6 - Android
Development base : Unity3D using C#
Intention :
Send a picture (MMS) shot within an app to any desired phone number within Canada. This app is supposed to be preloaded to a single Samsung S6.
Questions :
I was unable to find any Unity samples within you SDK, however I was wondering if anyone knows Unity samples for my intended use. However planned to use these scripts as first of reference.
Though the Android Phone number which is used to send MMS can be associated with Twilio the receiver would have no association with Twilio as the sender phone number is not something we would know until the photo is taken - hence is this a concern?
I see that from from the API call
// Send a new outgoing MMS by POSTing to the Messages resource */
client.SendMessage(
"YYY-YYY-YYYY", // From number, must be an SMS-enabled Twilio number
person.Key, // To number, if using Sandbox see note above
// message content
string.Format("Hey {0}, Monkey Party at 6PM. Bring Bananas!", person.Value),
// media url of the image
new string[] {"https://demo.twilio.com/owl.png" }
);
the fourth and final parameter is a URL link. Can link of the image be from any server or should it only be from twilio's server?
Thank you very much for time. Highly appreciate it.
Here you are. As far as I know this works like a charm.
I want to develop video recording + sound using web-cam and store the file in my server. ( No silverlight )
Please guide me how to do that, I try with some third party control and also try some my logic but no success.
PLease help me in this.
Thanks
For recording Live video streaming and to store audio streaming from your web page you can use Flash then for storing the stream you can use Red5 server http://www.red5.org/.
Through Flash you can access the web camera connected to your machine to save the video or audio streams to the server.
If you want more details i can help as i have implemented this several times in my project
here is the sample code for the video streaming using web cam to your red5 server
You can connect to the server using the following :
_connection = new NetConnection();
_connection.client = { onBWDone: function():void{ /*Alert.show('onBWDone', 'Alert Box', mx.controls.Alert.OK); */} };
_connection.objectEncoding = flash.net.ObjectEncoding.AMF0;
_connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
_connection.connect("your server name like rtmp://yourhost/oflaDemo");
After connecting to the server you can attach the camera to your flash and save the stream to your red5 server.
_camera = Camera.getCamera();
_camera.setMode(320,240,10000);
_camera.setQuality(0,85);
_video = new Video();
_video.x=0;
_video.y=0;
_video.height= _height;
_video.width = _width;
_video.attachCamera(_camera);
uiComp.addChild(_video);
_stream = new NetStream(_connection);
_stream.attachCamera(_camera);
_stream.publish(_streamName,"live");
You can use live,record or publish while publishing the stream to the server.For more example you can refer the Adobe docs at http://livedocs.adobe.com/flash/9.0/main/