Commit graph

7051 commits

Author SHA1 Message Date
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
Edward Hervey
634cb80c8e structure: Demote WARNING to DEBUG
It is not an issue to get fields that don't exist, calling code should
handle that.
2012-07-11 10:24:51 +02:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Wim Taymans
82eb275ef9 query: copy structure in _add_allocation_meta()
Make gst_query_add_allocation_meta() take a copy of the passed caps instead of
taking ownership. This makes it easier for the caller in most cases because it
doesn't have to make a copy and deal with NULL values.
2012-07-10 10:31:00 +02:00
Wim Taymans
77bc2170f8 gst: add new flags 2012-07-10 10:11:57 +02:00
Matej Knopp
4afdef5586 miniobject: fix exclusive lock/unlock race 2012-07-10 09:46:36 +02:00
Stefan Sauer
f165a77fdc segment: also copy the segment flag
Fixes segmented seeks (as tested e.g. in the adder tests in base).
2012-07-09 22:16:46 +02:00
Tim-Philipp Müller
68a2eb5d18 gst: sprinkle some G_GNUC_INTERNAL for internal functions 2012-07-09 20:48:56 +01:00
Edward Hervey
94bd61b72d gstbin: collect and aggregate STREAM_START messages
when all sinks have posted a STREAM_START, the bin will forward a
new STREAM_START message to the parent bin or application
2012-07-09 20:31:45 +02:00
Edward Hervey
67b77667bb gstmessage: New GST_MESSAGE_STREAM_START
message counterpart to the GST_EVENT_STREAM_START event
2012-07-09 20:31:45 +02:00
Wim Taymans
5750f19712 docs: fix docs a little more 2012-07-09 16:28:22 +02:00
Wim Taymans
f362f643ac memory: Make GstAllocator a GstObject
Make GstAllocator a GstObject instead of a GstMiniObject, like bufferpool.
Make a new gstallocator.c file. Make a GstAllocator subclass for the default
allocator.
2012-07-09 16:28:22 +02:00
Wim Taymans
6e7c469b48 memory: remove unused macros 2012-07-09 16:28:22 +02:00
Wim Taymans
10f3adfd9d clock: make abstract
Make the GstClock type abstract.
Fix a horrible hack in the clock unit test.
2012-07-09 16:28:22 +02:00
Tim-Philipp Müller
f6e8786be8 toc: remove padding now that the structs are private 2012-07-09 13:15:46 +01:00
Tim-Philipp Müller
1ba0d6f6f6 toc: add gst_toc_dump() function for debugging
API: gst_toc_dump()
2012-07-09 13:12:27 +01:00
Tim-Philipp Müller
c0c79188ca bus, clock: make sure these never have a floating ref
Clear the initial floating ref in the init function for
busses and clocks. These objects can be set on multiple
elements, so there's no clear parent-child relationship
here. Ideally we'd just not make them derive from
GInitiallyUnowned at all, but since we want to keep
using GstObject features for debugging, we'll just do
it like this.

This should also fix some problems with bindings, which
seem to get confused when they get floating refs from
non-constructor functions (or functions annotated to
have a 'transfer full' return type). This works now:

from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

pipeline=Gst.Pipeline()
bus = pipeline.get_bus()
pipeline.set_state(Gst.State.NULL)
del pipeline;

https://bugzilla.gnome.org/show_bug.cgi?id=679286
https://bugzilla.gnome.org/show_bug.cgi?id=657202
2012-07-09 13:09:45 +01:00
Tim-Philipp Müller
93a2b6e9b3 value: use datetime serialise/deserialise functions for datetimes
This re-uses existing code and makes sure we properly serialise
and deserialise datetimes where not all fields are set (thus
fixing some warnings when serialising such datetimes).
2012-07-07 22:46:00 +01:00
Tim-Philipp Müller
8e7bc47ccd datetime: do our own serialisation so we can serialise microseconds as well
We still don't do that in _to_iso8601_string() though, since
this will probably mostly be used in tags, where it doesn't
matter so much and the microsecond argument might not be
well-received by some tag readers.
2012-07-07 22:43:33 +01:00
Tim-Philipp Müller
853e2bf67f datetime: when deserialising parse microseconds if available 2012-07-07 22:32:40 +01:00
Tim-Philipp Müller
dcc9941931 datetime: fix second parsing failure case when deserialising datetime
When we fail to parse the number of seconds, reset the value to -1
instead of passing some error value as seconds. Also, we can still
try to parse timezone information.
2012-07-07 19:05:55 +01:00
Sebastian Rasmussen
73ab9d17e3 gstinfo: Add destroy notify arguments to debug stubs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679535
2012-07-07 13:39:25 +01:00
Sebastian Rasmussen
aab5b579a8 gststructure: Set lcopy string const exactly as glib's macro
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679534
2012-07-07 13:32:41 +01:00
Wim Taymans
408df31a48 memory: expose the GstAllocation structure
Expose the GstAllocation structure and provide an _init function. This makes it
easier to make 'subclasses' of the allocator that contain more info.
It also allows us to expose the flags on the allocator miniobject.
Make a flag to note that the allocator uses a custom alloc function.
2012-07-06 17:24:32 +02:00
Edward Hervey
d2627a158e structure: Demote WARNING to INFO
It is common to use gst_structure_get() to know if a field is present
or not.
2012-07-06 12:48:44 +02:00
Wim Taymans
3f80cb272e query: use more generic structure for meta params 2012-07-06 11:49:47 +02:00
Wim Taymans
8bca7537e6 query: make find_allocation_meta method
Make gst_query_find_allocation_meta() that also return the index of the metadata
and replaces gst_query_has_allocation_meta().
2012-07-06 11:22:43 +02:00
Wim Taymans
8173622844 query: add flags to allocation query
Make it possible to add API specific flags to the ALLOCATION query. This makes
it possible to also check what kinds of subfeatures of the metadata API are
supported.
2012-07-06 11:00:38 +02:00
Wim Taymans
50cf7f6a08 memory: add gst_memory_init()
Add a method that memory implementations can call to initialize the standard
GstMemory structure.
Move the parent handling in the _free handler.
Rearrange some internal function parameters so that the order is consistent.
Add more memory examples
2012-07-05 17:11:01 +02:00
Wim Taymans
e30930af4f miniobject: fix some miniobject docs 2012-07-05 16:18:27 +02:00
Sebastian Dröge
aa2309e54a event: Add format and position to the segment-done event 2012-07-05 13:04:31 +02:00
Wim Taymans
e2bbfd294d miniobject: increase amount of possible flags 2012-07-05 12:56:51 +02:00
Sebastian Dröge
49d2ad5633 event: Implement segment-done event 2012-07-05 12:52:51 +02:00
Sebastian Dröge
1b75a55b19 query: Remove the TOC query, it's not very useful now that we have sticky events 2012-07-05 12:34:41 +02:00
Sebastian Dröge
67324c4998 quark: Remove unneeded quarks 2012-07-05 12:29:02 +02:00
Sebastian Dröge
dfd9b60221 toc: Make structures opaque and clean up function names and fields a bit 2012-07-05 12:29:02 +02:00
Wim Taymans
070f7c4e1c buffer:fix debug category 2012-07-05 11:19:16 +02:00
Wim Taymans
3b16efa1d1 miniobject: add lock functionality to GstMiniObject
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
2012-07-05 11:19:16 +02:00