MJPG_ Process and error of migrating streamer to Android

The first post is not very good at typesetting.... Make do with it ~ only the process has no specific operation. This is my own migration process. The camera adopts the front camera on the tablet, and the external USB should also be the beginning: Download mjpglib and JPEG_ The two library versions of streamer: my mjpeglib comes with 8b Android. There is a libjpeg.so in / system / lib. The address can also be determined according to his version: http://www.ijg.org/files/ My JPEG_ Streamer is in http://sourceforge.net/projects/mjpg-streamer/ Downloaded

Unzip... Get MJPEG and JPEG_ The two directories of streamer start from mjpg: set cross compilation: enter the MJPEG directory and execute. / configure -- prefix = $PWD / tmp CC = / home / xiaohuihui / Samba / NDK / tool / bin / arm linux Android GCC -- build = x86_ 64-linux-gnu --host=arm-linux-gnueabi --enable-shared=yes CFLAGS="-D__ANDROID_API__=23 -pie -fPIE" Generate Makefile, and then make make install will generate TMP in the directory. There are header files and shared library files TMP / lib / libjpeg. So. 8.0.2 in the directory. This needs to be put into the / system / lib of the tablet to replace the original libjpeg.so. If you want to directly use libjpeg.so in the / system / lib of the tablet, you need to download the source code and the cross compiler of the same version The tool chain is generated by the NDK tool. It is generated according to its own Android version. The configuration 23 represents Android 6.0

Next is mjpg_ Streamer because there is Android source code on my computer, I compiled it with mmm. Android.mk can be used, and NDK can also be used, but I can't ~ ~ ~ android.mk. I don't know how to paste it here and it will get stuck.... mjpg_ The source code of streamer is plugins / input that needs to be modified_ uvc/jpeg_ The header file location of utils. C is that you need to specify the TMP / include / jpeg lib. H generated by mjpg. When compiling, there are too many errors, such as pthread function of process class_ cancel(cam); There is no such thing in Android. It is completely commented out. There is also a DB missing from the members in the library structure_ There are too many specific errors in update itself ~ ~ ~ the important thing is plugins / input_ uvc/jpeg_ Compress in utils. C_ image_ to_ JPEG function has illegal pointer / / jsamprow row_ pointer; JSAMPROW row_ pointer[1]; // row_ pointer = (JSAMPROW)line_ buffer; row_ pointer[0] = line_ buffer; Modify these two places ~ ~ ~ and then push all the libraries and executable programs generated by MMM into the tablet. Chmod 777 * can be executed with permission. / mjpg_ streamer -i “./input_uvc.so -d /dev/video1 -f 10 -r 640*480” -o “./output_http.so -w ./www -p 8080”

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>