Commit graph

164 commits

Author SHA1 Message Date
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
Ognyan Tonchev
d9e67777e0 streamsplitter: do not leak events when flushing them
https://bugzilla.gnome.org/show_bug.cgi?id=736796
2014-09-18 12:40:22 +03: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
Thibault Saunier
42ecafec0c streamsplitter: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-06-03 13:03:18 +02: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
Thiago Santos
2fbc04e7bc streamsplitter: push pending events before eos
Push any pending events downstream before pushing eos
2014-01-29 13:58:07 -03:00
Wim Taymans
5df274f824 streamsplitter: handle ACCEPT_CAPS query correctly
We can accept a caps when one of the downstream peers can accept the
caps. This is not the same as checking a subset of the getcaps
result because parsers might accept broader caps than what their getcaps
function returns (See https://bugzilla.gnome.org/show_bug.cgi?id=677401).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=722330
2014-01-16 16:32:34 +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
9dd0e6cccc ext/gst: Ensure default query/event handlers are used
And in some cases, just remove our implementation that does nothing
2013-07-26 16:08:35 +02:00
Sebastian Dröge
d4b48ec70d streamcombiner: Proxy all sink events downstream
Thanks to Mathieu Duponchelle for noticing this regression
introduced with the last change.

https://bugzilla.gnome.org/show_bug.cgi?id=704706
2013-07-23 09:14:23 +02:00
Sebastian Dröge
9bd140d3b7 streamcombiner: Fix locking
We have to hold the streams-lock when iterating over all pads,
also the stream-lock of the pad is already locked when we receive
EOS.

Call gst_pad_event_default() for the correct default handling of
events.
2013-07-22 08:08:27 +02:00
Mathieu Duponchelle
2f8b0f1e34 encoding: fix EOS handling in streamsplitter / combiner.
This commit adds a streamcombinerpad with an is_eos field.
When streamcombiner receives an EOS on one of its pads, it
forwards it all its other pads are EOS.
This commit also removes the notion of "stream-switching-eos".
2013-07-21 20:25:54 -04:00
Thibault Saunier
b940cba826 streamsplitter: Keep srcpad alive while querying peer 2013-05-02 12:29:48 +01:00
Sebastian Dröge
948a4a3632 gst: Add better support for static plugins 2013-04-15 15:52:58 +02: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
Sebastian Dröge
3c1041d5eb Revert "gst: Add better support for static plugins"
This reverts commit d2d79e3bc2,
which was accidentially pushed.
2012-10-24 13:26:26 +02:00
Sebastian Dröge
d2d79e3bc2 gst: Add better support for static plugins 2012-10-24 12:10:44 +02: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
95442368bd smartencoder: use gst_quark_from_static_string() 2012-06-23 14:55:51 +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
Sebastian Dröge
65307dd132 gst: Update versioning 2012-04-04 14:55:15 +02:00
Wim Taymans
25137962ad fix for caps API changes 2012-03-11 19:04:41 +01:00
Tim-Philipp Müller
6b12cee5a8 encoding: port to new GLib threading API 2012-01-18 17:21:36 +00:00
Sebastian Dröge
dc8984d76c Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/app/gstappsrc.c
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/video/videooverlay.c
	gst/playback/gstplaysink.c
	gst/playback/gststreamsynchronizer.c
	tests/check/Makefile.am
	win32/common/libgstvideo.def
2012-01-10 13:15:12 +01:00
Havard Graff
95be60de15 Fix various unlikely, but still potential memoryleaks in error code paths
https://bugzilla.gnome.org/show_bug.cgi?id=667311
2012-01-05 13:27:23 +00:00
Wim Taymans
e2f91075e4 streamcombiner: fix srcpad query caps
The caps query on the srcpad should return the template caps instead of
forwarding the query.
2012-01-02 18:28:46 +01:00
Tim-Philipp Müller
0d98aa25b8 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.

Replace g_thread_create() with g_thread_try_new().
2011-12-04 17:16:30 +00:00
Tim-Philipp Müller
177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik
14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Vincent Penquerc'h
96374054ac various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:09:02 +00:00
Wim Taymans
e302833e65 add parent to pad functions 2011-11-17 12:48:25 +01:00
Wim Taymans
2202511e77 add parent to query function 2011-11-16 17:25:17 +01:00
Wim Taymans
026ec68f75 _peer_get_caps() -> _peer_query_caps() 2011-11-15 18:04:17 +01:00
Wim Taymans
7402d3a3d2 update for _get_caps() -> _query_caps() 2011-11-15 18:04:17 +01:00
Wim Taymans
ab9ffa93f5 change getcaps to query
Add sink and src event functions in rtpbasepayload
Add query vmethod to rtpbasepayload.
2011-11-15 18:04:16 +01:00
Wim Taymans
cf8481b990 fix pad template names for request pads 2011-11-04 10:49:48 +01:00
Wim Taymans
5bdfd6d899 structure: fix for api update 2011-11-02 09:04:27 +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
Thiago Santos
c874edd089 encodebin: rename flags names
Rename flags names from native-audio/-video to
no-audio/video-conversion to be more explicit on what it does
2011-07-28 11:21:26 -03:00
Tim-Philipp Müller
dd56714b14 ffmpegcolorspace -> videoconvert 2011-07-07 23:59:59 +01:00
Wim Taymans
26cc33cb62 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/tag/gstxmptag.c
	gst/encoding/gststreamsplitter.c
2011-07-07 11:10:39 +02:00
Luis de Bethencourt
bf816fe816 encodebin: fix compiler warning
cspace and cspace2 may run uninitialized.
2011-06-30 19:57:22 +01:00
Robert Swain
7ad1ba6fba encodebin: Add flags to disable conversion elements
Add a flags property and two flags to allow one to disable the
conversion elements within encodebin. Doing so insists that the
uncompressed input to encodebin for the appropriate stream type is
sufficient to meet the caps requirements of the encoders, muxers and
encodebin target.

This is mostly beneficial to bypass slow caps negotiations in the
conversion elements.
2011-06-30 00:59:18 +02:00
Robert Swain
dc79c42484 streamsplitter: Fix getcaps src pad caps merge
Caps returned from gst_pad_peer_get_caps_reffed () may not be writable.
If they are not is should cause an assertion in gst_caps_merge (),
however, sometimes assertions are disabled in binary builds of -base and
it's safer to just be sure the caps are writable. Also, check that the
reffed caps pointer is not NULL.
2011-06-29 11:57:52 +02:00
Tim-Philipp Müller
8cede4ae6a gst, sys: remove GstImplementsInterface usage 2011-06-26 23:16:08 +01:00
Wim Taymans
d06f599193 -base: port elements to new video caps 2011-06-16 12:52:13 +02:00
Wim Taymans
db999572a8 -base: fix for flush_stop event API change 2011-06-10 11:59:53 +02:00
Wim Taymans
beb864bd93 -base: use caps event instead of setcapsfunction 2011-06-07 10:58:27 +02:00
Wim Taymans
e614c6bd81 feature: use object name instaed of feature name 2011-05-24 18:21:06 +02:00
Wim Taymans
6688eea15c encodebin: use new method
Use the new element class method to get the metadata from an element. Not all
elements might have an elementfactory.
2011-05-20 12:50:39 +02:00
Sebastian Dröge
1be10803ba encodebin: Fix compilation after the removal of GstElementDetails 2011-05-20 12:32:35 +02:00
Sebastian Dröge
a9b134d1a9 Merge branch 'master' into 0.11
Conflicts:
	docs/plugins/gst-plugins-base-plugins.hierarchy
	docs/plugins/gst-plugins-base-plugins.interfaces
	docs/plugins/gst-plugins-base-plugins.prerequisites
2011-05-20 12:26:57 +02:00
Thiago Santos
b5fb542386 encodebin: Autoplug formatters
Autoplug formatters for streams if a formatter with secondary or
higher rank is found. Formatters are autoplugged when there is no
muxer or when the muxer doesn't implement the tagsetter interface.

Currently only the first formatter found is plugged, this might
help in lots of cases, but it doesn't solve the
'lamemp3 ! xingmux ! id3mux'
case.

https://bugzilla.gnome.org/show_bug.cgi?id=649841
2011-05-19 08:35:46 -03:00
Thiago Santos
0060900d68 encodebin: fix typos 2011-05-19 08:30:03 -03:00
Sebastian Dröge
884213b8b8 base: Update for SEGMENT event parse API changes 2011-05-18 17:23:18 +02:00
Sebastian Dröge
03f9ca3d64 encodebin: Update for caps/pad template related API changes 2011-05-17 13:06:00 +02:00
Sebastian Dröge
318ed07598 Revert "-base_port to new query API"
This reverts commit c9f4e0676b.
2011-05-17 11:25:31 +02:00
Sebastian Dröge
d0362c2b87 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	ext/alsa/gstalsasrc.c
	gst-libs/gst/audio/gstbaseaudiosink.c
	gst-libs/gst/tag/gstxmptag.c
	gst/playback/gstsubtitleoverlay.c
	gst/videorate/gstvideorate.c
	sys/xvimage/xvimagesink.c
2011-05-16 17:06:22 +02:00
Sebastian Dröge
709b831a72 encodebin: Update for negotiation related API changes 2011-05-16 15:35:40 +02:00
Wim Taymans
94dfe80f71 -base: port to new SEGMENT API 2011-05-16 13:48:11 +02:00
Thiago Santos
fd486588ce encodebin: Check for missing converters
Adds checks for missing video and audio converter elements
2011-05-15 13:02:39 -03:00
Wim Taymans
c9f4e0676b -base_port to new query API 2011-05-10 18:39:07 +02:00
Wim Taymans
7cad11e912 -base: fix for now request pad API 2011-05-10 16:44:37 +02:00
Wim Taymans
816f4e791d segment: fix for new core API
Fix for gst_*_segment_full rename.
2011-05-09 18:16:46 +02:00
Wim Taymans
ec57868488 -base: don't use buffer caps
Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
2011-05-09 13:05:12 +02:00
Sebastian Dröge
64851f12c0 gst: Update for new GstIterator API 2011-05-05 16:03:52 +02:00
Sebastian Dröge
352edd1dd9 Merge branch 'master' into 0.11 2011-04-16 09:12:31 +02:00
Sebastian Dröge
67d2f852ff encodebin: Set all elements to NULL and remove them from the bin when removing a source group 2011-04-14 12:23:10 +02:00
Wim Taymans
6e160bed3d Merge branch 'master' into 0.11
Conflicts:
	android/alsa.mk
	android/app.mk
	android/app_plugin.mk
	android/audio.mk
	android/audioconvert.mk
	android/decodebin.mk
	android/decodebin2.mk
	android/gdp.mk
	android/interfaces.mk
	android/netbuffer.mk
	android/pbutils.mk
	android/playbin.mk
	android/queue2.mk
	android/riff.mk
	android/rtp.mk
	android/rtsp.mk
	android/sdp.mk
	android/tag.mk
	android/tcp.mk
	android/typefindfunctions.mk
	android/video.mk
2011-04-11 11:37:51 +02:00
Alessandro Decina
030f639a8e android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the
needed Android.mk files.
Androgenizer can be found here:
http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:23:21 +02:00
Wim Taymans
da1c863711 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/tag/gstvorbistag.c
2011-04-04 11:31:33 +02:00
David Schleef
12513a9537 Remove setting of plugindir from Makefiles 2011-04-01 13:55:56 -07:00
Wim Taymans
95f7fd8edf Merge branch 'master' into 0.11-fdo 2011-03-15 11:11:56 +01:00