Commit graph

85 commits

Author SHA1 Message Date
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Thibault Saunier
fe0e51914a encodebin: Fix stream_group_free when creating it went bad
Avoiding trying to use NULL pointers
2017-01-04 11:43:08 -03:00
Tim-Philipp Müller
b00bba5d43 encodebin: fix queue property types when setting 2017-01-02 12:56:04 +00:00
Song Bing
01f467f6a4 encodebin: allow more buffers in output queue for better performance
https://bugzilla.gnome.org/show_bug.cgi?id=744191
2017-01-02 12:56:04 +00:00
Thibault Saunier
5fd3142b67 encodebin: Fix build initializing sprof 2016-12-19 15:08:12 -03:00
Thibault Saunier
c8ea302e57 encodebin: Fallback to other profile if we fail with one
In some case we might have EncodingProfile that will be defined
in a way that, for example if a Preset is not present, another
profile for that stream should be used.

A test is added showing the feature.

https://bugzilla.gnome.org/show_bug.cgi?id=776188
2016-12-19 10:13:23 -03:00
Thibault Saunier
2d1b5a1dc2 encodebin: Enhance error debug when failing to create an encoder 2016-12-19 10:13:23 -03:00
Thibault Saunier
d67f945177 encoding-profile: Fix documentation and port to gtk markdown
And remove some trailling whitepsaces
2016-12-16 11:27:31 -03:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Sebastian Dröge
e79749a531 encodebin: Make dispose() function safe to be called multiple times 2016-03-02 18:47:23 +02:00
Thibault Saunier
135c612550 encodebin: Allow streamheader update when profile.allow_dynamic_output == FALSE
Some encoders can update the stream header through time (for example
vp8 might do that) but it does not strictly changes the output format.
2016-01-27 12:58:23 +01:00
Mathieu Duponchelle
0c0f803488 encodebin: Fix special case
Allows to run such a command line :

gst-launch-1.0 uridecodebin uri=file:///home/meh/Music/sthg.mp4 ! \
encodebin profile-string="audio/x-wav|1" ! filesink location=sthg.wav

Previously the code failed because wavenc is considered as a muxer.
We still want encodebin to audio/x-wav as an AudioEncodingProfile,
so this simple fix allows that.

Ability to mux raw streams in containers such as matroskamux
is a different issue.

https://bugzilla.gnome.org/show_bug.cgi?id=751470
2015-10-02 17:25:48 +03:00
Thibault Saunier
dcfb8a83a5 encodebin: Add a way to enable/disabled a GstEncodingProfile
Summary:
So that the user can easily use the same encoding profile to render
with/without audio/video stream.

API:
  gst_encoding_profile_is_disabled
  gst_encoding_pofile_set_enabled

https://bugzilla.gnome.org/show_bug.cgi?id=749056
2015-06-01 10:22:31 +02:00
Luis de Bethencourt
df08f5eabe remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused. Removing them.
2015-04-24 17:11:01 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Thibault Saunier
72c05d1cbb encodebin: Add a way to disable caps renegotiation for output stream format
In some cases, the user might want the stream outputted by encodebin to
be in the exact same format during all the stream. We should let the
user specify when this is the case. This commit add some API in the
GstEncodingProfile to determine whether the format can be renegotiated
after the encoding started or not.

API:
    gst_encoding_profile_set_allow_dynamic_output
    gst_encoding_profile_get_allow_dynamic_output

https://bugzilla.gnome.org/show_bug.cgi?id=740214
2014-11-28 16:56:32 +01:00
Tim-Philipp Müller
d0aa9f9a34 encodebin: fix some leaks in error code path
Fixes test_encodebin_sink_pads_nopreset_static
running under valgrind.
2014-10-14 16:54:44 +01:00
Tim-Philipp Müller
db857e5a97 encoding: remove assignment that's no longer needed
CID 1231980
2014-08-29 18:21:13 +01:00
Thiago Santos
c9904fb639 encodebin: delay missing encoder error as passthrough is still possible
Set up a fakesink with a pad probe to replace the missing encoder to detect
if encoding was really required and only error out in this case. Otherwise
just let passthrough branch work.

This delays the error posting from the set_state function to when buffers
are really flowing. Unit test updated accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=650652
2014-08-11 10:30:58 -03:00
Vincent Penquerc'h
ea176f3865 encodebin: guard against gst_pad_get_peer returning NULL
If it does, the pad may be leaked if it's a request pad, though.

Coverity 1139799
2014-04-10 13:28:30 +01:00
Vincent Penquerc'h
1afa3040b8 encodebin: guard against pathological NULL dereference
Coverity 1139798
2014-04-10 13:26:42 +01:00
Thibault Saunier
4305e1c33e encodebin: Handle changes in encoding_profile::restriction during playback
There are cases where we want to change the restrictions caps during
playback, handle that in encodebin.

https://bugzilla.gnome.org/show_bug.cgi?id=709588
2013-10-09 15:25:19 -03:00
Edward Hervey
b3d94bd0e4 encodebin: Add action signal to get pad for a given profile
This allows getting a pad for a specific encoding profile, which can
be useful when there are several stream profiles of the same type.

Also update the encodebin unit tests so that we check that the returned
pad has the right caps.

https://bugzilla.gnome.org/show_bug.cgi?id=689845
2013-03-31 12:02:05 +02:00
Vincent Penquerc'h
bccfc679b5 encodebin: activate ghost pad after creating it
This ensures the ghost pad will not stay in flushing mode
when it receives a flush stop event, and generally behave
badly.

This fixes at least one case of a dynamic decodebin2 + encodebin
pipeline finding a source that has not prerolled when it should
have been (due to the ghostpad staying in flushing mode).
2013-02-14 16:07:48 +00:00
Vincent Penquerc'h
17cdb54aa4 encodebin: sync muxer state with parent bin
Other elements were synced, but not the muxer.
2013-02-12 17:27:10 +00:00
Thibault Saunier
e79f0e801e encodebing: Use the preset_name as the factory name and preset as the name of the preset
The naming is not perfect, but at least we can keep the exact same behaviour as
before.
2012-12-17 10:12:11 -03:00
Thibault Saunier
7358cba017 encodebin: Make use of the new preset_name when setting a preset
The behaviour is sensibly changed here. Instead of purely falling when a
preset is set on the #GstEncodingProfile, we now make sure that the
element that is plugged corresponds to the one specified as preset. Then,
if we have a preset_name, we use it, if it fails, we fail (we might rather
just keep working even without setting the element properties?)

 + Add tests that it behave correctly
2012-12-05 17:48:38 -03:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Alban Browaeys
579458f613 encodebin: muxer sink pad is not always a request pad
GstId3Mux sink pad is an always (static) pad. Thus releasing it
as if a request pad triggers:
(sound-juicer:11826): GStreamer-CRITICAL **:
gst_element_release_request_pad: assertion `GST_PAD_PAD_TEMPLATE (pad)
== NULL || GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) ==
GST_PAD_REQUEST' failed

https://bugzilla.gnome.org/show_bug.cgi?id=685110
2012-09-30 15:08:17 +01:00
Tim-Philipp Müller
7c2e7b1a4f text/plain + text/x-pango-markup -> text/x-raw 2012-09-02 02:45:41 +01:00
Tim-Philipp Müller
7b89dddede encodebin: rename flags type name 2012-08-29 19:23:57 +01:00
Tim-Philipp Müller
5b715cdb90 video/x-dvd-subpicture -> subpicture/x-dvd 2012-08-20 21:36:15 +01:00
Tim-Philipp Müller
452b38560c encodebin: use generic marshaller for signal 2012-08-05 14:02:01 +01:00
Tim-Philipp Müller
1c77a3d801 encodebin: don't access GstElementFactory structure directly 2012-05-19 15:17:18 +01:00
Tim-Philipp Müller
3c6a3ad629 Use new gst_element_class_set_static_metadata() 2012-04-10 00:45:16 +01:00
Sebastian Dröge
ad42b16375 gst: Update for GST_PLUGIN_DEFINE() API change 2012-04-05 15:11:05 +02:00
Mark Nauwelaerts
0ad7fe0590 encodebin: release additional obtained caps reference 2012-04-04 19:57:27 +02:00
Wim Taymans
7402d3a3d2 update for _get_caps() -> _query_caps() 2011-11-15 18:04:17 +01:00
Wim Taymans
cf8481b990 fix pad template names for request pads 2011-11-04 10:49:48 +01:00
Wim Taymans
73b894107a Merge branch 'master' into 0.11
Conflicts:
	ext/vorbis/gstvorbisdec.c
	ext/vorbis/gstvorbisenc.c
	ext/vorbis/gstvorbisenc.h
	gst/audiotestsrc/gstaudiotestsrc.c
2011-10-08 10:19:06 +02:00
Thiago Santos
59f0b29c3f encodebin: Re-enable parsers
Re-enable parsers in encodebin to allow more passthrough scenarios
to work. Specially the ones that require changing 'stream formats'.
i.e. h264 in mkv to mpegts.
2011-10-05 14:55:42 -03:00
Wim Taymans
e787c7a5e2 Merge branch 'master' into 0.11
Conflicts:
	ext/pango/gsttextoverlay.c
	gst/encoding/gstencodebin.c
2011-10-03 10:11:19 +02:00
Thiago Santos
a223775089 encodebin: Fix typo on formatter adding condition
The condition is if the muxer doesn't have tag setter *and* isn't
a formatter itself. Any of those two conditions makes the muxer
good enough to not need a formatter.
2011-09-30 10:56:06 -03:00
Robert Swain
635d2411cc encodebin: Avoid unnecessary read only caps copy 2011-09-23 17:50:31 +02:00
Wim Taymans
7012e88090 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/audio/audio.h
	gst-libs/gst/audio/gstaudiodecoder.c
	gst-libs/gst/audio/gstaudiodecoder.h
	gst-libs/gst/audio/gstaudioencoder.c
	gst-libs/gst/audio/gstbaseaudioencoder.h
	gst/playback/Makefile.am
	gst/playback/gstplaybin.c
	gst/playback/gstplaysink.c
	gst/playback/gstplaysinkvideoconvert.c
	gst/playback/gstsubtitleoverlay.c
	gst/videorate/gstvideorate.c
	gst/videoscale/gstvideoscale.c
	win32/common/libgstaudio.def
2011-09-06 15:24:32 +02:00
Thiago Santos
2768ed75e0 encodebin: Select muxer further
Sort muxers based on their caps and ranking before iterating to
find one that fits the profile.

Sorting is done by putting the elements that have a pad template
that can produce the exact caps that is on the profile. For example:
when asking for "video/quicktime, variant=iso", muxers that
have this exact caps on their pad templates will be put first on
the list than ones that have only "video/quicktime".

https://bugzilla.gnome.org/show_bug.cgi?id=651496
2011-09-05 17:48:36 -03:00
Wim Taymans
8023f49d19 more audio caps porting 2011-08-19 17:41:22 +02:00
Wim Taymans
33467d9629 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	ext/pango/gsttextoverlay.c
	ext/theora/gsttheoradec.c
	gst/adder/gstadder.c
	gst/adder/gstadder.h
	gst/audioresample/gstaudioresample.c
	gst/encoding/gstencodebin.c
	gst/playback/gstdecodebin.c
	gst/playback/gstdecodebin2.c
	tests/check/elements/decodebin2.c
	tests/check/elements/playbin-compressed.c
	win32/common/libgsttag.def
2011-08-16 18:01:14 +02:00
Thiago Santos
3687b056c4 encodebin: Set queues to silent=true
As encodebin doesn't connect to the queue signals, it can set
queues to silent mode to make queue not emit them.

Check https://bugzilla.gnome.org/show_bug.cgi?id=621299 for
more info on queue's silent property.
2011-08-03 14:14:55 -03:00
Thiago Santos
b263bacc57 encodebin: Fix typo on installing properties
queue buffers and bytes properties have ids swapped, fix it.
2011-08-03 13:41:10 -03:00