Commit graph

7670 commits

Author SHA1 Message Date
Lubosz Sarnecki
373af462db debugutils: plot caps features
https://bugzilla.gnome.org/show_bug.cgi?id=746809
2015-03-31 20:16:39 +01:00
Wonchul Lee
ca380d16a0 pad: Fix a typo in a docstring
https://bugzilla.gnome.org/show_bug.cgi?id=747119
2015-03-31 19:28:51 +01:00
Edward Hervey
e4d07e161d introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:16:09 +02:00
Tim-Philipp Müller
eb2d1f5b96 pad: fix outdated debug message
Buffer lists don't have groups any more in 1.0
2015-03-28 14:47:45 +00:00
Luis de Bethencourt
555e0211c8 gstvalue: only unwrap string delimited with "
Don't unwrap strings that start but don't finish with a double quote. If a
string is delimited by two quotes we unescape them and any special characters
in the middle (like \" or \\). If the first character or the last character
aren't a quote we assume it's part of an unescaped string.

Moved some deserialize_string unit tests because we don't try to unwrap strings
missing that second quote anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:18:23 +00:00
Luis de Bethencourt
c565c5ecb4 parse: check before truncating strings
Don't truncate the last character of a string if it isn't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:16:07 +00:00
Sebastian Dröge
2064a07feb bus: Add guards against invalid arguments to set_flushing() and poll()
https://bugzilla.gnome.org/show_bug.cgi?id=746871
2015-03-27 10:15:45 +01:00
Michael Catanzaro
f718962467 pluginloader: Fix typos
https://bugzilla.gnome.org/show_bug.cgi?id=746585
2015-03-25 23:36:54 +00:00
Wim Taymans
bc282da83c segment: remove the bounds check from _to_running_time_full()
Do not do any checks for the start/stop in the new
gst_segment_to_running_time_full() method, we can let this be done by
the more capable gst_segment_clip() method. This allows us to remove the
enum of results and only return the sign of the calculated running-time.
We need to put the old clipping checks in the old
gst_segment_to_running_time() still because they work slightly
differently than the _clip methods.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-20 09:00:47 +01:00
Wim Taymans
edf484ab6b segment: add option to disable clipping
Add a clip argument to gst_segment_to_running_time_full() to disable
the checks against the segment boundaries. This makes it possible to
generate an extrapolated running-time for timestamps outside of the
segment.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-19 17:36:36 +01:00
Tim-Philipp Müller
1734915850 gst: ref/unref new enum type in gst_init/deinit() 2015-03-18 16:27:36 +00:00
Wim Taymans
8c8b3818e4 segment: add helper to get negative running-time
Add a helper method to get a running-time with a little more features
such as detecting if the value was before or after the segment and
negative running-time.

API: gst_segment_to_running_time_full()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-18 11:35:42 +01:00
Wim Taymans
6e67ad7675 segment: fix offset handling with non 0 start
The position in the segment is relative to the start but the offset
isn't, so subtract the start from the position when setting the offset.
Add unit test for this as well.
2015-03-18 11:35:42 +01:00
Sebastian Dröge
c19809ef19 pluginloader: Fix indention 2015-03-17 15:41:38 +01:00
Ramiro Polla
5253a4d879 element: properly escape percent sign in documentation 2015-03-14 14:19:47 +00:00
Sebastian Dröge
21da311743 buffer: Use the correct enum type to fix a compiler warning
gstbuffer.c:522:58: error: implicit conversion from enumeration type 'GstBufferFlags' to
      different enumeration type 'GstBufferCopyFlags' [-Werror,-Wenum-conversion]
  if (!gst_buffer_copy_into (copy, (GstBuffer *) buffer, flags, 0, -1))
       ~~~~~~~~~~~~~~~~~~~~                              ^~~~~
gstbuffer.c:534:46: error: implicit conversion from enumeration type 'GstBufferCopyFlags' to
      different enumeration type 'GstBufferFlags' [-Werror,-Wenum-conversion]
  return gst_buffer_copy_with_flags (buffer, GST_BUFFER_COPY_ALL);
         ~~~~~~~~~~~~~~~~~~~~~~~~~~          ^~~~~~~~~~~~~~~~~~~
./gstbuffer.h:433:31: note: expanded from macro 'GST_BUFFER_COPY_ALL'
  ...((GstBufferCopyFlags)(GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_MEMORY))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-03-14 13:37:09 +00:00
Nicolas Dufresne
7f6b11a5b2 allocation: Allow allocation pool without size
This allow proposing a number of buffers required even if the size
of buffer is unfixed. This is often the case for encoded formats.
2015-03-14 12:00:53 +00:00
Nicolas Dufresne
c740bad1a0 bufferpool: Don't stop the pool in set_config()
Don't stop the pool in set_config(). Instead, let the controlling
element manage it. Most of the time, when an active pool is being
configured is because the caps didn't change.

https://bugzilla.gnome.org/show_bug.cgi?id=745377
2015-03-14 12:00:53 +00:00
Thiago Santos
96eaeadc0f gstbuffer: add gst_buffer_copy_deep
A variant of gst_buffer_copy that forces the underlying memory
to be copied.

This is added to avoid adding an extra reference to a GstMemory
that might belong to a bufferpool that is trying to be drained.
The use case is when the buffer copying is done to release the
old buffer and all its resources.

https://bugzilla.gnome.org/show_bug.cgi?id=745287
2015-03-13 18:37:04 +00:00
Sebastian Dröge
d8f572647f bus: Use g_list_free_full() instead of manually unreffing and freeing
Also unref the messages, not the GList nodes.
2015-03-13 15:31:30 +00:00
Sebastian Dröge
f50d809c25 bus: Fix another case where we hold the object lock while unreffing a message 2015-03-13 13:42:46 +00:00
Vivia Nikolaidou
721539dc4f bus: Unreferencing messages outside the lock
Shouldn't take the lock while unreferencing messages, because that may cause
more messages to be sent, which will try to take the lock and cause the app to
hang.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728777
2015-03-13 13:37:49 +00:00
Vivia Nikolaidou
6ec3c4bc66 utils: Add gst_bin_sync_children_states()
gst_bin_sync_children_states() will iterate over all the elements of a bin and
sync their states with the state of the bin. This is useful when adding many
elements to a bin and would otherwise have to call
gst_element_sync_state_with_parent() on each and every one of them.

https://bugzilla.gnome.org/show_bug.cgi?id=745042
2015-03-13 12:50:48 +00:00
Aurélien Zanelli
3da3e8df3e printf: handle unsigned modifier for long long
Otherwise, an unsigned integer will be displayed as a signed one if we
use internal print, ie HAVE_LONG_LONG_FORMAT is not defined.

https://bugzilla.gnome.org/show_bug.cgi?id=746096
2015-03-12 15:23:20 +00:00
Matej Knopp
b7f958abad printf: add support for %I32
https://bugzilla.gnome.org/show_bug.cgi?id=744281
2015-03-12 13:29:00 +00:00
Tim-Philipp Müller
2d92f5e6d8 info: move category level threshold check into log function dispatcher
Minor optimisation: check category log level earlier in the
log function dispatcher and not only in the default log
function.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-12 13:16:22 +00:00
Tim-Philipp Müller
bd7d1c8b61 Fix double semicolons 2015-03-10 09:24:28 +00:00
Tim-Philipp Müller
4e777233f5 info: avoid malloc/free if log object is NULL 2015-03-05 18:30:45 +00:00
Tim-Philipp Müller
5764316a8e info: move __FILE__ path shortening into default log handler
Instead of always shortening the __FILE__ path, even if the
log message is not actually printed, which might happen if
the log level is activated but the category is not, only
shorten the path if we're actually going to output it and
if it looks like it needs shortening. Log handlers had no
guarantee that they would get a name instead of a path
anyway on any architecture, so it shouldn't be a problem.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-05 17:57:58 +00:00
Peter Urbanec
6cbe86dc58 info: shorten __FILE__ on all platforms
This is useful not only for MSVC, but also with gcc/Linux
when doing cross-compilation builds and out-of-tree builds.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-05 17:53:16 +00:00
Tim-Philipp Müller
a988871074 utils: improve warning when linking elements without common ancestor
This comes up quite a lot and it's a common mistake, so let's
try to improve the warning message a little.
2015-03-02 20:31:58 +00:00
Arun Raghavan
be36d34aee pad: Don't fail latency query on unlinked pads
A single unlinked pad can make the latency query fail across the
pipeline, which is probably not desirable. Instead, we return a default
anything goes value.

Perhaps we should also be emitting a gst_message_new_latency() when a
PLAYING element has one of its pads linked.

https://bugzilla.gnome.org/show_bug.cgi?id=745197
2015-02-26 15:57:26 +05:30
Edward Hervey
075def0f97 gstvalue: Make sure GST_FOURCC_ARGS produces printable characters
Some systems will crash if we use non-printable characters in print/debug
statements.

Make sure that GST_FOURCC_ARGS never does that

https://bugzilla.gnome.org/show_bug.cgi?id=745144
2015-02-26 07:49:05 +01:00
Luis de Bethencourt
4245658d28 gstutils: remove incorrect Fixme comment
If the checks were changed to using g_return_if_fail() the GST_DEBUG lines
about the specific failure would be lost.
2015-02-25 16:11:06 +00:00
Luis de Bethencourt
5f027ae453 gstutils: remove obsolete Fixme comment
gst_pad_link_filtered() is very long gone and current
gst_element_link_pads_filtered() doesn't apply to this Fixme comment.
2015-02-25 16:02:39 +00:00
Luis de Bethencourt
bcce3fbcb8 GstDeviceMonitor: keep alphabetical order 2015-02-23 12:24:16 +00:00
Olivier Crête
f9baff11c8 Revert "element: set pads need-parent flag to false when removing"
This reverts commit 1911554cff.

This breaks the functionality of GST_PAD_FLAG_NEED_PARENT, the reason for this
flag is that if a pad is removed from a running element, you don't want
functions (such as chain or event) to be called on the pad without a parent set.
This can happen if you remove a request or sometimes pad from a running element.

I don't see the code that caused this in tsdemux, but if it needs to unset
the flag on remove, it should do it itself and then make sure that the parent
exists in any pad function.
2015-02-20 16:22:23 -05:00
Sebastian Dröge
6f9adbe273 pad: If the latency query fails for one of the pads, it fails overall 2015-02-19 01:12:49 +02:00
Tim-Philipp Müller
10f038d4fb message: revive async delivery message before bus thread can run unref
Revive message in dispose handler before we signal the bus thread,
otherwise the bus thread might be woken up and unref the message
before we had a chance to revive it yet.
2015-02-17 20:49:53 +00:00
Tim-Philipp Müller
da7847d1ad message, bus: fix async message delivery
Async message delivery (where the posting thread gets blocked
until the message has been processed and/or freed) was pretty
much completely broken.

For one, don't use GMutex implementation details to check
whether a mutex has been initialized or not, esp. not
implementation details that don't hold true any more with
newer GLib versions where atomic ops and futexes are used
(spotted by Josep Torras). This led to async message
delivery no longer blocking with newer GLib versions on
Linux.

Secondly, after async delivery don't free mutex/GCond
embedded inside the just-freed message structure.

Use a new (private) mini object flag to signal GstMessage
that the message being freed is part of an async delivery
on the bus so that the dispose handler can keep the message
alive and the bus can free it once it's done cleaning up
stuff.
2015-02-17 09:52:09 +00:00
Tim-Philipp Müller
9f58aa080a info: nicer buffer offset printing when offsets are not set
Print unset offsets as 'none' instead of humongous numbers,
for better readability.
2015-02-16 19:36:11 +00:00
Sebastian Dröge
9107a5e041 pad: Only initialize GValue to a type once, not on every retry
Otherwise we'll get warnings like this:
cannot initialize GValue with type 'gboolean', the value has already been initialized as 'gboolean'
2015-02-16 11:35:41 +02:00
Matthieu Bouron
ee9ca5d48b gstutils: check uri before using it in gst_pad_create_stream_id_internal
If an element implements wrongly the URI query and set the uri to NULL and if
the element calls gst_pad_create_stream_id at some point, it will lead to crash
as the uri is not supposed to be NULL in the gst_pad_create_stream_id_internal
function.

https://bugzilla.gnome.org/show_bug.cgi?id=744520
2015-02-15 17:35:35 +00:00
Sebastian Dröge
ae0b12b109 pad: gst_pad_iterate_internal_links() can return NULL if there are none 2015-02-12 14:03:15 +02:00
Sebastian Dröge
5141641dc8 pad: Return NULL instead of FALSE for pointers 2015-02-12 14:03:03 +02:00
Sebastian Dröge
1937d09a95 pad: Implement more useful default handling for the LATENCY query
Before we just took the values from the first pad that succeded the query,
now we accumulate the results of every sinkpad properly and return that
result.
2015-02-12 13:55:36 +02:00
Sebastian Dröge
4a5ce862a2 Improve and fix LATENCY query handling
This now follows the design docs everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:04 +02:00
Jan Schmidt
9d2b2768e3 clock: Make linear regression x/y base start from maximum observation.
Project the results of the linear regression to the end of the
regression range, so they're more directly comparable to results
going forward
2015-02-07 04:38:39 +11:00
Tim-Philipp Müller
08167e3234 pad: add "offset" property to go with gst_pad_set_offset()
So we can set the offset via gst-launch.
2015-02-05 13:49:47 +00:00
Stefan Sauer
423bd42d44 plugin: add more detail to logging when not loading a plugin
Improve the log messages and add e.g the version number we checked.
2015-02-02 09:41:06 +01:00