Commit graph

90 commits

Author SHA1 Message Date
Mathieu Duponchelle
93a54093ec mpeg2enc: add disable-encode-retries property
MJPEG Tools may reencode pictures in a second pass to stick
closer to the target bitrate. This can result in slower than
real-time encoding for full HD content in certain situations,
as entire GOPs need reencoding when the reference picture is
reencoded.

See https://sourceforge.net/p/mjpeg/bugs/141/ for background

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Mathieu Duponchelle
674ad01016 mpeg2enc: report a latency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Mathieu Duponchelle
2dfceac9fc mpeg2enc: finalize GstVideoEncoder port
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Tim-Philipp Müller
c9d10e2277 mpeg2enc: store video encoder instance directly in stream writer class
Instead of storing the pad and then only using it to get the
element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Tim-Philipp Müller
8a745529c7 mpeg2enc: remove unused streamwriter member 'buf'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Tim-Philipp Müller
0c28c406cc mpeg2enc: remove some unused code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Tim-Philipp Müller
7f6eb54d42 mpeg2enc: remove code paths for older mjpegtools versions
Gets rid of lots of code paths that no one has built,
used or tested for ages, and makes code more maintainable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Alban Browaeys
79d90b4fd2 mpeg2enc: initial port to GstVideoEncoder base class
https://bugzilla.gnome.org/show_bug.cgi?id=685414

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1491>
2020-08-06 17:13:03 +00:00
Mathieu Duponchelle
a048ce81d4 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:40:42 +02:00
Sebastian Dröge
74f2f733be plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 13:33:16 -04:00
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Tim-Philipp Müller
f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Matthew Waters
278039be06 mpeg2enc: fix werror build with clang
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:1:9: error: '_ONTHEFLYRATECTLPASS1_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:2:9: note: '_ONTHELFYRATECTLPASS1_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS1_HH'?
#define _ONTHELFYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS1_HH
In file included from ../subprojects/gst-plugins-bad/ext/mpeg2enc/gstmpeg2encoder.cc:31:
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:1:9: error: '_ONTHEFLYRATECTLPASS2_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:2:9: note: '_ONTHELFYRATECTLPASS2_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS2_HH'?
#define _ONTHELFYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS2_HH

/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: error: struct 'RateCtl' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct RateCtl;
^
/usr/include/mjpegtools/mpeg2enc/ratectl.hh:50:7: note: previous use is here
class RateCtl
      ^
/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: note: did you mean class here?
struct RateCtl;
^~~~~~
class
2019-08-28 02:47:18 +00:00
Mathieu Duponchelle
42adb02a10 docstrings: port ulinks to markdown links 2019-08-23 20:14:12 +02:00
Mathieu Duponchelle
da6afdec9c doc: remove xml from comments 2019-05-29 22:58:08 +02:00
Thibault Saunier
47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Nicolas Dufresne
c259b8878e meson: mjpegtools_api should have been 20K not 2K
This was miss-ported when the options got added. The requires version was
properly set to 2000 before.
2018-07-27 22:33:47 -04:00
Nirbheek Chauhan
b55dfb5313 Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30
Xavier Claessens
83d0623293 Meson: Generate pc file for all plugins in bad
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:08:09 +01:00
Nicolas Dufresne
4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Nicolas Dufresne
ba0e1df657 Add missing include path for gst/glib-compat-prive.h
This fixes build failure in mplex and mpeg2enc plugins and most likely
in kate plugin (untested).
2017-03-24 15:43:07 -04:00
Nirbheek Chauhan
ddcd7735b6 meson: Build mpeg2enc and mplex when available 2017-03-23 02:48:39 +05:30
Sebastian Dröge
f3ef2ebd1f mpeg2enc: Fix compiler warning with clang
gstmpeg2enc.cc:224:5: warning: variable 'n' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
    n++;
    ^
gstmpeg2enc.cc:221:29: note: incremented here
  for (n = 0; fpss[n] != 0; n++) {
                            ^
2017-01-25 20:54:35 +02:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Vivia Nikolaidou
c3d6635bbf mpeg2enc: Provide format as a string instead of a char to gst_structure_new
The format was provided as 'I420' instead of "I420", causing a crash.
2016-03-02 21:49:29 +02:00
Luis de Bethencourt
49ccb72b47 docs: update gst-launch-0.10 lines
Update references to gst-launch-0.10 to gst-launch-1.0
2015-11-19 17:25:01 +00:00
Luis de Bethencourt
97ed6a2668 mpeg2enc: break statement unnecessary
Code flow never arrives to the break statements due to the goto's. So the
breaks are unnecessary.

https://bugzilla.gnome.org/show_bug.cgi?id=736942
2014-09-25 15:45:57 +01:00
Tim-Philipp Müller
0eed275a51 mpeg2enc: increase max. allowed value for bitrate property
For DVD the limit is around 10Mbit/s, but for e.g. ATSC
it could be much higher.
2014-06-01 10:47:17 +01:00
Vincent Penquerc'h
084c4d5dc4 mpeg2enc: remove dead assignment
Coverity 1139829
2014-04-09 10:33:10 +01:00
Edward Hervey
8ca5387b0f mpeg2enc: Add missing break in switch
QUERY_CAPS is fully handled, we don't need to passthrough to the default
handler.

CID #1139756
2014-04-08 11:20:29 +02:00
Tim-Philipp Müller
40c10dc59e mpeg2enc: avoid list for one single value in template caps 2013-12-01 23:31:25 +00:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Wim Taymans
dbed726057 update for task api change 2012-06-20 10:40:42 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Sebastian Dröge
1318a97e0a gst: Update versioning 2012-04-04 14:44:34 +02:00
Mark Nauwelaerts
0a8a8aac52 mpeg2enc: also clear initialized mutex and cond 2012-03-14 17:48:40 +01:00
Wim Taymans
1119f6ee41 Merge branch 'master' into 0.11
Conflicts:
	ext/chromaprint/gstchromaprint.c
	ext/mpeg2enc/Makefile.am
	ext/voaacenc/gstvoaacenc.c
	gst/dvbsuboverlay/gstdvbsuboverlay.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/sdp/gstsdpdemux.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	tests/examples/camerabin/gst-camera-perf.c
	tests/examples/camerabin/gst-camerabin-test.c
	tests/examples/camerabin2/gst-camerabin2-test.c
	tests/examples/mxf/mxfdemux-structure.c
	tests/examples/scaletempo/demo-main.c
2012-02-10 16:46:50 +01:00
Wim Taymans
de1f89bf07 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:37:13 +01:00
Tim-Philipp Müller
f8f4620451 build: fix CFLAGS order and LIBS order
_BAD_CFLAGS should always come first, then GST_PLUGINS_BASE_CFLAGS,
then GST_BASE_CFLAGS then GST_CFLAGS. Same for libs: first plugins
base libs, then GST_BASE_LIB then GST_LIBS.
2012-02-03 00:50:33 +00:00
Vincent Penquerc'h
8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Mark Nauwelaerts
5abef3c14b mpeg2enc: port to 0.11 2012-01-25 18:50:40 +01:00
Vincent Penquerc'h
7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Tim-Philipp Müller
202a548030 mpeg2enc: fix build with 1.9.0 release again after recent fixes for mjpegtools 2.0.0
https://bugzilla.gnome.org/show_bug.cgi?id=650970
2011-05-25 14:44:50 +01:00
Götz Waschk
407b025786 mpeg2enc: support mjpegtools 2.0
This adds conditional includes for the renamed headers in mjpegtools 2.0.
Fixes: #650970.
2011-05-24 17:15:17 -07:00
Edward Hervey
261431ef17 mpeg2enc: Lower the rank to MARGINAL
The rationale is that it can't be properly used right now when using
it to encode mpeg2video because of the needs-to-be-rewritten properties
and format negotiation. Other encoders will negotiate in a much saner
fashion.

One such example is that when you pick mpeg2enc for mpeg2video, the
default value for the 'format' property is "Generic MPEG-1", which is
completely wrong if downstream caps are mpeg2. The whole negotiation
code needs some serious loving before this plugin can be bumped back
up to a higher rank.
2011-03-21 10:42:59 +01:00
Stefan Kost
0387a89cad various (ext): add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed.
2010-10-19 17:13:26 +03:00
Руслан Ижбулатов
5f25780b02 Fix printf format strings for gcc 4.5
Done on Windows/MinGW.

Fixes #617146
2010-04-29 10:17:56 +02:00