derez Expert Licensed User Longtime User Dec 5, 2012 #1 Is it possible to create video stream ? I want to send the video output of the device to another device using the local wifi and to display it in real time. Will asincstream be fast enough ? Thanks.
Is it possible to create video stream ? I want to send the video output of the device to another device using the local wifi and to display it in real time. Will asincstream be fast enough ? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2012 #2 Here: Android based Closed Circuit TV (CCTV) example Upvote 0
derez Expert Licensed User Longtime User Dec 5, 2012 #3 Thanks Erel, you always have the solution before I need it... Upvote 0
derez Expert Licensed User Longtime User Dec 5, 2012 #4 Works very nice. Will it be much to ask for a server program in b4a so it can be run on a device ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2012 #5 It shouldn't be difficult to create such a server. Try it. I will help you if you encounter any issue. You should create a service and listen for incoming connections with ServerSocket. Once there is a connection use AsyncStreams (change the client code to use prefix mode and do NOT send the file size). In AStreams_NewData you should convert the data to a bitmap and call CallSubDelayed to show the image in the activity. Upvote 0
It shouldn't be difficult to create such a server. Try it. I will help you if you encounter any issue. You should create a service and listen for incoming connections with ServerSocket. Once there is a connection use AsyncStreams (change the client code to use prefix mode and do NOT send the file size). In AStreams_NewData you should convert the data to a bitmap and call CallSubDelayed to show the image in the activity.
derez Expert Licensed User Longtime User Dec 5, 2012 #7 Here are the modified client application and the b4a server application. Attachments ACCTVServer.zip ACCTVServer.zip 7.8 KB · Views: 355 CCTVCam.zip CCTVCam.zip 10.5 KB · Views: 353 Last edited: Dec 5, 2012 Upvote 0
suciwulans Active Member Licensed User Longtime User May 7, 2013 #8 derez said: Here are the modified client application and the b4a server application. Click to expand... i try your code but it can not connect. What scenario you used until server and client camera become connected. Thanks. Upvote 0
derez said: Here are the modified client application and the b4a server application. Click to expand... i try your code but it can not connect. What scenario you used until server and client camera become connected. Thanks.