JooHyoungLee / ipcamera-for-android

Automatically exported from code.google.com/p/ipcamera-for-android
0 stars 0 forks source link

Updated source of ipcamera for Nexus One Gingerbread (but targeted to 2.1-update1) #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello!

Please find attached an APK and the Eclipse workspace export for an updated 
WebCamera that "works" on the Nexus One / Gingerbread 2.3.3.

Needs more testing and someone to review the changes and merge them, but I just 
wanted to put the work so far out there in case someone is looking at this too.

I'm still not really satisfied with the latency / quality of the video (far 
from real-time), but it's fun ^_^

Changes:

-added dependency to isoparser library to enable accurate atoms parsing (and 
removed MediaDetect)
-removed some of the unnecessary data copies in StreamingKernel
-changed header offset from 32 to 44 (probably need to find a way to find the 
mdat automatically) - this is what makes it work with the Nexus One
-factored out code from the MainActivity to a new class Streamer to promote 
potential reuse in other app
-Change the behavior of enable/disable button slightly to enable Re-check all 
the time
-Updated version to 1.1
-added some onscreen stats (overall fps, Bps, overflow) for debugging
-updated flash player to JW 5.6 and configured player for zero-buffer, autoplay
-removed some unused commented out code
-added and cleaned up the logging
-added a proguard configuration
-tried to break down the FLV header configuration
-...

Thanks!

Original issue reported on code.google.com by rnga...@gmail.com on 29 Apr 2011 at 3:04

Attachments:

GoogleCodeExporter commented 9 years ago
...also tested on the Nexus S... The quality is much, much better (it's pushing 
48K/s versus 8K/s on the Nexus one!).  Framerate is better too (15fps versus 
9fps) but latency is still too high.

Original comment by rnga...@gmail.com on 29 Apr 2011 at 3:10

GoogleCodeExporter commented 9 years ago
with the aforementioned dynamic detection of the mdat in the stream, which 
should make it more resilient to encoder changes.

Original comment by rnga...@gmail.com on 29 Apr 2011 at 6:23

Attachments:

GoogleCodeExporter commented 9 years ago
Great work! Are you interesting join in this proj? 

Original comment by achang.z...@gmail.com on 9 May 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Sure!  I'd love too, although I feel that you guys should review and submit my 
first few changes to make sure they're adapted to the style you want and 
actually cover your existing test cases.  

I actually made even more changes to the codebase; I've split aggressively the 
UI from the logic (with notifications and callbacks) so I could use it from a 
separate project. I've temporarily forked the code here (still in an half-done 
state), but my hope is we could just have everything back in the main 
repository:

https://github.com/rngadam/XinCheJian-GGHC/tree/master/android/eclipse-workspace
/WebCamera  

...main change will be this:

https://github.com/rngadam/XinCheJian-GGHC/blob/master/android/eclipse-workspace
/WebCamera/src/com/appdh/webcamera/StreamingServer.java

Also the other project I'm doing is also OpenSource but the license I selected 
is APL.  I was wondering if this project could be relicensed under LGPL so that 
there isn't an incompatibility between both?

Original comment by rnga...@gmail.com on 11 May 2011 at 10:49

GoogleCodeExporter commented 9 years ago
Hi

I have installed your app on my Nexus One (Android 2.2.2) but I am having 
trouble successfully stream video to my Windows 7 PC running Firefox browser.

The browser gives me "Video not found or access denied: live.flv".
Any advice is very helpful.

I am able to run the app on the phone, but I am getting the following errors 
from logcat when I click "check" button.

Thanks,
David

-------------------------------- HTC phone logcat message 
-------------------------
06-08 16:48:45.649: ERROR/CameraInput(59): Unsupported 
parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_valu
e)
06-08 16:48:45.649: ERROR/CameraInput(59): VerifiyAndSetParameter failed on 
parameter #0
06-08 16:48:45.649: WARN/AuthorDriver(59): Video encoding bit rate is set to 
320000 bps
06-08 16:48:45.649: DEBUG/MediaSource(1185): init Camera setting is OK! 
06-08 16:48:45.660: INFO/MediaRecorderJNI(1185): prepare: surface=0x24cfa8 
(id=1)
06-08 16:48:45.660: ERROR/PVOMXEncNode(59): 
PVMFOMXEncNode-Video_AVC::DoPrepare(): Got Component OMX.qcom.video.encoder.avc 
handle 
06-08 16:48:45.660: WARN/CameraInput(59): refCount 0
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR update_param_port_def::1643 
Frame rate is for input port (refer to OMX IL spec)
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR get_parameter::952 
unsupported index 0x700000b
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR set_parameter::2720 
unsupported index 0x700000b
06-08 16:48:45.660: ERROR/VENC_ENC(59): Bitrate 320000
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR get_parameter::952 
unsupported index 0x6000005
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR set_parameter::2720 
unsupported index 0x6000005
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR get_parameter::952 
unsupported index 0x6000008
06-08 16:48:45.660: ERROR/VENC_ENC(59): VENC_ERROR set_parameter::2720 
unsupported index 0x6000008
--------------------------------------------------------------------------------

Original comment by smart...@gmail.com on 9 Jun 2011 at 12:01

GoogleCodeExporter commented 9 years ago
I think it's probably because your system does not have the codec.  There's no 
requirement from the Android platform to have that codec provided so it's up to 
each individual manufacturer to offer that functionality or not.

The solution would be to modify the code to support a wider range of codecs.  I 
may look into this later.

Original comment by rnga...@gmail.com on 9 Jun 2011 at 2:44

GoogleCodeExporter commented 9 years ago
I am getting these errors while running webcamera11 apk in my blaze board

D/MediaSource( 2014): init Camera setting is OK! 
D/AndroidRuntime( 2014): Shutting down VM
W/dalvikvm( 2014): threadid=1: thread exiting with uncaught exception 
(group=0x40015560)
E/AndroidRuntime( 2014): FATAL EXCEPTION: main
E/AndroidRuntime( 2014): java.lang.IllegalStateException: Cannot return file 
descriptor as sender is unitialized (Call initLoopback first)
E/AndroidRuntime( 2014): \0x09at 
com.appdh.webcamera.Loopback.getTargetFileDescriptor(Loopback.java:79)
E/AndroidRuntime( 2014): \0x09at 
com.appdh.webcamera.MainActivity.prepareStreaming(MainActivity.java:374)
E/AndroidRuntime( 2014): \0x09at 
com.appdh.webcamera.MainActivity.startWork(MainActivity.java:414)
E/AndroidRuntime( 2014): \0x09at 
com.appdh.webcamera.MainActivity.access$4(MainActivity.java:400)
E/AndroidRuntime( 2014): \0x09at 
com.appdh.webcamera.MainActivity$5.onClick(MainActivity.java:422)
E/AndroidRuntime( 2014): \0x09at android.view.View.performClick(View.java:2485)
E/AndroidRuntime( 2014): \0x09at 
android.view.View$PerformClick.run(View.java:9080)
E/AndroidRuntime( 2014): \0x09at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2014): \0x09at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2014): \0x09at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 2014): \0x09at 
android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 2014): \0x09at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 2014): \0x09at 
java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2014): \0x09at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 2014): \0x09at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 2014): \0x09at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1574):   Force finishing activity 
com.appdh.webcamera/.MainActivity
D/WebServer( 2014): (no listener) WebServer status change to: true

W/ActivityManager( 1574): Activity pause timeout for HistoryR
ecord{40699d38 com.appdh.webcamera/.MainActivity}
V/RenderScript_jni( 1675): surfaceCreated
V/RenderScript_jni( 1675): surfaceChanged

Original comment by sahadeva...@gmail.com on 9 Jun 2011 at 7:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi

I am running your app on Nexus One (Android 2.2.2).

The first errors (see below) I encounter is when the code runs this line: 
"mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);" at initCamera() 
in MediaSource.java.

I am not sure why it won't set the videosource to Camera.

Thanks,
David

**** LogCat message ***
06-13 10:47:10.624: ERROR/CameraInput(59): Unsupported 
parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_valu
e)

06-13 10:47:10.624: ERROR/CameraInput(59): VerifiyAndSetParameter failed on 
parameter #0

Original comment by smart...@gmail.com on 13 Jun 2011 at 6:48

GoogleCodeExporter commented 9 years ago
This one has clearer video than original but delay is much longer. Original 
one's is around 1-2 second but this one's is about 5 seconds.

Original comment by helldanc...@gmail.com on 3 Aug 2011 at 9:02

GoogleCodeExporter commented 9 years ago
hi,
   i have a project on capturing video from android camera and send this video to server and the server will save this in a file. is this project is related to me and give me the solution. please any one help me.

my mailing address is muhammad.umer12@hotmail.com, please any one who done this 
can help me.

Original comment by muhammad...@gmail.com on 24 Aug 2011 at 1:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
that such ... I downloaded the application but I can not run you can give me 
some tutorial on how to make a similar application from 0 to control an IP 
camera.
thanks

Original comment by javierpo...@gmail.com on 17 Jan 2013 at 5:29