Commit graph

7570 commits

Author SHA1 Message Date
Stefan Sauer 0fb6a15a65 toc: expand GstTocEntry with loop fields
Add loop_type and repeat_count fields to GstTocEntry plus setters and getters.
This allows to represent edit-lists in a toc as well as loops in instruemnts (wav, xi).

API: gst_toc_entry_set_loop
API: gst_toc_entry_get_loop
2014-03-16 16:55:55 +01:00
Tim-Philipp Müller 06ef8cd742 globaldevicemonitor: update for new message API
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 15:24:44 +00:00
Olivier Crête 448d180cdf globaldevicemonitor: Add device monitor aggregator
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 15:12:17 +00:00
Tim-Philipp Müller 5c47cf759a message, bus: do extended message types slightly differently
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 14:38:07 +00:00
Tim-Philipp Müller 302484ac4f gst: fix indentation 2014-03-16 14:38:07 +00:00
Olivier Crête e4e85fc88a devicemonitor: Add GstDeviceMonitor and related
Also add GstDevice and GstDeviceMonitorFactory
And add code to the registry to save them

https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 14:38:07 +00:00
Olivier Crête 10d53423b5 message: Add GST_MESSAGE_EXTENDED
https://bugzilla.gnome.org/show_bug.cgi?id=678402
2014-03-16 14:38:07 +00:00
Stefan Sauer 29bae0bc72 pad: actually return data.ret
The return value from gst_pad_forward() is the aggregated return value from the callback and the callback returns FALSE to continue iterating.
2014-03-16 11:09:05 +01:00
Stefan Sauer d57bc8b5dc pad: forward return value from gst_pad_forward
Instead of ignoring the return value and always return TRUE pass the already agregated result back.
2014-03-15 18:07:44 +01:00
Tim-Philipp Müller 075cc42f88 pad: simplify gst_pad_link_get_name() and fix Since marker
Has added benefit that compiler might warn if more values
are added to the enum.
2014-03-11 21:46:30 +00:00
Stefan Sauer 4a38acaa10 pad: add debug helper for GstPadLinkReturn names
Add a helper like gst_flow_get_name() for GstPadLinkReturn. Use this in core.
API: gst_pad_link_get_name()
2014-03-11 21:50:36 +01:00
Tim-Philipp Müller 313f01ab79 buffer: invert meaning of GST_BUFFER_FLAG_TAG_MEMORY
It's nicer to only have it set when something noteworthy
happened and otherwise unset.

https://bugzilla.gnome.org/show_bug.cgi?id=725862
2014-03-07 20:43:44 +00:00
Stefan Sauer 7077d347a3 pad: fix gst_pad_add_probe() return value docs
Also fix comment typos and add more detail in the logs.
2014-03-06 22:54:17 +01:00
George Kiagiadakis 5973f8c2ca ghostpad: use gst_pad_get_peer to acquire a reference to the target pad
This ensures that the lock of the internal pad is held while referencing
it's peer (= the target pad), which ensures that the peer is not
going to be unlinked/destroyed in the meantime.

https://bugzilla.gnome.org/show_bug.cgi?id=725809
2014-03-06 20:46:28 +01:00
George Kiagiadakis 4fc671e801 ghostpad: hold a reference to the target pad while unlinking it
https://bugzilla.gnome.org/show_bug.cgi?id=725809
2014-03-06 20:46:28 +01:00
Sebastian Rasmussen 034a3ab86f docs: Fix typos and remove unknown annotations
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725517
2014-03-02 21:47:52 +01:00
Stefan Sauer 601774386c docs: use the new markdown for ordered list.
This was plain text that had all list items one after the other (including a
repeated number). Now it will atleast look good when processed with gtk-doc
1.20.
2014-02-28 20:57:23 +01:00
Reynaldo H. Verdejo Pinochet 81c9bedda3 docs: fix problems introduced by c068b225fe
- Fix failing build
- Drop added trailing whitespace
2014-02-27 22:34:55 -03:00
Stefan Sauer cbfafd212b buffer: add return values to g_return_if_fail
FIxes previous commit.
2014-02-27 18:28:15 +01:00
Stefan Sauer c068b225fe docs: convert the examples to use gtk-doc markup, instead of docbook
The gtk-doc markup is less intrusive and better handled when creating docs for
language bindings. The titles (where used) where not adding much.
2014-02-27 18:11:35 +01:00
Wim Taymans 7691150c45 bufferpool: only release buffers with writable memory
Check if the memory is writable before releasing the buffer into the
pool again.
Add unit test for this scenario.
2014-02-27 16:40:34 +01:00
Wim Taymans 659785d896 buffer: add function to check writability of memory
Check if memory is writable in a buffer and thus is exclusively owned by
this buffer.
2014-02-27 16:39:50 +01:00
Wim Taymans f22d8f08e0 bufferpool: Use TAG_MEMORY to check memory before releasing
Tag allocated buffers with TAG_MEMORY. When they are released later,
only add them back to the pool if the tag is still there and the memory
has not been changed, otherwise throw the buffer away.
Add unit test to check various scenarios.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724481
2014-02-27 15:43:13 +01:00
Wim Taymans 5bca002f4b buffer: add a new flag to track memory changes
Add a flag to check if the memory changed in a buffer.
2014-02-27 15:43:13 +01:00
Wim Taymans 86f506e9d8 buffer: remove wrong comment
Refcount and writability are not related for memory objects.
2014-02-27 15:43:13 +01:00
Wim Taymans 301fa0e935 bufferpool: refactor free_buffer
Make a do_free_buffer method to also decrements the number of allocated
buffers. Stop will now be successful when all buffers are freed.
2014-02-27 15:43:13 +01:00
Stefan Sauer 8355a9034b debugutils: add a legend to pipeline dumps
We use a couple of symbols to represent states/flags. Add a short explanation for them.
2014-02-26 20:49:07 +01:00
Olivier Crête e3d57dc11d debugutils: Print if there is a task started from a pad
https://bugzilla.gnome.org/show_bug.cgi?id=705189
2014-02-26 03:15:44 -05:00
Sebastian Dröge f0bd2540c0 structure: Use get_uint64() in gst_structure_get_clock_time()
Its code is identical.
2014-02-25 16:11:20 +01:00
Sebastian Dröge ab9fdf13a0 structure: Add getters for int64 and uint64 values 2014-02-25 15:41:45 +01:00
Stefan Sauer b892b438cc docs: gtkdoc is not good at parsing inline functions in headers
Mark the inline function, so that gtkdoc skips them. Avoids some warnings about
unparsable declarations.
2014-02-15 21:27:23 +01:00
William Manley be8eeabefc docs: Fix location of plugins and registry in home directories
Fixes out of date documentation left over since 0.10.  In 1.0 plugins are
stored in $XDG_DATA_HOME and the registry in $XDG_CACHE_HOME conformant
with the XDG Base Directory Specification[1].

[1]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

https://bugzilla.gnome.org/show_bug.cgi?id=724132
2014-02-11 20:56:48 +01:00
Sebastian Dröge 71ad1d6fdd error: GST_RESOURCE_ERROR_NOT_AUTHORIZED will be available since 1.2.4 2014-02-11 13:27:25 +01:00
Sebastian Dröge 8a96585eee error: Add RESOURCE_NOT_AUTHORIZED error
This allows to distinguish normal read failures from read failures
where we miss authorization.
2014-02-11 13:09:11 +01:00
Chun-wei Fan 043c629e72 windows: Make GStreamer installation relocatable
Use the technique that is now done in GTK+ so that the plugins do not have
to be installed in c:\gstreamer\lib\<debug>\gstreamer-$(GSTApiVersion),
but can be installed in
<parent_folder_of_gstreamer_main_dll>\lib\<debug>\gstreamer-$(GSTApiVersion),
or as per g_win32_get_package_installation_directory_of_module() allows.

https://bugzilla.gnome.org/show_bug.cgi?id=679115
2014-02-06 23:31:23 +01:00
Brendan Long f85c1c4648 gst: clear floating references for GstTask, GstTaskPool and GstCollectPads
https://bugzilla.gnome.org/show_bug.cgi?id=710342
2014-02-06 22:50:53 +01:00
Brendan Long f605472230 docs: gst_pad_new_from_*_template and gst_buffer_pool_new constructors return floating references
https://bugzilla.gnome.org/show_bug.cgi?id=710342
2014-02-06 22:50:53 +01:00
Sebastian Dröge 8d7e11e307 caps: When getting capsfeatures and none are there, store sysmem capsfeatures
... instead of returning a reference to a global instance. The caller might
want to change the global instance otherwise, which causes funny effects like
all global instances being changed and at the same time nothing in the caps
being changed.

As the caps might be immutable while we do this we have to do some magic
with atomic operations.

https://bugzilla.gnome.org/show_bug.cgi?id=723236
2014-02-04 18:47:23 +01:00
Sebastian Dröge e51e0cb0d3 caps: Don't get us sysmem capsfeatures if we just check for fixed caps 2014-02-04 18:06:26 +01:00
Sebastian Dröge 23434848d3 capsfeatures: Make sure that the static ANY/EMPTY capsfeatures are never mutable
See https://bugzilla.gnome.org/show_bug.cgi?id=723236
2014-02-04 17:51:11 +01:00
Stefan Sauer f6d638153c docs: fix more gtk-doc warnings 2014-02-01 16:18:13 +01:00
Stefan Sauer b06e86fb18 docs: unhide docs for allocator
Unhinde the class docs. Tech gtk-doc about GST_EXPORTS.
2014-01-31 08:36:55 +01:00
Stefan Sauer c42780db66 bufferpool: more tests and small doc fixes 2014-01-31 08:36:55 +01:00
Stefan Sauer 1bad32b577 bufferpool: misc cleanups
Review the documentation, comments and logging. Set the initial size to 16 as
the size is rounded up to the next power of two anyway.
2014-01-30 12:43:45 +01:00
Wim Taymans 878621f6f5 bufferpool: avoid excessive GstPoll activity
Keep an extra write ref on the control socket. This ensures that we
avoid a read/write on the socket when going from non-empty->empty->not-empty.
We remove the write ref only when we actually are empty and we need to
wait for flushing or a new buffer.

This makes the bufferpool benchmark about 30% faster than the pure
malloc implementation.
2014-01-30 12:31:48 +01:00
Wim Taymans fb44b4d2ec poll: improve debug
Add object pointer in debug lines.
2014-01-30 12:31:48 +01:00
Sebastian Dröge ba7089cf04 pad: Minor code cleanup
!check_sticky()==GST_FLOW_OK is a bit confusing, compared to
check_sticky()!=GST_FLOW_OK.
2014-01-22 11:10:01 +01:00
Sebastian Dröge bac1202cf7 iterator: Properly copy mutexes around when creating a copy of a filter iterator 2014-01-18 14:48:54 +01:00
Stewart Brodie f77d79f2f8 iterator: Preserve the master lock when creating recursive iterator filters with the same lock
This way we make sure that a) the lock is always taken when checking
the cookie and calling the iterator's next functions and b) it is
not taken while calling any of the iterator filter functions.

https://bugzilla.gnome.org/show_bug.cgi?id=711138
2014-01-18 14:48:54 +01:00
Thiago Santos 75fe1004a5 pad: fix sticky event leak after sticky_events_foreach
events_foreach adds an extra ref when giving the event to the
user function. In case it was unrefed by the user, this extra ref
disappeared, but events_foreach still should unref again to
lose its own ref before removing the event from the array.

https://bugzilla.gnome.org/show_bug.cgi?id=722467
2014-01-17 23:11:49 -03:00
Stefan Sauer 0264bbdb46 info: move some env-var checks from gst to gstinfo as well
We were doing some log related initialisation in gst.c after calling
_priv_gst_debug_init(). Just move it there for consistency.
2014-01-16 20:47:53 +01:00
Fabian Kirsch ffe072f694 parse: Some minor fixes
Fix destructor segfaulting
Expect 0 grammar-ambiguities
Fix order of bin-properties assignment

https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-16 15:38:51 +01:00
Sebastian Dröge 1d6136b930 segment: gst_segment_offset_running_time() will be available in 1.2.3 2014-01-15 11:13:00 +01:00
Nicolas Dufresne abddae152d util: Add GST_ROUND_UP_N and GST_ROUND_DOWN_N
These are generic rounding macro that works for any power of two.
2014-01-14 16:22:31 -05:00
Sebastian Dröge f15f4ec8aa parse: Make sure to create and link chains in the order as written
Make this work again:
audiotestsrc ! tee name=t  t.src_0 ! queue ! fakesink  t.src_1 ! queue ! fakesink
and this fail again:
audiotestsrc ! tee name=t  t.src_1 ! queue ! fakesink  t.src_0 ! queue ! fakesink

as tee just counts itself and does not care about the pad names we request
from it.
2014-01-14 15:52:26 +01:00
Sebastian Dröge 156d925cff parse: Remove some C99-style comments 2014-01-14 13:46:24 +01:00
Sebastian Dröge dd086a4e6e parse: Use GSlice for allocating and freeing links and chains 2014-01-14 13:46:24 +01:00
Sebastian Dröge 748690aba1 parse: Add comment about why we disable the "tracing"
It did not print anything useful before anyway, everything
was commented out.

Also remove some unneeded struct members.
2014-01-14 13:46:24 +01:00
Fabian Kirsch 2b33d33185 parse: Refactor grammar, make it more consistent and fix conflicts
https://bugzilla.gnome.org/show_bug.cgi?id=710034
2014-01-14 13:46:22 +01:00
Stefan Sauer 46b18f7a8b gstobject: add FIXME and docs for the disabled notify on parent
We haven't found a way to re-enable emitting notify and deep-notify for parent
changes. Add a FIXME-2.0 and a doc blob on the property. See #693281.
2014-01-09 08:49:40 +01:00
Wim Taymans f664fbd198 segment: take offset into account in _to_position()
Take the offset into account when converting between running-time and
segment positions.
2014-01-08 15:23:00 +01:00
Wim Taymans 6d3fc584d5 pad: use new segment offset method to apply the offset
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721422
2014-01-08 15:04:00 +01:00
Wim Taymans dc0176e4a0 segment: add method to offset the segment running-time
Add a method that can apply an offset to the calculated running-time of
a segment.
2014-01-08 15:04:00 +01:00
Wim Taymans 42d36b9495 info: debug segment offset field as well 2014-01-08 15:04:00 +01:00
Sebastian Dröge 93ce90f833 pad: Check if new probes need to be called when adding/removing some
This allows blocking a pad, add a new blocking probe, removing
the first probe and then having the second probe called. Which
could then decide that data-flow should actually continue
instead of blocking now.

https://bugzilla.gnome.org/show_bug.cgi?id=721289
2014-01-02 13:33:20 +01:00
Sebastian Dröge d04c8b6d2e pad: Keep an extra ref of the pad when calling an IDLE probe immediately
The callback might destroy the pad.
2013-12-30 19:03:22 +01:00
Sebastian Dröge 0324358ebc pad: Only call IDLE probes if we are actually idle
Also only check the data types for non-IDLE probes. When we
are idle, we have no data type obviously.

Previously we were calling IDLE probes during data flow whenever
a non-blocking probe would be called. The pad was usually not idle
at that time.
2013-12-30 18:53:36 +01:00
Stefan Sauer b571f3ad7d taglist: fix since marker again (1.3 -> 1.4)
Since markers should point to the appropriate stable version.
2013-12-30 14:47:19 +01:00
Stefan Sauer e8023bf470 taglist: fix since-marker in docs (we're in 1.3.X) 2013-12-30 14:40:40 +01:00
Stefan Sauer cb218f2827 taglist: add a tag for midi base note numbers
Audio files containing sampled instruments can have metadata describing the note
that was played on the instrument.
2013-12-30 14:22:37 +01:00
Sebastian Dröge 901cd5560c pad: Don't ignore probe callback return value when immediately calling IDLE probe
https://bugzilla.gnome.org/show_bug.cgi?id=721096
2013-12-30 10:53:09 +01:00
Sebastian Dröge c3181fa5df parse: Use GLib malloc/free/realloc functions
https://bugzilla.gnome.org/show_bug.cgi?id=720100
2013-12-27 12:55:40 +01:00
Wim Taymans 62932b17d7 utils: Add round down 128 macro for completeness 2013-12-20 14:43:57 +01:00
Nicolas Dufresne 59bb1f58bb utils: Add round up 128 macro 2013-12-20 14:43:57 +01:00
Sebastian Dröge a400dd2f47 parse: Don't define yyscan_t twice
https://bugzilla.gnome.org/show_bug.cgi?id=720316
2013-12-14 19:09:05 +01:00
Edward Hervey 3ea6b04c10 gstvalue: Fix comparision of double range
Checking twice the lower bound is great (you never know, it might change
between the two calls by someone using emacs butterfly-mode), but it's a bit
more useful to check the higher bound are also identical.

Detected by Coverity
2013-12-10 18:01:52 -05:00
Víctor Manuel Jáquez Leal 24a766a13b info: return existing category if a debug category is registered twice
If a category with the same name is found when creating a new
one, the found category is returned instead of an invalid pointer.
Fixes issue with gst-vaapi (which uses an internal copy of the
codec parsers) caused by commit ccba9130.

https://bugzilla.gnome.org/show_bug.cgi?id=720036
2013-12-07 19:03:23 +00:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Rasmussen e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Stewart Brodie e7f514efbc docs: clarify encoding of strings in GstStructures and taglists
https://bugzilla.gnome.org/show_bug.cgi?id=709262
2013-12-06 20:50:19 +00:00
Olivier Crête ccba91308d info: Make sure the same category is not added twice 2013-12-04 17:35:18 -05:00
Olivier Crête e0317288ba info: Protect __categories list in get_category with lock too 2013-12-04 17:35:02 -05:00
Wim Taymans 34db352879 pad: add ACCEPT_INTERCEPT flag
Make a new flag on the pad that tweaks the default behaviour of the
accept-caps function. By default it will check for a subset of the
query-caps result but this is not always desirable. The query-caps
result contains all the constraints to make a good caps decision
upstream but sometimes, like for parsers, not all the constrained caps
fields are known upstream and then a subset check would fail. Switching
to an intersection makes this work again.

See https://bugzilla.gnome.org/show_bug.cgi?id=705024
    https://bugzilla.gnome.org/show_bug.cgi?id=677401
2013-12-03 22:28:09 +01:00
Sebastian Rasmussen 49950e57ad docs: add missing docs, fixing doc errors
* add many missing declarations to sections
 * GstController has been removed, update docs
 * skip GstIndex when generating documentation
 * rephrase so gtkdoc doesn't imagine return value
 * add missing argument description for gst_context_new()
 * document GstOutputSelectorPadNegotiationMode and move to header-file

https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-03 00:11:59 +00:00
Sebastian Rasmussen b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Olivier Crête 3c4d54fd88 parse: Manually insert priv_gst_parse_yyget/set_column prototypes for older flex
Older versions of flex (before 2.5.36) don't add the prototype, so it must
be added manually. We can't check by the version number, because Debian/Ubuntu
patched it into their 2.5.35 at some point.
2013-11-29 14:02:24 -05:00
Thiago Santos 06737aa972 gstpad: drop assertion on gst_pad_peer_query_position
It is a 'both' query, so it can be sent both ways
2013-11-29 15:03:44 -03:00
Wim Taymans fe36be1c03 Revert "ghostpad: copy sticky events to SRC ghostpads"
This reverts commit 8162a583a4.

Automatically copying the sticky events makes it impossible for apps
and elements to filter the events with event probes. This causes
regressions (See #719437). The best option is to let the app/element
copy and filter the events themselves after the ghostpad target is
set.
2013-11-29 17:02:41 +01:00
Fabian Kirsch 56d74ddb64 parse: fix segfaulting prototype-mismatch
Now YYDEBUG is always set, so check it's value

https://bugzilla.gnome.org/show_bug.cgi?id=712679
2013-11-28 19:05:23 -05:00
Olivier Crête 2a720d2e55 query: Fix gi annotations of gst_structure_new_custom() 2013-11-25 19:07:15 -05:00
Sebastian Rasmussen 7a073cdcda gstutils: Escape stream id format in comments
These must be escaped for gtk-doc to parse the comments without warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=714989
2013-11-22 19:04:32 +00:00
Tim-Philipp Müller 4afa63a8ba gst: g_memmove() is deprecated
Just use plain memmove(), g_memmove() is deprecated in
recent GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=712811
2013-11-21 15:04:04 +00:00
Wim Taymans 8162a583a4 ghostpad: copy sticky events to SRC ghostpads
Update the sticky events on SRC ghostpads when retargeting. This ensures
that the ghostpad has the exect same sticky events as the target pad. We
don't want to do this for SINK ghostpads, they got the events from
downstream and we don't want to overwrite them with the target pad
events.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707621
2013-11-21 14:13:16 +01:00
Wim Taymans e5c5d3de7e pad: move debug function closer to the enum it debugs 2013-11-21 12:28:00 +01:00
Wim Taymans f8dd5550c2 pluginloader: check read/write before closed
first try to read or write on the socket before checking the closed state. This
makes sure we handle all data on the socket before erroring out.
2013-11-18 21:46:11 +01:00
Wim Taymans 388f0ec069 poll: improve debug
So that we can see the return values of functions in the log.
2013-11-18 21:46:10 +01:00
Tim-Philipp Müller 9f669e5ea5 docs: cosmetic since marker fixes 2013-11-16 16:09:40 +00:00
Sebastian Dröge 38f368e48e bin: Resync iterator if necessary 2013-11-15 07:32:48 +01:00
Sebastian Dröge 5286479467 value: Lists with all equal elements are equal to a single value
Otherwise caps containing f={X, X} are not compatible with f=X

https://bugzilla.gnome.org/show_bug.cgi?id=709253
2013-11-13 19:57:23 +01:00
Tim-Philipp Müller e30eab99a2 systemclock: add Since markers for new API 2013-11-11 16:47:06 +00:00
Wim Taymans 02b64ee03b systemclock: Add gst_system_clock_set_default
Used for setting the default system clock that is obtained through
gst_system_clock_obtain(), which is sometimes needed for unit
testing.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711269
2013-11-11 12:25:14 +01:00
Alessandro Decina 2b84b4bd97 memory: explicitly cast to GstLockFlags to avoid compiler warnings 2013-11-04 11:53:56 +01:00
Mark Nauwelaerts ebca6aa84f segment: resurrect sanitizing start and stop for seeking 2013-11-02 16:13:27 +01:00
Olivier Crête 789eda5a37 parse: Make the FATAL_ERRORS flag also work without a GError
Also add a unit tests
2013-11-01 17:02:25 +00:00
Sebastian Dröge 7e5dc030f5 utils: Add some attributes and reorganize code to fix compiler warnings
gstutils.c:3659:41: error: format string is not a string literal
[-Werror,-Wformat-nonliteral]
    gchar *expanded = g_strdup_vprintf (stream_id, var_args);

https://bugzilla.gnome.org/show_bug.cgi?id=710621
2013-10-30 21:53:36 +01:00
Stefan Sauer a6f60fcf2e registry: small cleanups and use object log variants more 2013-10-25 21:29:01 +02:00
Stefan Sauer 1e58699376 private: remove left-over comment
The caps are saved in the registry.
2013-10-25 21:28:30 +02:00
Stefan Sauer ecbe3d4f2e registry: use g_slice_free for slice memory
Avoid memory list corruption, but g_free'ing slice memory.
2013-10-25 20:05:03 +02:00
Luis de Bethencourt bbc26fffc2 docs: fix typos in gstobject 2013-10-25 11:02:19 -04:00
Sebastian Dröge 2231721ddd datetime: Make sure to include gst_private.h before glib-compat-private.h
We need to define the GLib log domain before including glib.h, which is
included by glib-compat-private.h.
2013-10-15 11:44:48 +02:00
Jan Schmidt 75b7387f8b parse: Fix transfer annotations for parse_launch functions.
gst_parse_launchv, gst_parse_launchv_full and gst_parse_launch_full
all return floating refs, the same as gst_parse_launch, which just
calls gst_parse_launch_full internally anyway.

Add a unit test assertion to check it's true.

Spotted by nemequ on IRC.
2013-10-12 16:20:50 +11:00
Reynaldo H. Verdejo Pinochet 94a3394edf core: Fix max DEBUG_LEVEL incongruence on 5 vs 9
In the docs and the autocompletion logic the maximum
value jumped incongruently between 5 and 9.
2013-10-10 13:06:14 -07:00
Thiago Santos 007c0e5fe1 value: fix caps serialization when there are caps inside caps
Wrap caps strings so that it can handle serialization and deserialization
of caps inside caps. Otherwise the values from the internal caps are parsed
as if they were from the upper one

https://bugzilla.gnome.org/show_bug.cgi?id=708772
2013-09-30 16:20:48 -03:00
Edward Hervey 3892e4dd61 pluginloader: Check errors on the proper fd
Most likely a copy-paste error from the block before.

If we're going to check for error/closed on the write fd... do it
on the write fd
2013-09-28 08:42:44 +02:00
Wim Taymans 62b7d17c2e pad: only check event order when something changed
Check the event order in dataflow only when something changed instead
of for each buffer.
2013-09-26 11:32:50 +02:00
Sebastian Dröge ccfca8f66f bin: Make sure to cache context types that we did not store yet
https://bugzilla.gnome.org/show_bug.cgi?id=708668
2013-09-24 12:46:52 +02:00
Edward Hervey c4539db3c1 gstcontext: Fix return values some more
Return value is a boolean not a pointer
2013-09-19 12:07:56 +02:00
Sebastian Dröge 291991dac2 context: Fix return values for gst_context_has_context_type() in assertions 2013-09-19 11:49:26 +02:00
Sebastian Dröge f09b122453 context: Add convenience function gst_context_has_context_type() 2013-09-19 09:49:40 +02:00
Sebastian Dröge 8c09649de2 message: Implement getting the name of the context message types 2013-09-18 23:07:31 +02:00
Sebastian Dröge 921ab73340 context: Fix unit test for GstContext changes 2013-09-18 21:42:42 +02:00
Sebastian Dröge 640a05ff60 bin: Implement context caching and propagation again 2013-09-18 21:42:42 +02:00
Sebastian Dröge 51982d158a message/query: Simplify CONTEXT messages/queries to only contain a single type 2013-09-17 13:50:08 +02:00
Sebastian Dröge 2ae9809ae8 context: Update documentation 2013-09-17 13:36:49 +02:00
Sebastian Dröge 4d367dc1b0 context: Change GstContext to contain only a single context
It was unintuitive that GstContext was actually a list of different
contexts. GstContext now is only a type string and a structure to
contain the actual context.
2013-09-17 13:28:42 +02:00
Sebastian Dröge 014690326f element: Remove GstContext caching 2013-09-17 13:16:40 +02:00
Sebastian Dröge e3ce799217 context: Add persistent qualifier for a context
Non-persistent contexts are removed when elements go back
to NULL state, persistent contexts are not. Applications
most likely want to set persistent contexts.
2013-09-17 13:10:53 +02:00
Sebastian Dröge a7f5dc8b8a query: Make CONTEXT query upstream and downstream 2013-09-17 13:10:16 +02:00
Sebastian Dröge 113c9fa277 event: Remove CONTEXT downstream event
This is going to be implemented with an upstream query instead
for consistency and simplicity.
2013-09-17 13:09:34 +02:00
Jonas Holmberg 8501fbd216 gst: Stop all unused threads in GThreadPool in gst_deinit()
Since the default number of max unused threads in GThreadPool has been
changed from 0 to 2 it needs to be set to 0 to stop all threads or
valgrind will report them as memory leaks.
2013-09-13 14:42:55 +02:00
Sebastian Dröge dae27ba3d3 meta: Deprecate GST_META_TAG_MEMORY
The GQuarks are not exported by any public API
2013-09-09 15:40:42 +02:00
Mathieu Duponchelle ff05a4698e meta: Add a #define for memory metadata 2013-09-09 15:33:54 +02:00
Mathieu Duponchelle 8d24c4e451 basetransform: implement a default transform_meta.
If a metadata has no dependency as shown by the tags, copy it.
2013-09-09 15:32:18 +02:00
Mathieu Duponchelle 4c7dbde791 meta: API: Add gst_meta_api_type_get_tags() to get all meta tags. 2013-09-09 15:32:18 +02:00
Tim-Philipp Müller aa1890a4b4 docs: flesh out gst_sample_get_buffer() a little
https://bugzilla.gnome.org/show_bug.cgi?id=706478
2013-08-21 12:21:43 +01:00
Kerrick Staley bd2a01cfe2 parse: make grammar.y work with Bison 3
YYLEX_PARAM is no longer supported in Bison 3.

https://bugzilla.gnome.org/show_bug.cgi?id=706462
2013-08-21 10:02:26 +01:00
Wonchul Lee facf73ad8d sample: Add gst_sample_copy()
https://bugzilla.gnome.org/show_bug.cgi?id=706454
2013-08-21 08:51:34 +02:00
Olivier Crête f90f3cde5f buffer: Fix gst_buffer_memcmp() where the buffer is smaller than size
Also add unit tests for gst_buffer_memcmp

https://bugzilla.gnome.org/show_bug.cgi?id=706162
2013-08-20 14:41:27 -04:00
Tim-Philipp Müller bd2ece0c48 docs: flesh out gst_element_query_{duration,position} docs a bit 2013-08-20 17:06:49 +01:00
Matthieu Bouron d10dab0884 taglist: handle publisher and interpreted-by tags
https://bugzilla.gnome.org/show_bug.cgi?id=705999
2013-08-20 14:43:32 +02:00
Sebastian Dröge c3e2bf8086 pluginloader: Don't call memcpy() with NULL src and 0 length 2013-08-20 13:58:24 +02:00
Brendan Long 48319d4be2 parse: Add GST_FLAG_NO_SINGLE_ELEMENT_BINS
This makes gst_parse_bin_from_description() return an element instead of
a bin if there's only one element. Also changed gstparse.c to use this,
so gst-launch won't create superfluous bins.

https://bugzilla.gnome.org/show_bug.cgi?id=703405
2013-08-19 11:30:15 +02:00
Arnaud Vrac 9819e48b92 query: return NULL when parsing uri redirection that was not set
https://bugzilla.gnome.org/show_bug.cgi?id=706160
2013-08-19 10:11:24 +02:00
Sebastian Dröge 98d8cdfda4 buffer: Update since marker for gst_buffer_extract_dup() to 1.0.10 2013-08-18 11:49:08 +02:00
Jonas Holmberg e3a386e9cf Free thread pools in gst_deinit() 2013-08-16 10:32:25 +01:00
Tim-Philipp Müller a4f2720be4 clock: simplify internal gst_clock_return_get_name() helper 2013-08-14 21:41:23 +01:00
Edward Hervey 29353c1b59 gst: minor docstring fixups to make g-i happy
note: the #ifndef move is actually a move of the "SECTION" docstring
2013-08-14 07:05:04 +02:00
Sebastian Dröge 5d26d67ba7 sysmem: Only copy the requested part of memory instead of the complete source memory
https://bugzilla.gnome.org/show_bug.cgi?id=705678
2013-08-13 15:48:07 +02:00
Tim-Philipp Müller 104db59706 query: add Since markers for new API and add to exports file 2013-08-13 12:11:19 +01:00
Andoni Morales Alastruey 0d82493894 query: fix annotation for gst_query_parse_uri 2013-08-12 16:34:54 +02:00
Andoni Morales Alastruey a70b5fc16a query: add new redirection uri the URI query 2013-08-12 16:34:54 +02:00
Thiago Santos 210aaabb60 query: add some missing 'transfer none' gi annotations
The current documentation is controverse, while it states that the
returned value is valid only while the query is is valid, which presumes
a 'transfer none' policy. But the tooltip for the 'out' annotation
states the default is 'transfer-full'.

Add the missing 'transfer none' annotations to fix this.
2013-08-12 09:41:10 -03:00
Tim-Philipp Müller d97aa274c2 pipeline: g-i: allow clock to be NULL in gst_pipeline_use_clock()
https://bugzilla.gnome.org/show_bug.cgi?id=705751
2013-08-10 11:33:58 +01:00
Kjartan Maraas 280f557380 docs: some small gtk-doc markup fixes
https://bugzilla.gnome.org/show_bug.cgi?id=705156
2013-07-30 23:33:28 +01:00
Kjartan Maraas f9d62f6a53 gst: register new color mode enum, fixing 'make check'
https://bugzilla.gnome.org/show_bug.cgi?id=705156
2013-07-30 23:32:49 +01:00
Sjoerd Simons cf3cbe76af query: Clarify the estimated-total documentation
Tweak the documentation slightly to clarify that the estimated-total in
a a Buffering query the total remaining time of a download, not the
total time for the complete download. Also indicate the unit used.

https://bugzilla.gnome.org/show_bug.cgi?id=704934
2013-07-29 15:08:18 +02:00
Tim-Philipp Müller 6e107e90ed buffer: fix Since: marker for new gst_buffer_extract_dup() 2013-07-26 18:36:04 +01:00
Wim Taymans d73b4edc99 clock: debug the clock return values 2013-07-26 12:20:05 +02:00
David Schleef f599019a99 info: parse debug levels > 9 2013-07-24 10:30:09 -07:00
Sebastian Dröge d55893fb96 value: Fix copy&paste mistakes in the bitmask function docs 2013-07-24 16:57:46 +02:00
Tim-Philipp Müller 0c513e3d97 value: handle deserialisation of nonexistant enum value more gracefully 2013-07-22 17:25:47 +01:00
Sebastian Dröge 7c936a4cc2 bin: Use the new group-id field of the stream-start message for stream-start message aggregation
If all stream-start messages had a group id (for backwards compatibility),
we only consider a stream started if all had the same group id.

In 2.0 we should make the group id mandatory.
2013-07-22 15:30:10 +02:00
Sebastian Dröge 75d9454bf4 gst: Add new group-id field to the stream-start event
All streams that have the same group id are supposed to be played
together, i.e. all streams inside a container file should have the
same group id but different stream ids. The group id should change
each time the stream is started, resulting in different group ids
each time a file is played for example.
2013-07-22 15:30:10 +02:00
Sebastian Dröge 9ddcfcf8f4 gst: Add some more Since: 1.2 2013-07-18 14:39:42 +02:00
Sebastian Dröge b9841335ed info: Add some Since: 1.2 2013-07-18 14:34:31 +02:00
Руслан Ижбулатов 797fcd1d49 info: Add debug color mode option
This allows to explicitely set the debug output color
mode to UNIX on every platform, enable it (use platform
default color mode) or enable it.

https://bugzilla.gnome.org/show_bug.cgi?id=674320
2013-07-18 14:30:44 +02:00
Руслан Ижбулатов 46106ebe8f info: Fix black and underline coloring on W32
Fixes #674320
2013-07-18 14:21:22 +02:00
Руслан Ижбулатов 143f30bfcb info: Cut down src file names for MinGW too
Fixes #674320
2013-07-18 14:21:06 +02:00
Sebastian Dröge 3821cee574 query: Don't assert if no context is set in the query 2013-07-16 17:35:50 +02:00
Tim-Philipp Müller 472a64418a query: sprinkle some Since 1.2 markers in docs 2013-07-16 14:48:19 +01:00
Sebastian Dröge e47270ee24 element: Return an empty GstContext if none was set yet 2013-07-16 15:34:57 +02:00
Sebastian Dröge 356ef049d3 query: Add gst_query_has_context_type() 2013-07-16 15:16:16 +02:00
Sebastian Dröge c279bdb663 pad: A newly activated pad should be marked as needing reconfiguration 2013-07-15 11:36:44 +02:00
Sebastian Dröge 942d905e19 Revert "pad: Don't consider flushing pads as needing reconfiguration"
This reverts commit 948a9d2f2b.

This is racy and trying to reconfigure and fail is still better
than not trying to reconfigure at all.

https://bugzilla.gnome.org/show_bug.cgi?id=704100
2013-07-15 11:32:54 +02:00
Sebastian Dröge ba4ec10aa5 bin: Always forward clock-lost message if we're not a top-level bin
This makes sure that no bin misses the clock-lost messages, independent
of the state, and could return an old, non-working clock from
gst_bin_provide_clock_func().

https://bugzilla.gnome.org/show_bug.cgi?id=701997
2013-07-10 15:57:34 +02:00
Tim-Philipp Müller 05bbd1b11a allocator: fix type of gst_memory_alignment to match declaration
Fixes compiler warnings such as
gstallocator.c:61:8: error: conflicting types for 'gst_memory_alignment'
../gst/gstallocator.h:52:18: note: previous declaration of 'gst_memory_alignment' was here
2013-07-08 15:26:38 +01:00
Nicolas Dufresne 4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Sebastian Dröge 948a9d2f2b pad: Don't consider flushing pads as needing reconfiguration
Renegotiation and reconfiguration will fail because all queries
and events won't be accepted by the pad if it's flushing. In the
best case this just causes unneeded work and spurious warnings in
the debug logs, in the worst case it causes elements to fail completely.
2013-06-30 18:40:47 +02:00
Sjoerd Simons 1815e6067a pad: Add a filter to the caps_query done by acceptcaps
Use the caps that the pad is asked to accept as filter for the query

https://bugzilla.gnome.org/show_bug.cgi?id=702632
2013-06-19 15:12:18 +02:00
Edward Hervey 0d57bd3198 taglist: Avoid combinatorial explosion when merging tags
When appending/prepending tags, avoid re-creating (and copying) lists if we already
have one and instead just append/prepend the GValue to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=702545
2013-06-19 11:58:37 +02:00
Paul HENRYS db80044513 buffer: Fix wrong size/index handling when merging memory
https://bugzilla.gnome.org/show_bug.cgi?id=702617
2013-06-19 10:39:30 +02:00
Sebastian Dröge bd48ba333d structure: Add gst_structure_new_from_string()
Convenience API for bindings, gst_structure_from_string() returns
a tuple (structure, end_ptr) in bindings and is unintuitive to use
because of that.
2013-06-14 13:05:38 +02:00
Hans de Goede 7fc2602761 gst: Don't intercept --help in gst_init()
Before this patch gst_init would intercept --help, causing for example
cheese's --help to look like this:

[hans@shalem cheese]$ cheese --help
Usage:
  cheese [OPTION...] - GStreamer initialization

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

gst_init is the only gfoo_init function which does this.

https://bugzilla.gnome.org/show_bug.cgi?id=702089
2013-06-13 08:37:28 +02:00
Edward Hervey 2e1db58e11 gstvalue: Add _append_and_take_value() public variants
API: gst_value_array_append_and_take_value
API: gst_value_list_append_and_take_value

We were already using this internally, this makes it public for code
which frequently appends values which are expensive to copy (like
structures, arrays, caps, ...).

Avoids copies of the values for users. The passed GValue will also
be 0-memset'ed for re-use.

New users can replace this kind of code:
gst_value_*_append_value(mycontainer, &myvalue);
g_value_unset(&myvalue);

by:

gst_value_*_append_and_take_value(mycontainer, &myvalue);

https://bugzilla.gnome.org/show_bug.cgi?id=701632
2013-06-05 12:58:05 +02:00
Edward Hervey e1f520f27c gstbuffer: Use internal function for buffer_new_wrapped
Shaves ~10% instruction calls from the total cost

https://bugzilla.gnome.org/show_bug.cgi?id=701633
2013-06-05 11:15:34 +02:00
Sebastian Dröge cc7113b619 elementfactory: Add support for checking subtitle/metadata factory types 2013-05-28 12:44:19 +02:00
Sebastian Dröge ee21c26cea elementfactory: Add support for checking only the media type of a factory
And while at it also add Metadata and Subtitle media types.
2013-05-28 12:41:27 +02:00
Sebastian Dröge 73895c05b1 pad: Store sticky events even if the pad is flushing
But do this only for events that are not dropped by flushing,
i.e. do it only for everything except SEGMENT and EOS.

Without this we might drop a CAPS event if flushing happens
at an unfortunate time and nobody is resending the CAPS event.

https://bugzilla.gnome.org/show_bug.cgi?id=700806
2013-05-27 12:40:50 +02:00
Sebastian Dröge 3d44f542ed pad: Only check if we get buffers before stream-start/segment if compiling without G_DISABLE_ASSERT
In releases this is set usually.
2013-05-10 16:03:34 +02:00
Sebastian Dröge d500ffc300 pad: Fix uninitialized variable compiler warning 2013-05-09 17:55:21 +02:00
Sebastian Dröge 1b87f0c36a pad: Make sure pending, older sticky events are sent downstream in dynamic linking scenarios
If a pad block was triggered from sending a sticky event downstream, it
could happen that the pad block is relinking pads, which then requires
to resend previous sticky events.
2013-05-09 17:55:21 +02:00
Sebastian Dröge 8bedcf450f pad: Warn if data flow happens before stream-start or segment event 2013-05-09 11:05:50 +02:00
Sebastian Dröge 430285b5c8 pad: Only let gst_pad_sticky_events_foreach() iterate over existing events 2013-05-09 10:59:41 +02:00
Sebastian Dröge e0f59d22eb pad: If we push sticky events because of another sticky event, only push those that come before the new event
https://bugzilla.gnome.org/show_bug.cgi?id=699937
2013-05-09 10:29:11 +02:00
Sebastian Dröge ae47133360 pad: No sticky events must arrive after EOS 2013-05-09 09:51:13 +02:00
Nicolas Dufresne e8a9ffa092 pad: Improve warning message naming events type name
With this patch, message should look like ¨Sticky event misordering, got
'caps' before 'stream-start'¨ making it faster to debug.

https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:30 +02:00
Nicolas Dufresne f6aa4d85c1 pad: Only inforce STREAM_START, CAPS and SEGMENT ordering
Previous patch was inforcing a complete ordering of the sticky events, while
in fact, only STREAM_START, CAPS and SEGMENT events need proper ordering.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:19 +02:00
Nicolas Dufresne a68e33712e pad: Detect, fix and warn when sticky events are in wrong order
We can prevent buggy element from causing other elements to fail or crash
by sorting sticky event at insertion. In this case, we also warn as this
is not supposed to happen.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-08 13:48:59 +02:00
Tim-Philipp Müller 65c2ecb4f3 buffer: allow calling _fill() with a NULL data pointer if size is 0 bytes 2013-05-08 10:25:36 +01:00
Alessandro Decina 543b92a856 gstpad: run probes for FLUSH events sent with gst_pad_send_event
Move probe handling in gst_pad_send_event_unchecked so that probes are run for
FLUSH events too.
2013-04-25 06:43:29 +02:00