diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/mjpg-streamer |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/mjpg-streamer')
10 files changed, 658 insertions, 0 deletions
diff --git a/media-video/mjpg-streamer/Manifest b/media-video/mjpg-streamer/Manifest new file mode 100644 index 000000000000..9dc60a23c036 --- /dev/null +++ b/media-video/mjpg-streamer/Manifest @@ -0,0 +1,13 @@ +AUX 0_pre20120421-make-var-instead-of-cmd.patch 3756 SHA256 ef7f66e87c6b3b145ad9e5c0a0023b3d4331d0507aca6e69df95a380a421d2eb SHA512 460afe3b80b15586862a9503811b3600116d40928399fd831a7b18e549b6bf76d31a632e9ac145c942c59d7c1976fbeadabed5cad5c82aa3a5459810506373f7 WHIRLPOOL 41516802c4332657f41509cc88908ba2a251cc66a6ffb922f1a92dd0f578c8c577f386604c1af48f889d1c3dd19daec902f99e00e86f8ad250e40c0817d431df +AUX 0_pre20120621-make-var-instead-of-cmd.patch 3756 SHA256 ef7f66e87c6b3b145ad9e5c0a0023b3d4331d0507aca6e69df95a380a421d2eb SHA512 460afe3b80b15586862a9503811b3600116d40928399fd831a7b18e549b6bf76d31a632e9ac145c942c59d7c1976fbeadabed5cad5c82aa3a5459810506373f7 WHIRLPOOL 41516802c4332657f41509cc88908ba2a251cc66a6ffb922f1a92dd0f578c8c577f386604c1af48f889d1c3dd19daec902f99e00e86f8ad250e40c0817d431df +AUX 0_pre20120621-to-work-with-kernel-3.18.patch 3420 SHA256 e7882b4d158b2ba91516d0a6d587e46388ee9725c2c501544cefc14db37befdf SHA512 6711ce428e2985a65b8041c09ec9f461615e7e55ccc061d520ece5196e4da5d95ea71b344e7d326bcf7e127f48846808b2903a03e33aec488652067675a8f2b2 WHIRLPOOL 398f562079756e841b8339d111c6c2ea65df9246c4184858a26ce1c7e649002b14188df8b77b438fdac586692963f69af036d1596d627e8b05dfe4c2fc5b6cbe +AUX mjpg-streamer.confd 347 SHA256 37019a36c29ad350ac3348c1665c631d0b4ab5efacc4583662fcbf7d4b920db1 SHA512 15841b10f0caa136b58372e180bfc3a0198d323ef2df22ddd2b334c09d0d376cac78d799c327306105bc97648ee40a3d0c78ef013a421f9468be7f89278baa33 WHIRLPOOL 7a51d9b565be672212f0b09fa54184ca3138852ae62820d18f80f3a61b6eff739e63c82e479ee0735d13231f5f41252ea3be532c11e5f02e7c6b2dc8f7256325 +AUX mjpg-streamer.initd 1243 SHA256 bc44e311cdbdbdc4b4bd7e25b104574587ecee47b0d583ed25c2b77f924ca916 SHA512 5430b14a8f712ee1c651ab080be5d52c42a388faa3f6b030366efaf8918c07d484aba3e33eda0d87b392b14dba21d0bfe3b996a7edbf0f3ca3f97ea097c74934 WHIRLPOOL eb91b75509bf567cf4d89b8eb2ec2e0a037257135ba77817f84e361b5925c6e96fabf2f5ac12700e109b17693ed2efe1ed07a1ac34dee282b1cc64824a5ca031 +DIST mjpg-streamer-0_pre20120421.tar.bz2 471104 SHA256 cba3027eece48735e104522adf4682169431e0879555c1d22395b4669189aab8 SHA512 bd9fa11c8a615cf33f84898f6acca6c61ead3614c848d50c22891922e7cb553b422f2f121377040f52d636dd719a2f300d3285cefc34759df8861cc84fdc2e82 WHIRLPOOL 734512cdc3e77d7a18231a08949eae8c8b6d8611eaf4c98edef0a679c14a7fe7ac7a81997d9bf9f6e89e67407be5effd1ea6181274600a5455c3a0c2b7baa2d9 +DIST mjpg-streamer-0_pre20120621.tar.bz2 471546 SHA256 585c4fd8f96f9d84d36f5c95cec79c411c2018bb2ebb10bcf73a2394ffe29c20 SHA512 dfc6077ec03fe4f239d8e25b65b7808bd489a954d8cf3aeed444e68fd9536720c2c888a5fa9f4b8d0152dab5ca0bd166a46f2cb22a357ba816eb5bc79ff11332 WHIRLPOOL 925f66c586028369858e55c62dfce136755f0958df7835869e29a0cfbad045842f5d39526ae646d728c0021c89bd31da0e89efcb556d04a5def96eaab5257af3 +EBUILD mjpg-streamer-0_pre20120421.ebuild 1707 SHA256 f6baea4d49cbf90cba3ddf4a132daf3cc1b3cd7575e61b2d1979eafa1190579d SHA512 fe6810679cbb16391a73a75e38a5d3b0ee679fb615cdfb95a15dd72d9f37dac632681cac2532b329c573c9894680f46cf83fd410fe566c2c5289319e5b1d2a7e WHIRLPOOL 88ccd560642b03ce4d80c459e08c0e53b37f1673364a4e32851ccaed6efae138c8d8a1b30e4b7a4eedd2310e13d1bbd3d344e7a0fb050ebbbafef4c657fe4bbe +EBUILD mjpg-streamer-0_pre20120621-r1.ebuild 1846 SHA256 7c72430704333c4c4212b26c229e5a867b94f70eb8095e8e9aa630fe12743ac1 SHA512 02684add56270f3504787c487cc653e72fc6f28f13e517371a2d6fa1c341b0f5d497f4608201fcba116e36eeee6c3a123592a0959e260185d5943514fe9b66f8 WHIRLPOOL 26f7c44b0bf8c3c6865ea98c71515f835cc0f29e9f595d192d20794bb31bdaf4956b2f82a9f82e50b321a672e1ab16c143dfd0850768b62362bb34fc69610de5 +EBUILD mjpg-streamer-0_pre20120621.ebuild 1787 SHA256 4634f5b031f13880584b4976bf2619f58596b7f6243572cdf545a098b2a75d1d SHA512 9cb6b725c59089b33daec349c9570d0528430354a7faefce39008ab269b4ae42476a762a1cd39e97195b70a04112fc265e79c6ef6e831c458c7c0144fbb5cb7e WHIRLPOOL d5b93bd93f3a4ea24902bad3334ecc0d2ca2032aa9ce2627aa0a84018bff66e709112ea57fe3f473f03c56ef894f054c878d1516ab8ada933c4e710f552f275f +MISC ChangeLog 4258 SHA256 06741a956aba4ed3c165c259c5673032a406fc29174b30612884bc7bcb54d694 SHA512 c7976b5bf91da6e61c253d50766f01296e117c4713a6de94f8c28d67b8908bde03ad4bfe5287936dc9230d60bb7923b9716f339e1e53a7f063be3528057e4c56 WHIRLPOOL 5d426fce0b214de1a55a3509bb3e51a26c0575021d147cf8bc637a02ded39b9f1f51962585d1fd001f8ba60221c6c1d1d8a89448137c87c4657cf14349e6db29 +MISC ChangeLog-2015 1924 SHA256 907850af9b393f64eed2c9999720201334e4a88ac4fcc00eac21e4ccf6547cf0 SHA512 94c0d4a69a18b765a4647677598c88c5cf98a417adf729b779c4b97523e2e9638b4cea92cfeada756047817caae035ec1b4c1f5fd292af2a85ba8083c2c695d8 WHIRLPOOL 3f4f7f9271d6218ce1b7465b5f7a71d14d645ebe986d607c350b775ac2e00cd447f6bed40aeaca8900090927fa5b334728eae937a94f7e029d721e4acdd05e7b +MISC metadata.xml 2051 SHA256 38cb031c6ee325bfb06d7a042859bdc7f619a3049ca6898c50c98857c7c02e35 SHA512 2b63ebfc69af90d1da59619a88ad4752c08d7522a9830e2b59be9789d31bb30b2640e79e97a51fd99500466f1aa422c13c7ded9e196cd50e7387f8839a46deff WHIRLPOOL 6645c835323a58f0407e1bb4b23803a2c96c23391972a6d0726d4e726036d0848d51076c36c1ba464ebf9e5868159d52494c1c5aee17eed780d82403cae173d3 diff --git a/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch new file mode 100644 index 000000000000..98d89c555e04 --- /dev/null +++ b/media-video/mjpg-streamer/files/0_pre20120421-make-var-instead-of-cmd.patch @@ -0,0 +1,118 @@ +Index: Makefile +=================================================================== +--- Makefile (revision 150) ++++ Makefile (working copy) +@@ -63,64 +63,64 @@ + chmod 755 $(APP_BINARY) + + output_autofocus.so: mjpg_streamer.h utils.h +- make -C plugins/output_autofocus all ++ $(MAKE) -C plugins/output_autofocus all + cp plugins/output_autofocus/output_autofocus.so . + + input_testpicture.so: mjpg_streamer.h utils.h +- make -C plugins/input_testpicture all ++ $(MAKE) -C plugins/input_testpicture all + cp plugins/input_testpicture/input_testpicture.so . + + + ifeq ($(USE_LIBV4L2),true) + input_uvc.so: mjpg_streamer.h utils.h +- make -C plugins/input_uvc USE_LIBV4L2=true all ++ $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all + cp plugins/input_uvc/input_uvc.so . + else + input_uvc.so: mjpg_streamer.h utils.h +- make -C plugins/input_uvc all ++ $(MAKE) -C plugins/input_uvc all + cp plugins/input_uvc/input_uvc.so . + endif + + input_control.so: mjpg_streamer.h utils.h +- make -C plugins/input_control all ++ $(MAKE) -C plugins/input_control all + cp plugins/input_control/input_control.so . + + output_file.so: mjpg_streamer.h utils.h +- make -C plugins/output_file all ++ $(MAKE) -C plugins/output_file all + cp plugins/output_file/output_file.so . + + ifeq ($(WXP_COMPAT),true) + output_http.so: mjpg_streamer.h utils.h +- make -C plugins/output_http -DWXP_COMPAT all ++ $(MAKE) -C plugins/output_http -DWXP_COMPAT all + cp plugins/output_http/output_http.so . + else + output_http.so: mjpg_streamer.h utils.h +- make -C plugins/output_http all ++ $(MAKE) -C plugins/output_http all + cp plugins/output_http/output_http.so . + endif + + output_udp.so: mjpg_streamer.h utils.h +- make -C plugins/output_udp all ++ $(MAKE) -C plugins/output_udp all + cp plugins/output_udp/output_udp.so . + + input_gspcav1.so: mjpg_streamer.h utils.h +- make -C plugins/input_gspcav1 all ++ $(MAKE) -C plugins/input_gspcav1 all + cp plugins/input_gspcav1/input_gspcav1.so . + + input_file.so: mjpg_streamer.h utils.h +- make -C plugins/input_file all ++ $(MAKE) -C plugins/input_file all + cp plugins/input_file/input_file.so . + + output_rtsp.so: mjpg_streamer.h utils.h +- make -C plugins/output_rtsp all ++ $(MAKE) -C plugins/output_rtsp all + cp plugins/output_rtsp/output_rtsp.so . + + output_ptp2.so: mjpg_streamer.h utils.h +- make -C plugins/input_ptp2 all ++ $(MAKE) -C plugins/input_ptp2 all + cp plugins/input_ptp2/input_ptp2.so . + + #input_http.so: mjpg_streamer.h utils.h +-# make -C plugins/input_http all ++# $(MAKE) -C plugins/input_http all + # cp plugins/input_http/input_http.so . + + # The viewer plugin requires the SDL library for compilation +@@ -129,22 +129,22 @@ + # execute the following command: + # make output_viewer.so + output_viewer.so: mjpg_streamer.h utils.h +- make -C plugins/output_viewer all ++ $(MAKE) -C plugins/output_viewer all + cp plugins/output_viewer/output_viewer.so . + + # cleanup + clean: +- make -C plugins/input_uvc $@ +- make -C plugins/input_testpicture $@ +- make -C plugins/output_file $@ +- make -C plugins/output_http $@ +- make -C plugins/output_udp $@ +- make -C plugins/output_autofocus $@ +- make -C plugins/input_gspcav1 $@ +- make -C plugins/output_viewer $@ +- make -C plugins/input_control $@ +- make -C plugins/output_rtsp $@ +-# make -C plugins/input_http $@ ++ $(MAKE) -C plugins/input_uvc $@ ++ $(MAKE) -C plugins/input_testpicture $@ ++ $(MAKE) -C plugins/output_file $@ ++ $(MAKE) -C plugins/output_http $@ ++ $(MAKE) -C plugins/output_udp $@ ++ $(MAKE) -C plugins/output_autofocus $@ ++ $(MAKE) -C plugins/input_gspcav1 $@ ++ $(MAKE) -C plugins/output_viewer $@ ++ $(MAKE) -C plugins/input_control $@ ++ $(MAKE) -C plugins/output_rtsp $@ ++# $(MAKE) -C plugins/input_http $@ + rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo + + # useful to make a backup "make tgz" diff --git a/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch b/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch new file mode 100644 index 000000000000..98d89c555e04 --- /dev/null +++ b/media-video/mjpg-streamer/files/0_pre20120621-make-var-instead-of-cmd.patch @@ -0,0 +1,118 @@ +Index: Makefile +=================================================================== +--- Makefile (revision 150) ++++ Makefile (working copy) +@@ -63,64 +63,64 @@ + chmod 755 $(APP_BINARY) + + output_autofocus.so: mjpg_streamer.h utils.h +- make -C plugins/output_autofocus all ++ $(MAKE) -C plugins/output_autofocus all + cp plugins/output_autofocus/output_autofocus.so . + + input_testpicture.so: mjpg_streamer.h utils.h +- make -C plugins/input_testpicture all ++ $(MAKE) -C plugins/input_testpicture all + cp plugins/input_testpicture/input_testpicture.so . + + + ifeq ($(USE_LIBV4L2),true) + input_uvc.so: mjpg_streamer.h utils.h +- make -C plugins/input_uvc USE_LIBV4L2=true all ++ $(MAKE) -C plugins/input_uvc USE_LIBV4L2=true all + cp plugins/input_uvc/input_uvc.so . + else + input_uvc.so: mjpg_streamer.h utils.h +- make -C plugins/input_uvc all ++ $(MAKE) -C plugins/input_uvc all + cp plugins/input_uvc/input_uvc.so . + endif + + input_control.so: mjpg_streamer.h utils.h +- make -C plugins/input_control all ++ $(MAKE) -C plugins/input_control all + cp plugins/input_control/input_control.so . + + output_file.so: mjpg_streamer.h utils.h +- make -C plugins/output_file all ++ $(MAKE) -C plugins/output_file all + cp plugins/output_file/output_file.so . + + ifeq ($(WXP_COMPAT),true) + output_http.so: mjpg_streamer.h utils.h +- make -C plugins/output_http -DWXP_COMPAT all ++ $(MAKE) -C plugins/output_http -DWXP_COMPAT all + cp plugins/output_http/output_http.so . + else + output_http.so: mjpg_streamer.h utils.h +- make -C plugins/output_http all ++ $(MAKE) -C plugins/output_http all + cp plugins/output_http/output_http.so . + endif + + output_udp.so: mjpg_streamer.h utils.h +- make -C plugins/output_udp all ++ $(MAKE) -C plugins/output_udp all + cp plugins/output_udp/output_udp.so . + + input_gspcav1.so: mjpg_streamer.h utils.h +- make -C plugins/input_gspcav1 all ++ $(MAKE) -C plugins/input_gspcav1 all + cp plugins/input_gspcav1/input_gspcav1.so . + + input_file.so: mjpg_streamer.h utils.h +- make -C plugins/input_file all ++ $(MAKE) -C plugins/input_file all + cp plugins/input_file/input_file.so . + + output_rtsp.so: mjpg_streamer.h utils.h +- make -C plugins/output_rtsp all ++ $(MAKE) -C plugins/output_rtsp all + cp plugins/output_rtsp/output_rtsp.so . + + output_ptp2.so: mjpg_streamer.h utils.h +- make -C plugins/input_ptp2 all ++ $(MAKE) -C plugins/input_ptp2 all + cp plugins/input_ptp2/input_ptp2.so . + + #input_http.so: mjpg_streamer.h utils.h +-# make -C plugins/input_http all ++# $(MAKE) -C plugins/input_http all + # cp plugins/input_http/input_http.so . + + # The viewer plugin requires the SDL library for compilation +@@ -129,22 +129,22 @@ + # execute the following command: + # make output_viewer.so + output_viewer.so: mjpg_streamer.h utils.h +- make -C plugins/output_viewer all ++ $(MAKE) -C plugins/output_viewer all + cp plugins/output_viewer/output_viewer.so . + + # cleanup + clean: +- make -C plugins/input_uvc $@ +- make -C plugins/input_testpicture $@ +- make -C plugins/output_file $@ +- make -C plugins/output_http $@ +- make -C plugins/output_udp $@ +- make -C plugins/output_autofocus $@ +- make -C plugins/input_gspcav1 $@ +- make -C plugins/output_viewer $@ +- make -C plugins/input_control $@ +- make -C plugins/output_rtsp $@ +-# make -C plugins/input_http $@ ++ $(MAKE) -C plugins/input_uvc $@ ++ $(MAKE) -C plugins/input_testpicture $@ ++ $(MAKE) -C plugins/output_file $@ ++ $(MAKE) -C plugins/output_http $@ ++ $(MAKE) -C plugins/output_udp $@ ++ $(MAKE) -C plugins/output_autofocus $@ ++ $(MAKE) -C plugins/input_gspcav1 $@ ++ $(MAKE) -C plugins/output_viewer $@ ++ $(MAKE) -C plugins/input_control $@ ++ $(MAKE) -C plugins/output_rtsp $@ ++# $(MAKE) -C plugins/input_http $@ + rm -f *.a *.o $(APP_BINARY) core *~ *.so *.lo + + # useful to make a backup "make tgz" diff --git a/media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch b/media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch new file mode 100644 index 000000000000..5f16f4ab3f45 --- /dev/null +++ b/media-video/mjpg-streamer/files/0_pre20120621-to-work-with-kernel-3.18.patch @@ -0,0 +1,74 @@ +From 03796a1d930212aea460405b86cd41bea8fa5150 Mon Sep 17 00:00:00 2001 +From: Eric Lee <saintgimp@hotmail.com> +Date: Thu, 26 Feb 2015 19:31:41 -0800 +Subject: [PATCH] Fix mjpg-streamer to work with kernel 3.18 + +I didn't create this fix, it was originally posted to http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97983&p=681259. @koosvriezen tried to create a pull request #3 but made kind of a hash of it, so this is the same fix only a proper pull request. +--- + mjpg-streamer/plugins/input_uvc/input_uvc.c | 8 +++++--- + mjpg-streamer/plugins/input_uvc/v4l2uvc.c | 2 ++ + mjpg-streamer/plugins/input_uvc/v4l2uvc.h | 3 +++ + 3 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/mjpg-streamer/plugins/input_uvc/input_uvc.c b/mjpg-streamer/plugins/input_uvc/input_uvc.c +index c0b2d10..ef264e9 100644 +--- a/mjpg-streamer/plugins/input_uvc/input_uvc.c ++++ b/mjpg-streamer/plugins/input_uvc/input_uvc.c +@@ -405,9 +405,13 @@ void *cam_thread(void *arg) + if(pcontext->videoIn->formatIn == V4L2_PIX_FMT_YUYV) { + DBG("compressing frame from input: %d\n", (int)pcontext->id); + pglobal->in[pcontext->id].size = compress_yuyv_to_jpeg(pcontext->videoIn, pglobal->in[pcontext->id].buf, pcontext->videoIn->framesizeIn, gquality); ++ /* copy this frame's timestamp to user space */ ++ pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp; + } else { + DBG("copying frame from input: %d\n", (int)pcontext->id); +- pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->buf.bytesused); ++ pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->tmpbytesused); ++ /* copy this frame's timestamp to user space */ ++ pglobal->in[pcontext->id].timestamp = pcontext->videoIn->tmptimestamp; + } + + #if 0 +@@ -418,8 +422,6 @@ void *cam_thread(void *arg) + prev_size = global->size; + #endif + +- /* copy this frame's timestamp to user space */ +- pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp; + + /* signal fresh_frame */ + pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update); +diff --git a/mjpg-streamer/plugins/input_uvc/v4l2uvc.c b/mjpg-streamer/plugins/input_uvc/v4l2uvc.c +index 48fd189..329233b 100644 +--- a/mjpg-streamer/plugins/input_uvc/v4l2uvc.c ++++ b/mjpg-streamer/plugins/input_uvc/v4l2uvc.c +@@ -450,6 +450,8 @@ int uvcGrab(struct vdIn *vd) + */ + + memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused); ++ vd->tmpbytesused = vd->buf.bytesused; ++ vd->tmptimestamp = vd->buf.timestamp; + + if(debug) + fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused); +diff --git a/mjpg-streamer/plugins/input_uvc/v4l2uvc.h b/mjpg-streamer/plugins/input_uvc/v4l2uvc.h +index d5296fc..0e3f99f 100644 +--- a/mjpg-streamer/plugins/input_uvc/v4l2uvc.h ++++ b/mjpg-streamer/plugins/input_uvc/v4l2uvc.h +@@ -28,6 +28,7 @@ + + + #include <stdio.h> ++#include <stdint.h> + #include <string.h> + #include <fcntl.h> + #include <unistd.h> +@@ -105,6 +106,8 @@ struct vdIn { + int framecount; + int recordstart; + int recordtime; ++ uint32_t tmpbytesused; ++ struct timeval tmptimestamp; + }; + + /* context of each camera thread */ diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.confd b/media-video/mjpg-streamer/files/mjpg-streamer.confd new file mode 100644 index 000000000000..07a81b04dcee --- /dev/null +++ b/media-video/mjpg-streamer/files/mjpg-streamer.confd @@ -0,0 +1,21 @@ +# The input plugins and options: +# uvc +# testpicture +# file +#ex. INPUT_PLUGIN="uvc" +INPUT_PLUGIN="" +INPUT_PLUGIN_OPTS="" + +# The output plugins and options: +# autofocus +# file +# http +# udp +# rtsp +#ex. OUTPUT_PLUGIN="http" +OUTPUT_PLUGIN="" +OUTPUT_PLUGIN_OPTS="" + +# Deamon runing as user/group +MJPG_STREAMER_USER="nobody" +MJPG_STREAMER_GROUP="video" diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.initd b/media-video/mjpg-streamer/files/mjpg-streamer.initd new file mode 100644 index 000000000000..53f046e7b1fe --- /dev/null +++ b/media-video/mjpg-streamer/files/mjpg-streamer.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MJPG_STREAMER_PIDFILE="${MJPG_STREAMER_PIDFILE:-/var/run/${SVCNAME}.pid}" +MY_NAME=${SVCNAME//-/_} + +depend() { + use logger +} + +checkconfig() { + local vars + + [[ ${INPUT_PLUGIN} ]] || vars+=\ INPUT_PLUGIN + [[ ${OUTPUT_PLUGIN} ]] || vars+=\ OUTPUT_PLUGIN + [[ ${MJPG_STREAMER_USER} ]] || vars+=\ MJPG_STREAMER_USER + [[ ${MJPG_STREAMER_GROUP} ]] || vars+=\ MJPG_STREAMER_GROUP + vars="${vars# }" + + if [[ ${vars} ]]; then + eerror "Required variables in /etc/conf.d/${SVCNAME} are not set:" + eerror " ${vars// /, }" + return 1 + fi + + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/bin/${MY_NAME} \ + --user "${MJPG_STREAMER_USER}" \ + --group "${MJPG_STREAMER_GROUP}" -w 100 -b -m \ + --pidfile "${MJPG_STREAMER_PIDFILE}" \ + -- -i "/usr/lib/input_${INPUT_PLUGIN}.so ${INPUT_PLUGIN_OPTS}" \ + -o "/usr/lib/output_${OUTPUT_PLUGIN}.so ${OUTPUT_PLUGIN_OPTS}" + eend $? "Check syslog to see why startup failed." +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/${MY_NAME} \ + --pidfile "${MJPG_STREAMER_PIDFILE}" + eend $? +} diff --git a/media-video/mjpg-streamer/metadata.xml b/media-video/mjpg-streamer/metadata.xml new file mode 100644 index 000000000000..289845ee13ab --- /dev/null +++ b/media-video/mjpg-streamer/metadata.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>andrzej.pauli@gmail.com</email> + <name>Andrzej Pauli</name> + <description>Maintainer. Assign bugs to him.</description> + </maintainer> + <maintainer type="person"> + <email>aidecoe@gentoo.org</email> + <name>Amadeusz Żołnowski</name> + <description>Proxy maintainer. CC him on bugs.</description> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or + other input plugins and streams them as M-JPEG via HTTP to webbrowsers, + VLC and other software. It is the successor of uvc-streamer, a Linux-UVC + streaming application with Pan/Tilt + </longdescription> + <use> + <flag name="input_testpicture">Plugin for sending compiled in, test + pictures</flag> + <flag name="input_control">Plugin giving ability to control camera + movement (only specific cameras)</flag> + <flag name="input_file">Plugin that watches given directory and send + it's content</flag> + <flag name="input_uvc">Plugin that sends video stream from UVC + compatible camera</flag> + <flag name="output_file">Plugin that saves received content under given + location</flag> + <flag name="output_udp">Plugin receiving content over UDP and storing to + a directory</flag> + <flag name="output_http">Small HTTP server plugin which sends WWW + directory content and streams image content</flag> + <flag name="output_autofocus">Auto focusing plugin</flag> + <flag name="output_rtsp">Plugin which provides a mechanism to take + snapshots with a trigger from a UDP packet</flag> + <flag name="www">Installs WWW content</flag> + <flag name="v4l">Uses <pkg>media-libs/libv4l</pkg> function mapping for + input_uvc plugin</flag> + </use> + <upstream> + <remote-id type="sourceforge">mjpg-streamer</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild new file mode 100644 index 000000000000..773e442761a6 --- /dev/null +++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120421.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils + +DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams" +HOMEPAGE="https://sourceforge.net/projects/mjpg-streamer" +SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" + +INPUT_PLUGINS="input_testpicture input_control input_file input_uvc" +OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp" +IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS} +input_file +output_http" +IUSE="${IUSE_PLUGINS} www v4l" +REQUIRED_USE="|| ( ${INPUT_PLUGINS} ) + || ( ${OUTPUT_PLUGINS} ) + v4l? ( input_uvc )" + +RDEPEND="virtual/jpeg + v4l? ( input_uvc? ( media-libs/libv4l ) )" +DEPEND="${RDEPEND} + input_testpicture? ( media-gfx/imagemagick )" + +src_prepare() { + epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch" + + local flag switch + + for flag in ${IUSE_PLUGINS}; do + use ${flag} && switch='' || switch='#' + sed -i \ + -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \ + Makefile + done +} + +src_compile() { + local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true') + emake ${v4l} +} + +src_install() { + into /usr + dobin ${PN//-/_} + dolib.so *.so + + if use www ; then + insinto /usr/share/${PN} + doins -r www + fi + + dodoc README TODO + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} + +pkg_postinst() { + elog "Remember to set an input and output plugin for mjpg-streamer." + + if use www ; then + echo + elog "An example webinterface has been installed into" + elog "/usr/share/mjpg-streamer/www for your usage." + fi +} diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild new file mode 100644 index 000000000000..ddb3c1d833f7 --- /dev/null +++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils + +DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams" +HOMEPAGE="https://sourceforge.net/projects/mjpg-streamer" +SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" + +INPUT_PLUGINS="input_testpicture input_control input_file input_uvc" +OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp" +IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}" +IUSE="input_testpicture input_control +input_file input_uvc output_file + output_udp +output_http output_autofocus output_rtsp + www v4l" +REQUIRED_USE="|| ( ${INPUT_PLUGINS} ) + || ( ${OUTPUT_PLUGINS} ) + v4l? ( input_uvc )" + +RDEPEND="virtual/jpeg + v4l? ( input_uvc? ( media-libs/libv4l ) )" +DEPEND="${RDEPEND} + input_testpicture? ( media-gfx/imagemagick )" + +src_prepare() { + epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch" + epatch "${FILESDIR}/${PV}-to-work-with-kernel-3.18.patch" + + local flag switch + + for flag in ${IUSE_PLUGINS}; do + use ${flag} && switch='' || switch='#' + sed -i \ + -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \ + Makefile + done +} + +src_compile() { + local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true') + emake ${v4l} +} + +src_install() { + into /usr + dobin ${PN//-/_} + dolib.so *.so + + if use www ; then + insinto /usr/share/${PN} + doins -r www + fi + + dodoc README TODO + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} + +pkg_postinst() { + elog "Remember to set an input and output plugin for mjpg-streamer." + + if use www ; then + echo + elog "An example webinterface has been installed into" + elog "/usr/share/mjpg-streamer/www for your usage." + fi +} diff --git a/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild new file mode 100644 index 000000000000..f5858dc445ed --- /dev/null +++ b/media-video/mjpg-streamer/mjpg-streamer-0_pre20120621.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils + +DESCRIPTION="MJPG-streamer takes JPGs from Linux-UVC compatible webcams" +HOMEPAGE="https://sourceforge.net/projects/mjpg-streamer" +SRC_URI="https://dev.gentoo.org/~aidecoe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" + +INPUT_PLUGINS="input_testpicture input_control input_file input_uvc" +OUTPUT_PLUGINS="output_file output_udp output_http output_autofocus output_rtsp" +IUSE_PLUGINS="${INPUT_PLUGINS} ${OUTPUT_PLUGINS}" +IUSE="input_testpicture input_control +input_file input_uvc output_file + output_udp +output_http output_autofocus output_rtsp + www v4l" +REQUIRED_USE="|| ( ${INPUT_PLUGINS} ) + || ( ${OUTPUT_PLUGINS} ) + v4l? ( input_uvc )" + +RDEPEND="virtual/jpeg + v4l? ( input_uvc? ( media-libs/libv4l ) )" +DEPEND="${RDEPEND} + input_testpicture? ( media-gfx/imagemagick )" + +src_prepare() { + epatch "${FILESDIR}/${PV}-make-var-instead-of-cmd.patch" + + local flag switch + + for flag in ${IUSE_PLUGINS}; do + use ${flag} && switch='' || switch='#' + sed -i \ + -e "s|^#*PLUGINS +\?= ${flag}.so|${switch}PLUGINS += ${flag}.so|" \ + Makefile + done +} + +src_compile() { + local v4l=$(use v4l && use input_uvc && echo 'USE_LIBV4L2=true') + emake ${v4l} +} + +src_install() { + into /usr + dobin ${PN//-/_} + dolib.so *.so + + if use www ; then + insinto /usr/share/${PN} + doins -r www + fi + + dodoc README TODO + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} + +pkg_postinst() { + elog "Remember to set an input and output plugin for mjpg-streamer." + + if use www ; then + echo + elog "An example webinterface has been installed into" + elog "/usr/share/mjpg-streamer/www for your usage." + fi +} |