Commit graph

6348 commits

Author SHA1 Message Date
Tim-Philipp Müller 18291a6b40 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstbus.c
	gst/gstevent.c
	libs/gst/base/gstbasetransform.c
2011-12-01 23:35:26 +00:00
Wim Taymans f95e77afc6 taglist: make some tags of type GstSample
Make the image and attachment tags of type GstSample so that we can include
extra caps and info along with the buffer data.
2011-12-01 18:50:32 +01:00
Wim Taymans 5477399881 sample: remove const
The writability of the structure is ensured by the refcount of the parent
miniobject and we're fine if the parent is writable.
2011-12-01 18:49:34 +01:00
Wim Taymans facf937276 sample: add new sample miniobject
Add a new simple miniobject that is a combination of a GstBuffer, GstCaps,
GstSegment and other arbitrary info organized in a GstStructure. This object can
be used to exchange samples between an element and the application or for
storing album art in tags etc.
2011-12-01 16:37:46 +01:00
Stefan Sauer e34d796e41 bus: use GST_MESSAGE_SOURCE_NAME() which also takes care of src=NULL. 2011-12-01 16:25:07 +01:00
Wim Taymans dc23684b12 buffer: add copy flag for meta
Add a flag to control if the meta should be copied or not instead of always
copying.
2011-12-01 15:34:06 +01:00
Tim-Philipp Müller 4b57054ae2 info: move FIXME log level after WARNING
So it's now ERROR < WARNING < FIXME < INFO and *:5 becomes *:6.
2011-11-30 12:46:10 +00:00
Tim-Philipp Müller c9bd4e4e96 event: warn and fail instead of creating newsegment events in GST_FORMAT_UNDEFINED 2011-11-30 00:24:32 +00:00
Wim Taymans 09514f251e bin: keep the element flags up-to-date
Keep the require/provide_clock flags up to date.
2011-11-29 15:53:01 +01:00
Wim Taymans 1754ee91ad element: add indexable flag
Remove the is_indexable method check and use an element flag to check if the
element can use an index.
2011-11-28 18:13:27 +01:00
Wim Taymans 40616aeb63 element: use flags for require/provide clock
Remove the _require/_provide_clock() methods and use element flags to mark
elements instead of looking at the implementation of the vmethod.
2011-11-28 17:22:44 +01:00
Wim Taymans d65773b5fa element: clean up element flags
Clean up the element flags
2011-11-28 16:54:55 +01:00
Wim Taymans 06b08e9877 event: add sticky custom quark 2011-11-28 15:35:21 +01:00
Wim Taymans 5a4957eef6 caps: _CAPS_FLAGS_ -> CAPS_FLAG_ 2011-11-28 14:24:16 +01:00
Vincent Penquerc'h c0ba7985bd gstelement: add gst_element_class_add_pad_template_from_static
This function helps ensure the pad template is unreffed
without having to complicate the calling code.

https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:09:07 +00:00
Wim Taymans da74724fd5 pad: Handle sticky event errors
Use GstFlowReturn to internally pass events between pads.
When we sticky events cause an error, translate this error into a GstFlowReturn.
Caps events will, for example, generate a NOT_NEGOTIATED return when the event
function returns an error.
This allows us then to refuse sending buffers if one of the sticky events is
refused and generate a correct error return value.
2011-11-28 14:07:24 +01:00
Edward Hervey 4839131502 gstmeta: Some more docs 2011-11-28 11:15:27 +01:00
Wim Taymans 9cbb135954 event: add custom downstream sticky event 2011-11-28 10:55:28 +01:00
Matej Knopp 62dce62e00 caps: fix compilation warning
GST_STATIC_CAPS is missing initializer for GstMiniObject's n_weak_refs and
weak_refs resulting in compilation warning (llvm-gcc  -Wall)

https://bugzilla.gnome.org/show_bug.cgi?id=664927
2011-11-27 22:34:54 +00:00
Stefan Sauer 52e3861e91 warnings: avoid set-but-unused warnings with load-save disabled 2011-11-27 20:39:42 +01:00
Tim-Philipp Müller 7eb796d447 uri: fix wrong G_GNUC_MALLOC
_get_protocols() points to const memory in 0.10
despite the non-const return value.
2011-11-26 19:45:48 +00:00
Tim-Philipp Müller 2d7f9cfe92 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstbuffer.h
	gst/gstbufferlist.h
	gst/gstcaps.h
	gst/gstdatetime.h
	gst/gstelementfactory.h
	gst/gstevent.h
	gst/gstghostpad.h
	gst/gstindexfactory.h
	gst/gstiterator.h
	gst/gstmessage.h
	gst/gstminiobject.h
	gst/gstpipeline.h
	gst/gstquery.h
	gst/gstsegment.h
	gst/gststructure.h
	gst/gsttaglist.h
	gst/gsturi.h
	gst/gstvalue.h
	libs/gst/base/gstbitreader.h
	libs/gst/base/gstbytereader.h
	libs/gst/base/gstbytewriter.h

Note: can't use G_GNUC_MALLOC with GstCaps return
values in 0.11 because of the EMPTY+ANY singletons.
2011-11-26 19:44:23 +00:00
Tim-Philipp Müller c8380cb0d2 gst: sprinkle some G_GNUC_MALLOC
Maybe gcc can do something clever with that, or at least
warn us if we don't save the return value somewhere.
2011-11-26 18:57:44 +00:00
Tim-Philipp Müller 33078aaeb7 buffer: add gst_buffer_{set,get}_qdata()
Allows people/us to attach arbitrary metadata to buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=664720

API: gst_buffer_set_qdata()
API: get_buffer_get_qdata()
2011-11-25 17:42:07 +00:00
Wim Taymans 933e8b230c pad: fix blocking probe emission
If we are dealing with a blocking probe, only then check if one the
blocking flags of the hook matches.
Add some more debug.
Make the pad unit test less racy.
2011-11-25 07:11:24 +01:00
Wim Taymans fef887639c utils: fix debug of query result 2011-11-25 05:54:09 +01:00
René Stadler 4865607011 query: fix typo in doc
Causes a warning from the introspection scanner.
2011-11-24 22:53:09 +01:00
Sebastian Dröge 0280a3c29f pad: Remove g_warning() if pad accepted caps that are not a subset of the pad caps
This check is correct but unfortunately it's impossible to implement
in a threadsafe way because the caps could have changed in the meantime.

Fixes bug #659606.
2011-11-24 11:15:29 +01:00
Wim Taymans 407f45dc7f event: add STICKY_MULTY events
Add a new event flag for sticky events so that multiple events of that type can
be stored on a pad at the same time. Change the _get_sticky_event() function to
loop over the multiple events of a type.
Change the foreach function to make it possible to removed and modify the sticky
events on a pad.
Use an variable size array now to store the events. This could later be
optimized some more.
2011-11-23 18:05:00 +01:00
Wim Taymans b7e4eeb0b0 bus: handle NULL message src in debug 2011-11-23 18:05:00 +01:00
Wim Taymans 03cdd32b33 bufferlist: avoid reading past the array
When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
2011-11-23 18:05:00 +01:00
Wim Taymans 31b79556b8 pad: take peerpad correctly
Don't take the peerpad too early, it might change because of the
probes.
2011-11-23 08:17:36 +01:00
Wim Taymans dd65aae9a1 pad: rework sticky events
Rewrite sticky events, trying to make it a bit more simple.
When sticky events are pushed on a srcpad, store them in the sticky event
array and mark the event with received = FALSE.
When the sticky event is successfully sent to the peer pad, make
received = TRUE.
Keep a PENDING_EVENTS pad flag that is set when one of the events is in
the received = FALSE state for some reason.
when activating a sinkpad, mark all events received = FALSE on the peer
srcpad.
When pushing a buffer, check the PENDING_EVENTS flag and if it is set, push all
events to the peer pad first.
2011-11-22 18:40:49 +01:00
Wim Taymans 165af7c903 gst: add new flags 2011-11-22 18:40:49 +01:00
Wim Taymans 9c8d323d07 padd return value from _mini_object_replace() 2011-11-22 12:45:41 +01:00
Matej Knopp 6ea74a0572 Fix printf format compiler warnings on OSX/64bit
https://bugzilla.gnome.org/show_bug.cgi?id=664491
2011-11-22 00:51:06 +00:00
Wim Taymans d890017021 pad: fix locking order error 2011-11-21 17:43:51 +01:00
Wim Taymans fda5685a15 ghostpad: fix print format 2011-11-21 17:43:04 +01:00
Wim Taymans 6e0a724394 pad: Add destroy notify to pad functions
Add _full variants of the pad function setters that take a destroy notify.
Make some macros that make the old method name pass NULL to this new
function.
2011-11-21 15:47:01 +01:00
Wim Taymans 2f1ed65339 pad: Merge pad mode activation functions
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
2011-11-21 13:29:05 +01:00
Wim Taymans 9e3aa102d7 docs: update design doc
also fix default alignment value (0 == no-alignment)
2011-11-18 18:08:21 +01:00
Wim Taymans 770159fb1c query: improve scheduling query
Turns some boolean arguments in the scheduling query to flags, which are easier
to extend and makes the code easier to read.
Make extra methods for configuring and querying the supported scheduling modes.
This should make it easier to add new modes later.
2011-11-18 17:27:16 +01:00
Wim Taymans 016d404ccf query: move flags closer to buffering query 2011-11-18 14:08:45 +01:00
Wim Taymans 39a5e26ea9 pad: add parent to activate functions 2011-11-18 13:54:29 +01:00
Wim Taymans 12d5f03453 pad: fix scheduling mode enums
GstPadActivateMode -> GstPadMode
GST_PAD_ACTIVATE_* -> GST_PAD_MODE_*
2011-11-18 12:39:55 +01:00
Wim Taymans 612b1fbb14 pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Wim Taymans 361a7ae44d add parent to internal links 2011-11-16 17:49:46 +01:00
Wim Taymans 09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
Wim Taymans 54e1174060 GstPadFlags: rename flags GST_PAD_* -> GST_PAD_FLAG_* 2011-11-16 12:36:51 +01:00
Wim Taymans fe3af1d67b pad: keep the parent alive when requested
Add a new pad flag NEED_PARENT that ensures that the parent of a pad is
reffed and not NULL when the event, query and internal links functions
are called.
When a pad is added to an element automatically make sure the NEED_PARENT flag
is enabled.
2011-11-16 12:08:22 +01:00