Commit b935a814 authored by Sebastian Dröge's avatar Sebastian Dröge

Merge branch 'master' into 0.11

Conflicts:
	configure.ac
	docs/gst/gstreamer-sections.txt
	gst/gstbin.c
	gst/gstelement.c
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
	gst/gstminiobject.h
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstinputselector.c
	tests/check/gst/gstminiobject.c
parents 6bff1f96 fe1dcbe6
This diff is collapsed.
This is GStreamer 0.10.32 "Take Me to the Bonus Level"
This is GStreamer 0.10.34 "Misfits"
Changes since 0.10.33:
* Fix multiqueue thread-safety regression
* Don't set artificial 0-timestamp on first packet for TIME-based live sources
* Otherwise identical to the previous release (0.10.33)
Bugs fixed since 0.10.33:
* 649369 : basesrc: do not set first buffer timestamp to 0 for live sources
* 649878 : multiqueue regression: gst_single_queue_new not MT-safe
Changes since 0.10.32:
* atomicqueue: add an atomic/lock-free queue structure based
* bufferlist: improve _add*() performance
* bus: in _add_watch() honour any per-thread default main context set via g_main_thread_push_thread_default()
* caps: new gst_caps_intersect_full() to intersect in different modes
* clock: add functions to re-init existing periodic GstClockIDs
* event: add QoS type (overflow, underflow, throttle) for QoS events
* ghostpad: The internally linked pad of the proxypad is the ghostpad
* gstpoll: retry reading the control socket to release properly all wakeups
* message: new progress message API for asynchronous operations
* pad: unlock before freeing the pad cache to avoid deadlock
* pad: better handling for when parent goes away during data/query/event flow
* parse-launch: allow element names to begin with digits
* pluginloader: call gst-plugin-scanner with the right arch on OSX, fixing hangs with firefox
* registry: fixes elements (features) disappearing if a plugin or plugin file is renamed
* structure: Add "(date)" as a type abbreviation of GDate
* structure: Don't allow invalid GDates in all structures and don't allow NULL GDates in taglists
* taglist: add a new "encoded-by" tag
* uri: add gst_filename_to_uri() that takes relative filenames
* utils: add gst_element_factory_can_{src|sink}_{any|all}_caps() to replace can_{sink,src}_caps()
* baseparse: new GstBaseParse class for parsers
* basesink: improve rate, duration, and average duration calculation
* basesink: use new QoS types and add add "throttle-time" property
* basesrc: Handle tag and custom downstream events the same
* basesrc: keep downstream caps order when fixating, to honour downstream preferences when negotiating
* basesrc: Return FALSE if we don't handle an event
* basesrc: Send synchronized custom downstream/both events downstream from the streaming thread
* basetransform: Be smarter with pad allocs
* basetransform: Check for pad alloc caps when suggestion is not fixed
* basetransform: Retain caps order when getting caps, to honour downstream preferences when negotiating
* funnel: new N-to-1 pipe fitting element imported from farsight
* fakesink: print buffer flags
* filesink: Fix escaping of URIs
* file{sink,src}: Check if non-URI characters are escaped, but only for the URI not the location property
* filesrc, filesink: fix URI creation regression for non-absolute locations
* filesrc: Fix escaping of file uris
* inputselector: Hold the selector lock while reading properties of the active pad
* inputselector: Make sure that EOS is always sent downstream for the active pad
* inputselector: Return GST_FLOW_OK until the selected pad pushed something downstream
* inputselector: Stop waiting for a pad switch when the pad is flushing
* multiqueue: fix some potential corner-case deadlocks and some leaks
* multiqueue: handle arbitrary sink + source pad naming
* queue2: don't read beyond the end of file upstream in pull mode; leak fixes
* plugins: make query and event functions more thread-safe, protect against parent-pad disappearing
* gst-launch: add GstIndex support
Bugs fixed since 0.10.32:
* 642356 : [Index] review api and add an example
* 402141 : gst_element_factory_can_{sink,src}_caps seems to be broken
* 518857 : [API] GstBaseParse: new base class for parsers
* 604094 : registry: do not remove features when removing a cached plugin that no longer is present
* 615357 : [macosx] Handle multi-arch plugin-scanner
* 617045 : [caps] New method for intersecting caps while retaining order
* 639674 : parse-launch: improve parsing resilience (for escapes at end of string)
* 639962 : design docs: Fix a few typos and a think
* 640071 : pluginloader: do not leak the description string of blacklisted plugin
* 640437 : design docs: fix 2 typos in part-MT-refcounting
* 640502 : fix a few typos
* 640622 : gst_element_link_pads_full function return wrong error information
* 640675 : high cpu-load with 0.10.32 release
* 640850 : GstElement: Fix warning with GCC 4.6
* 641212 : gst-uninstalled: use $GST_PREFIX variable
* 641928 : gst_pad_push fast path races with pad deactivation
* 642071 : Incorrect comparing of number of source and sink links when parsing a launch string
* 642130 : [basetransform] Check for pad alloc caps when suggestion is not fixed
* 642271 : crash in gst_caps_structure_intersect, encoder_match_media_type
* 642373 : [basetransform] Avoid too may pad allocs
* 642393 : [filesrc] Fails setting the same uri it's setting in the uri queries.
* 642504 : [mingw/cygwin build] correctly export plugin description
* 642522 : gstvalue.c does not include a deserialize function for uchar
* 642869 : gst_index_new: documentation typo
* 643301 : Adding a buffer to a buffer list iterates the list
* 643455 : [regression] Lots of dropouts in Empathy voip calls
* 644935 : [inputselector] During switching of streams it can happen that all pads returned not-linked last
* 645022 : GstTask: typo in GST_TASK_BROADCAST - g_cond_breadcast should probably be g_cond_broadcast
* 645267 : build: fix build with -Werror with GCC 4.6.0
* 645595 : bytereader, bytewriter: fix warnings when using inline functions with g++
* 645746 : [gstpoll] Regression causes 100% cpu usage in multifdsink
* 645877 : commit 14d7db1 causes cpu spinning and other bus weirdness
* 645931 : [gstmultiqueue] fix arbitrary sink + source pad naming
* 646118 : [gstmultiqueue] if arbitrary sink number is specified by caller, use this as single queue id
* 646341 : [baseparse] Add a queued flow return so parsers can keep frames in a queue
* 646531 : GST_BOILERPLATE: don't use " type " as both a variable name and a macro argument
* 646566 : Protect against Pad-Parent disappearing
* 646569 : poll: don't call WSAWaitForMultipleEvents with no events
* 646624 : GstBin: regression: creating too many bins fails, exhausting allowed file descriptor limit
* 646811 : baseparse: deadlock in gst_base_parse_set_index
* 646971 : iterator: resync to avoid infinite loop
* 647005 : GstBus: Only create the socketpair for async message delivery if required
* 647131 : recent multiqueue changes break DVD playback (again)
* 647293 : Fix pad callbacks so they handle when parent goes away
* 647763 : [bus] Bus is leaked if a watch is installed in the default main context
* 647844 : baseparse: Remove unused but set variable
* 647922 : [introspection] Needs to call gst_init() before anything else
* 648199 : pad: potential deadlock / crash when freeing cache
* 648215 : basetransform: unref in wrong place
* 648220 : Regression: videoscale fails to negotiate for PAR transformation
* 648297 : [bus] regression: critical assertion failure
* 649195 : [miniobject] Fix dup_mini_object function to handle NULL gvalues
* 635718 : [basesrc] custom, non-OOB events aren't pushed downstream
* 625396 : gst_debug_remove_log_function doesn't remove default log handler
* 640771 : amarok doesn't start with new phonon gstreamer
* 646972 : queue2: Fixes memory leak on out_flushing error in gst_queue2_create_read
* 640665 : basesink: drops too many buffers when there's no duration
API additions since 0.10.32:
* gst_atomic_queue_length()
* gst_atomic_queue_new()
* gst_atomic_queue_peek()
* gst_atomic_queue_pop()
* gst_atomic_queue_push()
* gst_atomic_queue_ref()
* gst_atomic_queue_unref()
* gst_buffer_list_iterator_get_type()
* gst_caps_intersect_full()
* gst_caps_intersect_mode_get_type()
* gst_clock_periodic_id_reinit()
* gst_element_factory_can_sink_all_caps()
* gst_element_factory_can_sink_any_caps()
* gst_element_factory_can_src_all_caps()
* gst_element_factory_can_src_any_caps()
* gst_event_new_qos_full()
* gst_event_parse_qos_full()
* gst_filename_to_uri()
* gst_message_new_progress()
* gst_message_parse_progress()
* gst_parse_context_get_type()
* gst_progress_type_get_type()
* gst_qos_type_get_type()
* GST_TAG_ENCODED_BY
* gst_base_parse_add_index_entry()
* gst_base_parse_convert_default()
* gst_base_parse_frame_free()
* gst_base_parse_frame_get_type()
* gst_base_parse_frame_init()
* gst_base_parse_frame_new()
* gst_base_parse_get_type()
* gst_base_parse_push_frame()
* gst_base_parse_set_average_bitrate()
* gst_base_parse_set_duration()
* gst_base_parse_set_frame_rate()
* gst_base_parse_set_has_timing_info()
* gst_base_parse_set_min_frame_size()
* gst_base_parse_set_passthrough()
* gst_base_parse_set_syncable()
* gst_base_sink_get_throttle_time()
* gst_base_sink_set_throttle_time()
API deprecated since 0.10.32:
* gst_element_factory_can_src_caps()
* gst_element_factory_can_sink_caps()
Changes since 0.10.31:
......
Release notes for GStreamer 0.10.32 "Take Me to the Bonus Level"
Release notes for GStreamer 0.10.34 "Misfits"
......@@ -9,6 +9,12 @@ core of the GStreamer streaming media framework.
The 0.10.x series is a stable series targeted at end users.
It is not API or ABI compatible with the stable 0.8.x series.
It is, however, parallel installable with the 0.8.x series.
The 0.10.x series has been reworked for threadsafety. It also features
various feature additions and enhancements.
This module, gstreamer, only contains core functionality.
......@@ -31,64 +37,14 @@ contains a set of less supported plug-ins that haven't passed the
Features of this release
* GLib requirement is now >= 2.22
* New core element: valve (moved from -bad)
* New core element: input-selector (N.B. without "select-all" property, use fsfunnel instead) (moved from -bad)
* New core element: output-selector (with different negotiation behaviour by default, set pad-negotiation-mode=active for previous behaviour) (moved from -bad)
* Performance improvements for many heavily-used code paths: GstPad, GstPoll, GstClock, GstTask, basesink, basesrc, queue2, multiqueue
* gobject-introspection: add annotations for most core API
* clock: make sync clock wait lockfree
* fdsrc/fdsink: reenable on MSVC
* registry: fix GStatBuf definition for win32 when building against older glib (fixes unnecessary rescanning of plugins at start-up)
* element: add a more flexible way to get request pads from elements
* multiqueue: return upon input when already eos
* object: fix creation of default name (when creating more than 100000 elements)
* pluginloader: fix hangs on OSX
* poll: fixes for (p)select backend (used e.g. on OSX)
* poll: refactor and make more lockfree; fixes for win32 and OSX (pselect backend)
* registry: don't replace valid existing plugins by blacklisted ones
* tags: don't produce duplicated entries when merging same value twice
* basesink: preroll fixes for async=false case
* basesink: rework position reporting code
* basetransform: handle downstream giving a buffer with new caps but invalid size
* Fix multiqueue thread-safety regression
* Don't set artificial 0-timestamp on first packet for TIME-based live sources
* Otherwise identical to the previous release (0.10.33)
Bugs fixed in this release
* 635785 : basesrc: fix deadlock
* 638599 : GST_PTR_FORMAT causes crashes if GLib-internal printf is used but system provides register_printf_specifier
* 503592 : gstpad.c does many ref/unref of peer pad in dataflow
* 564056 : Protect against umask(0177)
* 607513 : input-selector segfaults in g_object_notify()
* 632168 : [gsttask] MSVC thread names for task debugging
* 632447 : reduce static memory allocated by the registry
* 632557 : [macros] Define restrict keyword if not available
* 632778 : Optimisations to GstBaseSink
* 632779 : gstdataqueue: Only emit g_cond_signal when needed
* 632780 : queue: Remove useless checks from e406f7
* 633918 : [fakesink] [PATCH] print sink-message events like a message and its structure
* 634965 : sinks render buffers in state PAUSED when async is FALSE
* 635001 : basesink: fix position reporting in PAUSED
* 636268 : configure test fails on FreeBSD
* 636455 : basesrc: Avoid taking object locks for just checking tag presence
* 637057 : [plugin-scanner] gstpoll fails with select backend
* 637300 : [API] request pad based on caps
* 637549 : build fails: ./.libs/libgstbase-0.10.so: undefined reference to `gst_clock_single_shot_id_reinit'
* 637776 : merging the same tag values again produces lists containing duplicates
* 638381 : {input,output}-selector: double-check API before release
* 638399 : a few typos in GStreamer
* 638900 : [GstPoll] Doesn't compile with MinGW
* 638941 : registry scan/loading race and inconsistency
API changed in this release
- API additions:
* gst_clock_single_shot_id_reinit()
* gst_element_request_pad()
* GstElementClass::request_new_pad_full()
* gst_poll_get_read_gpollfd()
* gst_value_list_merge()
* GST_CLOCK_DONE
* 649369 : basesrc: do not set first buffer timestamp to 0 for live sources
* 649878 : [multiqueue] regression: gst_single_queue_new not MT-safe
Download
......@@ -113,31 +69,15 @@ subscribe to the gstreamer-devel list. If there is sufficient interest we
will create more lists as necessary.
Applications
Applications ported to GStreamer 0.10 include Totem, RhythmBox, Sound-Juicer,
Gnome Media, Flumotion, Amarok, Jamboree, Pitivi, Istanbul, AnnoAmp, Elisa, and others.
Let us know if you want to be added to this list.
Contributors to this release
* Andoni Morales Alastruey
* Benjamin Gaignard
* Benjamin Otte
* David Hoyt
* David Schleef
* Edward Hervey
* Havard Graff
* Jan Schmidt
* Kipp Cannon
* Koop Mast
* Lasse Laukkanen
* Mark Nauwelaerts
* Michael Smith
* Olivier Crete
* Olivier Crête
* Raimo Järvi
* Sebastian Dröge
* Stefan Kost
* Thiago Santos
* Tim-Philipp Müller
* Tommi Myöhänen
* Wim Taymans
* Zhang Wanming
* Christian Schaller
* Sjoerd Simons
* Vincent Penquerc'h
 
......@@ -48,7 +48,7 @@ dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
dnl sets GST_LT_LDFLAGS
AS_LIBTOOL(GST, 28, 0, 28)
AS_LIBTOOL(GST, 29, 0, 29)
dnl FIXME: this macro doesn't actually work;
dnl the generated libtool script has no support for the listed tags.
......
......@@ -933,14 +933,43 @@ gst_format_get_type
<SECTION>
<FILE>gstghostpad</FILE>
<TITLE>GstGhostPad</TITLE>
GstProxyPad
GstGhostPad
gst_ghost_pad_new
gst_ghost_pad_new_no_target
gst_ghost_pad_new_from_template
gst_ghost_pad_new_no_target_from_template
gst_ghost_pad_set_target
gst_ghost_pad_get_target
gst_ghost_pad_construct
gst_ghost_pad_setcaps_default
gst_ghost_pad_unlink_default
gst_ghost_pad_link_default
gst_ghost_pad_activate_pull_default
gst_ghost_pad_activate_push_default
gst_ghost_pad_internal_activate_push_default
gst_ghost_pad_internal_activate_pull_default
gst_proxy_pad_get_internal
gst_proxy_pad_query_type_default
gst_proxy_pad_event_default
gst_proxy_pad_query_default
gst_proxy_pad_iterate_internal_links_default
gst_proxy_pad_chain_default
gst_proxy_pad_chain_list_default
gst_proxy_pad_getrange_default
gst_proxy_pad_checkgetrange_default
gst_proxy_pad_getcaps_default
gst_proxy_pad_acceptcaps_default
gst_proxy_pad_fixatecaps_default
gst_proxy_pad_setcaps_default
gst_proxy_pad_unlink_default
<SUBSECTION Standard>
GstGhostPadClass
GST_GHOST_PAD
......@@ -1393,6 +1422,7 @@ GstMiniObjectFlags
GstMiniObjectCopyFunction
GstMiniObjectDisposeFunction
GstMiniObjectFreeFunction
GstMiniObjectWeakNotify
GST_MINI_OBJECT_TYPE
GST_MINI_OBJECT_FLAGS
......@@ -1413,6 +1443,9 @@ gst_mini_object_make_writable
gst_mini_object_ref
gst_mini_object_unref
gst_mini_object_weak_ref
gst_mini_object_weak_unref
gst_mini_object_replace
<SUBSECTION Standard>
......@@ -1540,11 +1573,6 @@ gst_pad_new
gst_pad_new_from_template
gst_pad_new_from_static_template
gst_pad_alloc_buffer
gst_pad_alloc_buffer_and_set_caps
gst_pad_set_bufferalloc_function
GstPadBufferAllocFunction
gst_pad_set_chain_function
GstPadChainFunction
......
......@@ -848,6 +848,16 @@
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstMultiQueue::sync-by-running-time</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Sync By Running Time</NICK>
<BLURB>Synchronize deactivated or not-linked streams by running time.</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstBin::async-handling</NAME>
<TYPE>gboolean</TYPE>
......@@ -1068,3 +1078,13 @@
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstInputSelector::sync-streams</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Sync Streams</NICK>
<BLURB>Synchronize inactive streams to the running time of the active stream.</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
......@@ -3,10 +3,10 @@
<description>standard GStreamer elements</description>
<filename>../../plugins/elements/.libs/libgstcoreelements.so</filename>
<basename>libgstcoreelements.so</basename>
<version>0.10.32.4</version>
<version>0.10.34.1</version>
<license>LGPL</license>
<source>gstreamer</source>
<package>GStreamer prerelease</package>
<package>GStreamer git</package>
<origin>Unknown package origin</origin>
<elements>
<element>
......
......@@ -3,10 +3,10 @@
<description>GStreamer core indexers</description>
<filename>../../plugins/indexers/.libs/libgstcoreindexers.so</filename>
<basename>libgstcoreindexers.so</basename>
<version>0.10.32.4</version>
<version>0.10.34.1</version>
<license>LGPL</license>
<source>gstreamer</source>
<package>GStreamer prerelease</package>
<package>GStreamer git</package>
<origin>Unknown package origin</origin>
<elements>
</elements>
......
......@@ -51,6 +51,9 @@ extern const char g_log_domain_gstreamer[];
/* for the pad cache */
#include "gstpad.h"
/* for GstElement */
#include "gstelement.h"
G_BEGIN_DECLS
/* used by gstparse.c and grammar.y */
......@@ -115,6 +118,10 @@ gboolean _gst_plugin_loader_client_run (void);
void _priv_gst_pad_invalidate_cache (GstPad *pad);
/* Used in GstBin for manual state handling */
void _priv_gst_element_state_changed (GstElement *element, GstState oldstate,
GstState newstate, GstState pending);
/* used in both gststructure.c and gstcaps.c; numbers are completely made up */
#define STRUCTURE_ESTIMATED_STRING_LEN(s) (16 + gst_structure_n_fields(s) * 22)
......
......@@ -222,6 +222,8 @@ static void gst_bin_get_property (GObject * object, guint prop_id,
static GstStateChangeReturn gst_bin_change_state_func (GstElement * element,
GstStateChange transition);
static void gst_bin_state_changed (GstElement * element, GstState oldstate,
GstState newstate, GstState pending);
static GstStateChangeReturn gst_bin_get_state_func (GstElement * element,
GstState * state, GstState * pending, GstClockTime timeout);
static void bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
......@@ -468,6 +470,7 @@ gst_bin_class_init (GstBinClass * klass)
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_bin_change_state_func);
gstelement_class->state_changed = GST_DEBUG_FUNCPTR (gst_bin_state_changed);
gstelement_class->get_state = GST_DEBUG_FUNCPTR (gst_bin_get_state_func);
gstelement_class->get_index = GST_DEBUG_FUNCPTR (gst_bin_get_index_func);
gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_bin_set_index_func);
......@@ -983,6 +986,7 @@ static gboolean
is_eos (GstBin * bin, guint32 * seqnum)
{
gboolean result;
gint n_eos = 0;
GList *walk, *msgs;
result = TRUE;
......@@ -996,6 +1000,7 @@ is_eos (GstBin * bin, guint32 * seqnum)
find_message (bin, GST_OBJECT_CAST (element), GST_MESSAGE_EOS))) {
GST_DEBUG ("sink '%s' posted EOS", GST_ELEMENT_NAME (element));
*seqnum = gst_message_get_seqnum (GST_MESSAGE_CAST (msgs->data));
n_eos++;
} else {
GST_DEBUG ("sink '%s' did not post EOS yet",
GST_ELEMENT_NAME (element));
......@@ -1004,7 +1009,13 @@ is_eos (GstBin * bin, guint32 * seqnum)
}
}
}
return result;
/* FIXME: Some tests (e.g. elements/capsfilter) use
* pipelines with a dangling sinkpad but no sink element.
* These tests assume that no EOS message is ever
* posted on the bus so let's keep that behaviour.
* In valid pipelines this doesn't make a difference.
*/
return result && n_eos > 0;
}
static void
......@@ -2238,7 +2249,6 @@ activate_pads (const GValue * vpad, GValue * ret, gboolean * active)
if (!(cont = gst_pad_set_active (pad, *active)))
g_value_set_boolean (ret, FALSE);
/* unref the object that was reffed for us by _fold */
return cont;
}
......@@ -2387,6 +2397,19 @@ gst_bin_do_latency_func (GstBin * bin)
return res;
}
static void
gst_bin_state_changed (GstElement * element, GstState oldstate,
GstState newstate, GstState pending)
{
GstElementClass *pklass = (GstElementClass *) parent_class;
if (newstate == GST_STATE_PLAYING && pending == GST_STATE_VOID_PENDING)
bin_do_eos (GST_BIN_CAST (element));
if (pklass->state_changed)
pklass->state_changed (element, oldstate, newstate, pending);
}
static GstStateChangeReturn
gst_bin_change_state_func (GstElement * element, GstStateChange transition)
{
......@@ -2621,8 +2644,6 @@ state_end:
gst_element_state_get_name (GST_STATE (element)),
gst_element_state_change_return_get_name (ret));
bin_do_eos (bin);
return ret;
/* ERRORS */
......@@ -2736,8 +2757,6 @@ gst_bin_continue_func (BinContinueData * data)
GST_STATE_UNLOCK (bin);
GST_DEBUG_OBJECT (bin, "state continue done");
bin_do_eos (bin);
gst_object_unref (bin);
g_slice_free (BinContinueData, data);
return;
......@@ -2832,9 +2851,8 @@ bin_handle_async_start (GstBin * bin, gboolean new_base_time)
GST_OBJECT_UNLOCK (bin);
/* post message */
gst_element_post_message (GST_ELEMENT_CAST (bin),
gst_message_new_state_changed (GST_OBJECT_CAST (bin),
new_state, new_state, new_state));
_priv_gst_element_state_changed (GST_ELEMENT_CAST (bin), new_state, new_state,
new_state);
post_start:
if (amessage) {
......@@ -2876,8 +2894,8 @@ bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
GstState current, pending, target;
GstStateChangeReturn old_ret;
GstState old_state, old_next;
gboolean toplevel;
GstMessage *smessage = NULL, *amessage = NULL;
gboolean toplevel, state_changed = FALSE;
GstMessage *amessage = NULL;
BinContinueData *cont = NULL;
if (GST_STATE_RETURN (bin) == GST_STATE_CHANGE_FAILURE)
......@@ -2956,15 +2974,14 @@ bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
if (old_next != GST_STATE_PLAYING) {
if (old_state != old_next || old_ret == GST_STATE_CHANGE_ASYNC) {
smessage = gst_message_new_state_changed (GST_OBJECT_CAST (bin),
old_state, old_next, pending);
state_changed = TRUE;
}
}
GST_OBJECT_UNLOCK (bin);
if (smessage) {
GST_DEBUG_OBJECT (bin, "posting state change message");
gst_element_post_message (GST_ELEMENT_CAST (bin), smessage);
if (state_changed) {
_priv_gst_element_state_changed (GST_ELEMENT_CAST (bin), old_state,
old_next, pending);
}
if (amessage) {
/* post our combined ASYNC_DONE when all is ASYNC_DONE. */
......@@ -2972,9 +2989,6 @@ bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
gst_element_post_message (GST_ELEMENT_CAST (bin), amessage);
}
if (!cont)
bin_do_eos (bin);
GST_OBJECT_LOCK (bin);
if (cont) {
/* toplevel, start continue state */
......
......@@ -2227,6 +2227,28 @@ nothing_aborted:
}
}
/* Not static because GstBin has manual state handling too */
void
_priv_gst_element_state_changed (GstElement * element, GstState oldstate,
GstState newstate, GstState pending)
{
GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
GstMessage *message;
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
"notifying about state-changed %s to %s (%s pending)",
gst_element_state_get_name (oldstate),
gst_element_state_get_name (newstate),
gst_element_state_get_name (pending));
if (klass->state_changed)
klass->state_changed (element, oldstate, newstate, pending);
message = gst_message_new_state_changed (GST_OBJECT_CAST (element),
oldstate, newstate, pending);
gst_element_post_message (element, message);
}
/**
* gst_element_continue_state:
* @element: a #GstElement to continue the state change of.
......@@ -2254,7 +2276,6 @@ gst_element_continue_state (GstElement * element, GstStateChangeReturn ret)
GstStateChangeReturn old_ret;
GstState old_state, old_next;
GstState current, next, pending;
GstMessage *message;
GstStateChange transition;
GST_OBJECT_LOCK (element);
......@@ -2290,9 +2311,7 @@ gst_element_continue_state (GstElement * element, GstStateChangeReturn ret)
gst_element_state_get_name (old_next),
gst_element_state_get_name (pending), gst_element_state_get_name (next));
message = gst_message_new_state_changed (GST_OBJECT_CAST (element),
old_state, old_next, pending);
gst_element_post_message (element, message);
_priv_gst_element_state_changed (element, old_state, old_next, pending);