Commit graph

7088 commits

Author SHA1 Message Date
Mark Nauwelaerts a722212dc9 object: update controller documentation 2012-09-21 21:13:13 +02:00
Olivier Crête 945e0d2be9 pad: Remove pad probes only once
Also add test to make sure that if a pad probe is removed while it's
callback is running, the cleanup_hook isn't called again if it
returns GST_PAD_PROBE_REMOVE
2012-09-20 15:24:33 -04:00
Olivier Crête 25b3e02b94 pad: Add functions to safely access GstProbeInfo data pointer
This is so that introspection based bindings can access it.

https://bugzilla.gnome.org/show_bug.cgi?id=684402
2012-09-20 15:24:33 -04:00
Sebastian Dröge 8f51345296 pad: Fix refcount bug by unreffing the correct variable 2012-09-18 12:46:37 +02:00
Tim-Philipp Müller ca90ea6e55 Remove GST_USE_UNSTABLE_API guard and defines 2012-09-17 13:35:26 +01:00
Sebastian Dröge de635d089f pad: Add parent parameter to the link and unlink functions
Fixes part of bug #683995.
2012-09-17 13:24:36 +02:00
Tim-Philipp Müller c2175db889 sample: add serialisation/deserialisation functions for GstSample
Since these things are inside taglists now, it would be good to be
able to print them and deserialise them.

https://bugzilla.gnome.org/show_bug.cgi?id=681322
2012-09-16 23:20:46 +01:00
Olivier Crête bc5cc2eb07 pad: don't try to pretty-print event after we've given away ownership
Might cause crashes with debug logging enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=683996
2012-09-14 01:28:46 +01:00
Tim-Philipp Müller 19d4ec4aca gstcompat: fix backwards compat macro for gst_message_new_duration
Name it properly, so it, like, works. Clearly no one actually
used that..
2012-09-14 00:30:37 +01:00
Tim-Philipp Müller c2a25bcd0f taglist: add warning when we get something else than a sample for a sample tag
Facilitate GstBuffer -> GstSample transition for some tags,
could be hard to catch otherwise when creating tags, since
it'll only be apparent later when someone tries to read the
tags.
2012-09-13 00:38:21 +01:00
Andreas Frisch 0bc87ee5d9 elementfactory: don't crash if no element klass has been set
https://bugzilla.gnome.org/show_bug.cgi?id=683865
2012-09-12 22:53:41 +01:00
Tim-Philipp Müller bc758c9330 error: don't tell people to file a bug for negotiation errors 2012-09-12 21:23:22 +01:00
Tim-Philipp Müller 221d46f438 pad: expose gst_pad_mode_get_name() and use it in baseparse 2012-09-11 19:51:02 +01:00
Mark Nauwelaerts 4af5e05309 query: adjust test logic for scheduling mode with flagS 2012-09-11 17:27:03 +02:00
Mark Nauwelaerts d1567a82ac query: add convenience API to query for scheduling mode and flags 2012-09-11 17:00:09 +02:00
Wim Taymans 00c6fa74f5 events: remove STREAM_CONFIG
We won't be able to implement this so it's better to move it out of the way.
2012-09-11 16:29:12 +02:00
Wim Taymans e85dc9cfc8 utils: allow NULL stream_id also when 0 srcpads
We usually first create the stream_id for the stream_start event and then add
the pad to the element. This means that this functions should work when there
are no pads on the element yet.
2012-09-11 11:34:11 +02:00
Tim-Philipp Müller a85991eeb8 baseparse, typefind: only activate in pull mode if upstream is seekable
Upstream might support pull mode, but only sequential pulls,
which isn't gonna do much for us.

https://bugzilla.gnome.org/show_bug.cgi?id=634927
2012-09-11 01:40:53 +01:00
Tim-Philipp Müller dad67b7af0 sample: free info structure with sample if there is one and fix copy with NULL info structure 2012-09-10 16:52:46 +01:00
Mark Nauwelaerts edb8bc8865 memory: add padding to GstMapInfo 2012-09-10 12:20:15 +02:00
Mark Nauwelaerts 7fa322d437 gst: remove some defunct commented code 2012-09-10 12:15:54 +02:00
Wim Taymans 8f282de37d pad: check sticky events also after pad block
Recheck for sticky events after doing a pad block because the pad block could
have caused a relink and then we need to resend the events to the newly linked
pad.

Fixes things like switching of visualisations.
2012-09-03 11:07:10 +02:00
Tim-Philipp Müller f712a9596c message: rename GST_MESSAGE_DURATION -> GST_MESSAGE_DURATION_CHANGED
The duration should be re-queried via a query using the
normal path, we don't want applications to use the value
from the message itself, since it might no match what a
duration query done from the sink upstream might yield.

Also disables duration caching in GstBin. It should be
added back again at some point.
2012-09-02 01:18:58 +01:00
Tim-Philipp Müller 5d062480df pluginfeature: disable version mangling for post-1.0.0 release
Just in case we don't grep for FIXME 1.0 before the release.
2012-09-01 23:02:10 +01:00
Jan Schmidt 5aefdbaf10 gstpad: make some debug statements more verbose 2012-08-31 06:25:38 -07:00
Jan Schmidt 8d8608c23b ghostpad: Make some debugging more verbose
Also, remove an unnecessary #include in input-selector
2012-08-31 06:25:37 -07:00
Jan Schmidt 1f1e4fc30c GstSegment: Fix doc description string last_stop->position 2012-08-31 06:25:37 -07:00
Alban Browaeys 7bf7749c2b value: fix crash serialising a 0 flags value when there's no name for it
Fixes segfault when doing gst-launch-1.0 -v -m camerabin
(encodebin notifies a 0 value for its "flag" property).

https://bugzilla.gnome.org/show_bug.cgi?id=682958
2012-08-29 18:59:21 +01:00
Tim-Philipp Müller 985bc911a2 gst: log performance warning debug message if glib emulates atomic ops 2012-08-24 23:14:57 +01:00
Lionel Landwerlin a30e637406 gst: use configure-detected or externally provided glib-mkenums
To ease cross-compilation.

https://bugzilla.gnome.org/show_bug.cgi?id=677620
2012-08-23 13:54:39 +01:00
Wim Taymans 021e51e7f4 memory: add _make_writable 2012-08-22 09:53:18 +02:00
Wim Taymans 0e4d2814fd allocator: make a copy with the same alignment
When making a copy of the memory allocated from the default memory allocator,
make sure the new copy has the same alignment as the original memory.

See https://bugzilla.gnome.org/show_bug.cgi?id=680796
2012-08-20 11:31:51 +02:00
Stefan Sauer ffbba4406a preset: implement child_proxy support
Elements such as the GstIirEqualizerNBands would so far not store the properties
of their children. Now we also grab the properties of child elements and try to
restore them.
2012-08-17 15:00:40 +02:00
Tim-Philipp Müller f42fb841f8 registry: remove some unused and in their current form pointless API
Not so useful: just adds/reads stuff from an internal GList without
actually doing anything with those paths, so remove for now:

 gst_registry_add_path
 gst_registry_get_path_list

https://bugzilla.gnome.org/show_bug.cgi?id=608841
2012-08-14 00:39:18 +01:00
Tim-Philipp Müller 9a38d713bd parse: fix up for gst_child_proxy_lookup() only working on child proxy interfaces
https://bugzilla.gnome.org/show_bug.cgi?id=681681
2012-08-13 10:27:09 +01:00
Tim-Philipp Müller ffa60dc3ee childproxy: make gst_child_proxy_lookup() a proper GstChildProxy method
No longer accept any old GObjects. This makes things nicer for
bindings. If a utility function that handles both nicely
is deemed worthwhile, we can still add one to gstutils.

https://bugzilla.gnome.org/show_bug.cgi?id=681681
2012-08-13 10:27:02 +01:00
Tim-Philipp Müller 718a10edda value: when serialising arrays or lists, handle types we can't serialise more gracefully
https://bugzilla.gnome.org/show_bug.cgi?id=681322
2012-08-13 00:01:16 +01:00
Tim-Philipp Müller b695d442fc event: fix leak in gst_event_parse_stream_start()
gst_structure_id_get() will make a copy of the string
extracted, but we're assigning it to a const gchar *.
2012-08-12 18:31:13 +01:00
Tim-Philipp Müller dddcc31c42 docs: fix up docs a bit 2012-08-11 23:41:33 +01:00
Tim-Philipp Müller 259d10db90 childproxy: fix up g-i annotation for _lookup() paramspec return value
No ref is returned here.
2012-08-11 22:18:13 +01:00
Thiago Santos 9285ee9184 pad: add gst_pad_needs_reconfigure
Add an alternative version of gst_pad_check_reconfigure that doesn't
clear the reconfigure flag.

Useful for increasing error resilience without duplicating the
reconfigure code in pad task functions.

API: gst_pad_needs_reconfigure

https://bugzilla.gnome.org/show_bug.cgi?id=681198
2012-08-10 13:58:02 -03:00
Evan Nemerson 490d16b88a pad: add GST_PAD_LINK_CHECK_DEFAULT to GstPadLinkCheck
This allows introspection-based bindings to access
Gst.PadLinkCheck.DEFAULT instead of
Gst.PAD_LINK_CHECK_DEFAULT.

https://bugzilla.gnome.org/show_bug.cgi?id=678301
2012-08-10 15:05:43 +01:00
Evan Nemerson f169081290 buffer: mark gst_buffer_wrapped* data as array
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2012-08-10 15:05:26 +01:00
Evan Nemerson 823d27e837 introspection: fix some warnings generated by g-ir-scanner.
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2012-08-10 15:05:10 +01:00
Evan Nemerson 237f707c75 buffer: convert gst_buffer_* macros to functions
GObject Introspection does not support macros.
This is needed for bindings. We can still add back
macros or inline functions again later if we think
it's worth it.

https://bugzilla.gnome.org/show_bug.cgi?id=678301
2012-08-10 15:04:12 +01:00
Wim Taymans fb78756679 bufferpool: fix max_buffers handling
When max_buffers > 0 and the pool is empty, actually try to allocate more
buffers up to the max_buffers limit.
We need to add a counter for this to count how many buffers we allocated and
check this against the max_buffers limit.
Reorganise and clean up some code.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681153
2012-08-10 12:23:03 +02:00
Tim-Philipp Müller 690a20a54d gstobject: fix double string escaping in gst_object_default_deep_notify()
Make output of gst-launch -v readable again.

last-message = "event\ \ \ \*\*\*\*\*\*\*\ \(fakesink0:sink\)\ E\ \(type:\ tag\ \(20510\)\,\ GstTagList-stream\,\ taglist\=\(taglist\)\"taglist\\\,\\\ video-codec\\\=\\\(string\\\)H264\\\,\\\
 minimum-bitrate\\\=\\\(uint\\\)636611\\\,\\\ bitrate\\\=\\\(uint\\\)980729\\\,\\\ maximum-bitrate\\\=\\\(uint\\\)1116707\\\;\"\;\)\ 0x15bc760"

vs.

last-message = event   ******* (fakesink0:sink) E (type: tag (20510), GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)H264\,\ minimum-bitrate\=\(uint\)856039\,\ bitrate
\=\(uint\)1019748\,\ maximum-bitrate\=\(uint\)1116707\;";) 0x11149e0
2012-08-09 19:15:29 +01:00
Wim Taymans 97441c27ee miniobject: check writability
fix the writability check for miniobjects. We should check the shared counter.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681450
2012-08-09 16:18:59 +02:00
Sebastian Dröge 55f9862999 allocator: Set the alignment at the correct place in GstAllocationParams 2012-08-08 17:41:07 +02:00
Tim-Philipp Müller de7601bb2d parse: fix for new GstChildProxy::child-added signal callback signature
Fixes crash with gst-launch-1.0 uridecodebin uri=... suburi=... ! ..
2012-08-08 00:59:07 +01:00
Sebastian Dröge 314eec4ca6 bus: Add allow-none to the function argument of gst_bus_set_sync_handler()
https://bugzilla.gnome.org/show_bug.cgi?id=681139
2012-08-07 10:46:17 +02:00
Sebastian Dröge 41954ff8cd event: Add new stream-id field to the stream-start event
This is supposed to allow uniquely identifying a single stream.
2012-08-06 14:00:56 +02:00
Edward Hervey 7a89e5d046 element: Specify the order of pad iterators
The order of returned pads wasn't specified before, so let's specify
it and use an order which might prove the most useful : the order in
which pads were added to the element.

If someone changes the order, make sure users of those iterators from
now on don't rely on that order !
2012-08-06 11:36:29 +02:00
Tim-Philipp Müller 579d1a3eca buffer, defaultmem: add option to poison memory before freeing it
Might be useful to track down certain bugs.
2012-08-04 13:37:32 +01:00
Tim-Philipp Müller 1118c9264f gst: ref/unref taglist scope enum in gst_init()
Fixes make check and distcheck
2012-08-03 23:54:33 +01:00
Tim-Philipp Müller dc837f8f60 plugin: warn if plugin name starts with a "
This can easily happen as side-effect of the plugin name
in GST_PLUGIN_DEFINE no longer being a string in 0.11, but
a name to G_STRINGIFY.
2012-08-03 00:05:53 +01:00
Jens Georg d89219eba3 buffer: Update annotations
https://bugzilla.gnome.org/show_bug.cgi?id=680805
2012-07-30 16:07:38 +01:00
Jens Georg e1b28dc327 utils: Update annotation for get_compatible_pad
https://bugzilla.gnome.org/show_bug.cgi?id=680804
2012-07-30 16:05:41 +01:00
Thibault Saunier 4a2b138f52 uri: Fix wrong 'array zero-terminated=1' annotation for strings 2012-07-28 21:34:41 -04:00
Tim-Philipp Müller 85456357dd event: make TOC event multi-sticky
We need to send two kinds of TOCs downstream as events,
and need both to stick to the pads.

https://bugzilla.gnome.org/show_bug.cgi?id=678742
2012-07-28 09:41:30 +01:00
Tim-Philipp Müller e8ab1006c7 toc: add GstTocScope and require it in the constructor
This is because we need to be able to signal different TOCs
to downstream elements such as muxers and the application,
and because we need to send both types as events (because
the sink should post the TOC messages for the app in the
end, just like tag messages are now posted by the sinks),
and hence need to make TOC events multi-sticky.

https://bugzilla.gnome.org/show_bug.cgi?id=678742
2012-07-28 09:16:06 +01:00
Sebastian Dröge 826a8d643d tag: Add a scope to taglists
This specifies if a given taglist applies to the complete
medium or only this specific stream. By default a taglist
has a stream scope.

Fixes bug #677619.
2012-07-28 00:34:41 +02:00
Wim Taymans c8840b8270 segment: add offset field
Add an offset field that is used to track at what position the segment was
updated. This is used to set the running time to 0 when we do a flushing
seek that doesn't update the position.

See https://bugzilla.gnome.org/show_bug.cgi?id=680306
2012-07-27 17:09:45 +02:00
Wim Taymans f05b0e222f Update for new seeking variable name
When seeking, the start value and type are now called start and start_type.
2012-07-27 15:24:52 +02:00
Wim Taymans 104ef4e7e0 segment: small cleanup
Move the code to update the segment at the end of the function.
2012-07-27 15:24:51 +02:00
Wim Taymans 90e32338c8 segment: remove redundant checks
We don't need to check the segment format anymore because we asserted on them
being equal before.
2012-07-27 13:02:52 +02:00
Wim Taymans a2027b5e9b allocator: remove user_data from alloc vmethod
Remove the user_data from the alloc vmethod. Subclasses that implement a new
alloc function can also implement their own vmethod to pass extra arguments. We
can then also require that custom allocators implement an alloc function so that
gst_allocator_alloc() always works.
2012-07-27 12:17:29 +02:00
Tim-Philipp Müller 7e98f05afc taglist: make GST_TAG_APPLICATION_DATA also a GstSample
That way additional meta-data can be passed along with it.
2012-07-26 16:44:15 +01:00
Tim-Philipp Müller 3231ea6204 taglist: gst_tag_list_get_buffer*() => gst_tag_list_get_sample*()
Image tags and other tags are now of GstSample type.
2012-07-26 15:51:10 +01:00
Wim Taymans fe17539f66 bufferlist: pass index as gint to _insert
Make the idx argument of _insert() a gint because we allow -1 as a value.
Improve annotation.
2012-07-23 16:27:34 +02:00
Sebastian Rasmussen d24a5ecb93 gstpoll: Improve warning message when re-adding fd to fdset
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680181
2012-07-23 12:11:16 +02:00
Tim-Philipp Müller ffdefd7720 value: add GstTagList serialisation/deserialisation
So we can serialise/deserialise taglists inside structures,
which used to work automagically before because GstTagList
was just a typedef to GstStructure (same for the GType),
but now that it's a separate GType we need to register
explicit functions for this.

Helps with GDP stuff in pipelines/streamheader tests.
2012-07-20 09:39:53 +01:00
Wim Taymans 29976a009f miniobject: fix sharedness check 2012-07-19 13:35:34 +02:00
Wim Taymans fd23640001 miniobject: refuse write when object is shared
In all cases, refuse to write an object when it is shared by more than one
object (also when the object was locked before).

See https://bugzilla.gnome.org/show_bug.cgi?id=679145
2012-07-19 13:20:27 +02:00
Wim Taymans 8a0f6da824 message: improve buffering message defaults
Remove the estimated-total field, this should not be part of the buffering
message.
Set the default value of buffering-left to 0 when the percent is 100.
2012-07-19 10:14:18 +02:00
Wim Taymans 3b6e5acbce pad: fix debug line
Use QUERY_TYPE on query types.
2012-07-18 17:49:33 +02:00
Wim Taymans 961151e569 ghostpad: remove custom function
Remove custom pad functions, the default ones are better.
2012-07-18 17:49:32 +02:00
Wim Taymans 06addca012 pad: add PROXY_SCHEDULING flag
Add a flag that makes the default query handler forward the scheduling query.
2012-07-18 17:49:32 +02:00
Wim Taymans 586b1ca8c6 utils: fix docs 2012-07-18 17:49:32 +02:00
Wim Taymans 107007f053 pad: improve query caps function
In the proxy_query_caps function, also filter against the filter in the query.
We don't need to filter against the filter in the query anymore in the default
caps query function because we already did this in the proxy_query_caps.
2012-07-18 17:49:32 +02:00
Wim Taymans 5360ba56f7 basesink: handle -1 step amounts
Define a 0 and -1 step amount. They used to almost do the same thing but now, 0
cancels/stops the current step and -1 keeps on stepping until the end of the
segment.

See https://bugzilla.gnome.org/show_bug.cgi?id=679378
2012-07-18 17:49:32 +02:00
Tim-Philipp Müller 8e946d5d16 query: fix gst_query_parse_nth_allocation_pool() annotation
It returns a ref to the pool.
2012-07-18 12:30:59 +01:00
Edward Hervey 75066960e3 gstghostpad: Forward queries in both direction
Use the peer of the internal pad to forward them, instead of the
target which only exists for the ghostpad (and not the internal
proxy pad).
2012-07-18 12:07:26 +02:00
Wim Taymans 8c864712e6 buffer: make _foreach_meta more powerful
Make _foreach_meta return FALSE when the foreach function returned FALSE.
2012-07-17 12:57:59 +02:00
Wim Taymans d7950e4466 bufferlist: improve foreach function
Make the foreach function return FALSE when one of the function calls returned
FALSE.
2012-07-17 12:53:15 +02:00
Wim Taymans c8e83cde78 buffer: add more debug 2012-07-17 12:50:24 +02:00
Wim Taymans 7b19f3eab2 parse: fix some debug 2012-07-17 10:04:26 +02:00
Wim Taymans fd144c02ab parse: only escape spaces outside of quotes
When we escape spaces to keep arguments together, only escape when the space is
outside a "" string.

See https://bugzilla.gnome.org/show_bug.cgi?id=673319
2012-07-17 10:04:25 +02:00
Wim Taymans 03fae7e32e Revert "parse: escape \ with a \ as well, so that we don't lose the \ when unescaping"
This reverts commit dd9fedb41f.

This is not the right place to escape the \, we should only escape the spaces to
keep the arguments together that were provided as one group (with quotes on the
shell).
2012-07-17 10:04:25 +02:00
Evan Nemerson c3bb59de9c utils: set return type of gst_parse_bin_* to GstBin for introspection 2012-07-17 09:38:44 +02:00
Evan Nemerson fb3a31e550 introspection: add missing array annotation to gst_formats_contains 2012-07-17 09:37:27 +02:00
Stefan Sauer 840f905c2c bin: aggregate durations like in adder
Stop querying the duration once an element return unknown and return unknown
as a final result. This avoid eventually cutting off a stream too early.
Add a tests to docuement the behavior.
2012-07-16 20:54:17 +02:00
Tim-Philipp Müller d370c1ee2f datetime: just return NULL on short input strings instead of a warning
We want to be able to use this function on random non-NULL input,
this should not result in a runtime-critical.
2012-07-16 00:24:46 +01:00
Tim-Philipp Müller 48d0d28755 taglist: check value type matches tag type when adding values to a taglist 2012-07-14 19:08:24 +01:00
Tim-Philipp Müller 379c3cd184 info: make taglists and datetime loggable via GST_PTR_FORMAT 2012-07-14 18:52:50 +01:00
Jan Schmidt 524b56cb07 gstpad: Move sticky flag clearing code to gst_pad_activate_mode
The ghostpad code directly activates/deactivates the child code by
calling gst_pad_activate_mode, rather than gst_pad_set_active, so
make sure to clear the flags in gst_pad_activate_mode(), which should
catch all cases.
2012-07-12 00:41:23 +10:00
Wim Taymans b277243fa6 event: improve annotation 2012-07-11 15:35:57 +02:00
Stefan Sauer 30c30ed171 segment: remove removed api from the docs. 2012-07-11 12:51:30 +02:00
Sebastian Dröge 0c5b3cc5f9 toc: Add functions to retrieve the parent GstToc/GstTocEntry of a GstTocEntry 2012-07-11 12:45:51 +02:00
Anton Belka be38fbba5e toc: Fix gst_toc_find_entry()
Recursive search for the required entry, instead of returning the
top-level entry that contains an entry with the search UID.
2012-07-11 12:36:04 +02:00