diff options
Diffstat (limited to 'media-video/guvcview')
-rw-r--r-- | media-video/guvcview/Manifest | 3 | ||||
-rw-r--r-- | media-video/guvcview/files/ffmpeg4.patch | 195 | ||||
-rw-r--r-- | media-video/guvcview/guvcview-2.0.5.ebuild | 3 |
3 files changed, 199 insertions, 2 deletions
diff --git a/media-video/guvcview/Manifest b/media-video/guvcview/Manifest index 53ce93cbd550..f4c6a6fb0e0d 100644 --- a/media-video/guvcview/Manifest +++ b/media-video/guvcview/Manifest @@ -1,8 +1,9 @@ AUX ffmpeg3.patch 1159 BLAKE2B 537c6ef20c0c1ea7396eaca7488487a335e18c33d8982135272bd4344961c1047ad08571e3721d532d5460e48a61ba7d1b65b716597dff6c51d8f9a0b9fc6b21 SHA512 0707e6ff0fa2098b02c58001014d9ddf09b3b9dc9f211d74143c893b0a3cb1bc12cfbb05a05cacf7599689441934a63294d7fbed1a4b4e273aea0058dc41a6ee +AUX ffmpeg4.patch 7046 BLAKE2B 570d5a582bd76a11be2fa444cdce9c178590235eb7f1b765827dddd318ca0923206f45849ea29671e3d642b72a46eb9b58d9c2aa9735c0f312dd81f6002a488d SHA512 bc9225d94160a565bdfd524853d37d54594acae7df80c7ffd694e79943273568bd497e9e0ac24c154823bc272cfdc1f697823feb95d191aea829f331ed0daf98 DIST guvcview-src-2.0.3.tar.gz 1062788 BLAKE2B 18cb79838e5c797fd07219345f7d7ae0a997f4360b95ceabac3c4adddf7cdef57ba23d0514e9038f05a67aef2ce6ab8e656f8a8774c843a7e1db66eaf9a1553a SHA512 976e62ffe26bd9c815ff754337a42512c6fcc9d55285e79e0505f6211a7ca2407546e433fc0e8439ea541ef51a23101b0badda2f9fcc9d197d3a2ab27983b704 DIST guvcview-src-2.0.4.tar.gz 1120666 BLAKE2B 582d2b36effda9dd99b5ee54f42f91bdc0001cc885c3a21f67d3fdb49cac95deaf41bb1700021fc9ae438fc64926abfe9cb1366c32ff8b04e84a30ce771edc09 SHA512 9339e9cf7dc5224f1b87bb21e0ad711d9c27f4197d5f758c70edf465eb01c8c9c51542c75d686f0439f9e843a1c14c2f76835e8529b87b35a737fc5ccb01fe0a DIST guvcview-src-2.0.5.tar.gz 1134237 BLAKE2B 6165349005a07e3e9ea555a7b4aa731ec218f8073dfce8ac5036dd3ccbe4228aeb3b29491c8ad545d5b5ab193045704a60bfcd48459bfc56ad923b583c08f5be SHA512 b4a1216ab2effbd0022d5ba0ce266ac06a781e453d3dbedfe29b654864d3a26fe1e8b68245d76eff854281d42f1871a8a82b06f783b5115e94ec1c111aac05eb EBUILD guvcview-2.0.3.ebuild 1266 BLAKE2B fe89ee1d75f1340b688cbbc344e74b140f337fde49715bbabada8be880d5ef425a2c981ae75fde67092bb43c83079443a86fa0dedfe1129c7602995327f7c494 SHA512 8b2302dd8513622e99895d627006583569c17ffa033df755caa0b0128c83980e33d3163913a76bf83625d17f2a3e0617d3b40a0779aeb87398b0e14648ec9dae EBUILD guvcview-2.0.4.ebuild 1320 BLAKE2B 17fcab349c12b7f8aecab83f62dfe79868ecfe58bca8ec847fb5650be3edcd3391a79d59137933b925a6d3883500c0a8f2a83690fca71e7bb481a39181fbbc67 SHA512 593c8fecd6475822e55a7ec9b4b5176e032f16861c97c1f74a6dc8c3a2234991232740ea76d5d3ab1bac52831f4a1d39d979d464f300485e6e7412632427e095 -EBUILD guvcview-2.0.5.ebuild 1326 BLAKE2B 18e862c8fae52cd65e8085f3dc87f0e3b3711bff96badb907751f5e6a433e29b9096e1cb0f25806b9295a469b94dcbda9ff9d3cab4a19d23ddc2872de48e10f9 SHA512 9b84a52c39b4005d8becedabddc19587491638873600c5d6c7bc1909810734884f7ed2dbb326d4f3f460f90e94e1906819e8485ebb75d513ecb436f862788d68 +EBUILD guvcview-2.0.5.ebuild 1402 BLAKE2B 8601540bb8d20e7090138ffc2111d541858c9bfad0faad5d4df3e20ab86aff0e47df73d6dc4157c117051d15148511634f840b5312ba951ddfa8610e744e782b SHA512 a27b9958971f22e5f7c27fefd8c79e7446885a63e270fdad40ca199f1ac399964cc2c12f9ef20c420582dbfb8b237a4b9cda09c90c2a8a6dea43d58d7bc68616 MISC metadata.xml 301 BLAKE2B 4364fa7d4b27716ae8088bb8f7268bfceb9a607ea39a8ab794359ee2690d134ae493ae11a344dc2f26a25a7c51cecc1a6aad892102a7d7e2ac692fa18d020ae0 SHA512 c4c12767b33b64b58f02905235bebe4337c18d5a7e33dbb02c50c29effa9d236bc137b41ff8b0948aaeab36deb6f282c57d1770d7594cc087caeac7dc1036b8c diff --git a/media-video/guvcview/files/ffmpeg4.patch b/media-video/guvcview/files/ffmpeg4.patch new file mode 100644 index 000000000000..e6421834b5b0 --- /dev/null +++ b/media-video/guvcview/files/ffmpeg4.patch @@ -0,0 +1,195 @@ +Index: guvcview-src-2.0.5/guvcview/gui_qt5_callbacks.cpp +=================================================================== +--- guvcview-src-2.0.5.orig/guvcview/gui_qt5_callbacks.cpp ++++ guvcview-src-2.0.5/guvcview/gui_qt5_callbacks.cpp +@@ -1590,10 +1590,8 @@ void MainWindow::video_codec_properties( + framerefs->setValue(defaults->framerefs); + form.addRow(_("framerefs: "), framerefs); + /*me method*/ +- QSpinBox *me_method = new QSpinBox(&dialog); +- me_method->setRange(1, 10); +- me_method->setSingleStep(1); +- me_method->setValue(defaults->me_method); ++ QLabel *me_method = new QLabel(&dialog); ++ me_method->setText(defaults->me_method); + form.addRow(_("me method: "), me_method); + /*mb decision*/ + QSpinBox *mb_decision = new QSpinBox(&dialog); +@@ -1645,7 +1643,7 @@ void MainWindow::video_codec_properties( + defaults->qblur = qblur->value(); + defaults->subq = subq->value(); + defaults->framerefs = framerefs->value(); +- defaults->me_method = me_method->value(); ++ defaults->me_method = me_method->text().toLatin1().data(); + defaults->mb_decision = mb_decision->value(); + defaults->max_b_frames = max_b_frames->value(); + defaults->num_threads = num_threads->value(); +Index: guvcview-src-2.0.5/gview_encoder/encoder.c +=================================================================== +--- guvcview-src-2.0.5.orig/gview_encoder/encoder.c ++++ guvcview-src-2.0.5/gview_encoder/encoder.c +@@ -445,10 +445,8 @@ static encoder_video_context_t *encoder_ + #if !LIBAVCODEC_VER_AT_LEAST(56,60) + video_codec_data->codec_context->me_method = video_defaults->me_method; + #else +- if( video_defaults->codec_id == AV_CODEC_ID_H264 && video_defaults->me_method > 4) +- video_defaults->me_method = X264_ME_HEX; +- +- av_dict_set_int(&video_codec_data->private_options, "motion-est", video_defaults->me_method, 0); ++ if(video_defaults->me_method) ++ av_dict_set(&video_codec_data->private_options, "motion-est", video_defaults->me_method, 0); + #endif + + #if !LIBAVCODEC_VER_AT_LEAST(57,00) +Index: guvcview-src-2.0.5/gview_encoder/gviewencoder.h +=================================================================== +--- guvcview-src-2.0.5.orig/gview_encoder/gviewencoder.h ++++ guvcview-src-2.0.5/gview_encoder/gviewencoder.h +@@ -104,7 +104,7 @@ typedef struct _video_codec_t + char codec_name[20]; //lavc codec_name + int mb_decision; //lavc mb_decision + int trellis; //lavc trellis quantization +- int me_method; //lavc motion estimation method ++ const char* me_method; //lavc motion estimation method + int mpeg_quant; //lavc mpeg quantization + int max_b_frames; //lavc max b frames + int num_threads; //lavc num threads +Index: guvcview-src-2.0.5/gview_encoder/video_codecs.c +=================================================================== +--- guvcview-src-2.0.5.orig/gview_encoder/video_codecs.c ++++ guvcview-src-2.0.5/gview_encoder/video_codecs.c +@@ -97,7 +97,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "none", + .mb_decision = 0, + .trellis = 0, +- .me_method = 0, ++ .me_method = NULL, + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 0, +@@ -133,7 +133,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "mjpeg", + .mb_decision = 0, + .trellis = 0, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 0, +@@ -169,7 +169,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "mpeg1video", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 1, +@@ -205,11 +205,11 @@ static video_codec_t listSupCodecs[] = + .codec_name = "flv", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 1, +- .flags = CODEC_FLAG_4MV ++ .flags = AV_CODEC_FLAG_4MV + }, + { + .valid = 1, +@@ -241,7 +241,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "wmv1", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 1, +@@ -277,7 +277,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "mpeg2video", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 1, +@@ -313,7 +313,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "msmpeg4v3", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 0, + .max_b_frames = 0, + .num_threads = 1, +@@ -349,7 +349,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "mpeg4", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 1, +- .me_method = ME_EPZS, ++ .me_method = "epsz", + .mpeg_quant = 1, + .max_b_frames = 0, + .num_threads = 1, +@@ -385,7 +385,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "libx264", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 0, +- .me_method = X264_ME_HEX, ++ .me_method = "hex", + .mpeg_quant = 1, + .max_b_frames = 16, + .num_threads = 4, +@@ -426,7 +426,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "libx265", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 0, +- .me_method = ME_HEX, ++ .me_method = "hex", + .mpeg_quant = 1, + .max_b_frames = 16, + .num_threads = 4, +@@ -463,7 +463,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "libvpx_vp8", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 0, +- .me_method = ME_HEX, ++ .me_method = "hex", + .mpeg_quant = 1, + .max_b_frames = 0, + .num_threads = 4, +@@ -500,7 +500,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "libvpx_vp9", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 0, +- .me_method = ME_HEX, ++ .me_method = "hex", + .mpeg_quant = 1, + .max_b_frames = 16, + .num_threads = 4, +@@ -537,7 +537,7 @@ static video_codec_t listSupCodecs[] = + .codec_name = "libtheora", + .mb_decision = FF_MB_DECISION_RD, + .trellis = 0, +- .me_method = ME_HEX, ++ .me_method = "hex", + .mpeg_quant = 1, + .max_b_frames = 0, + .num_threads = 4, +Index: guvcview-src-2.0.5/gview_v4l2core/uvc_h264.c +=================================================================== +--- guvcview-src-2.0.5.orig/gview_v4l2core/uvc_h264.c ++++ guvcview-src-2.0.5/gview_v4l2core/uvc_h264.c +@@ -1039,7 +1039,7 @@ int h264_init_decoder(int width, int hei + exit(-1); + } + +- h264_ctx->context->flags2 |= CODEC_FLAG2_FAST; ++ h264_ctx->context->flags2 |= AV_CODEC_FLAG2_FAST; + h264_ctx->context->pix_fmt = AV_PIX_FMT_YUV420P; + h264_ctx->context->width = width; + h264_ctx->context->height = height; diff --git a/media-video/guvcview/guvcview-2.0.5.ebuild b/media-video/guvcview/guvcview-2.0.5.ebuild index d2b5e54c3eab..80229e7311d7 100644 --- a/media-video/guvcview/guvcview-2.0.5.ebuild +++ b/media-video/guvcview/guvcview-2.0.5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -41,6 +41,7 @@ S=${WORKDIR}/${MY_P} src_prepare() { sed -i '/^docdir/,/^$/d' Makefile.am || die + has_version '>=media-video/ffmpeg-4' && epatch "${FILESDIR}/ffmpeg4.patch" eautoreconf } |