Commit graph

7643 commits

Author SHA1 Message Date
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
Jan Schmidt ae2b0bacb6 gstpad: Fix a typo in a docstring. 2015-02-02 17:38:00 +11:00
Nicolas Dufresne 2b7a15172f build: Check that _MSC_VER macro is defined 2015-02-01 14:23:26 -05:00
Ilya Konstantinov 05296b35a5 task: Add thread name support on OS X and iOS 2015-02-01 20:11:20 +01:00
Sebastian Dröge c3963ae7a3 clock: Don't use invalid objects for GST_DEBUG_OBJECT()
Not sure what "clock" actually is here, it must be something defined by one of
the headers that are included.
2015-01-29 16:37:07 +01:00
Sebastian Dröge 6e47237e66 buffer: Document that gst_buffer_copy_region() accepts -1 as size to copy until the end
It's just a wrapper around gst_buffer_copy_into() after all.
2015-01-29 12:10:49 +01:00
Jan Schmidt f3756af07b segment: Add new skip flags for clarifying trick mode playback.
Add GST_SEEK_FLAG_TRICKMODE_KEY_UNITS and
GST_SEEK_FLAG_TRICKMODE_NO_AUDIO, and rename GST_SEEK_FLAG_SKIP
to GST_SEEK_FLAG_TRICKMODE (with backwards compat define).

Do the same for the corresponding SEGMENT flags.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-01-27 01:51:58 +11:00
Sebastian Dröge 40a0275298 uri: Fix indention 2015-01-22 23:10:06 +02:00
David Waring ab9b66e6be uri: Fix parsing issues
Make host IPs in square brackets store only the IP, i.e. strip the brackets.
Strip leading whitespace characters in URIs.
Fail parsing when host part does not match any valid formats from RFC3986.

https://bugzilla.gnome.org/show_bug.cgi?id=743195
2015-01-22 22:08:00 +01:00
Edward Hervey a6373625f3 gstpad: Inline apply_pad_offset()
Avoid doing a function call for something which will mostly be unused
2015-01-21 14:13:15 +01:00
Edward Hervey 64b451c170 gstpad: Fix debug message 2015-01-21 14:13:15 +01:00
Edward Hervey 93f540bb62 gstpad: Fix PROBE_NO_DATA macro
The problem was that the macro was always used with 'ret' as the defaultval
argument.

This would result in the macro eventually expanding to
    if (G_UNLIKELY (ret != ret && ret != GST_FLOW_OK))

... ret != ret will always fail, and therefore we'd never call the
following line.

Instead of that, store the previous value locally for comparision
2015-01-21 14:11:41 +01:00
Jan Schmidt 81d613694c clock: Improve slaving regression.
Add domain checks for the input values, and a variable precision
calculation that loops if necessary to ensure we never overflow
accumulators and then silently produce garbage results.

Make the (non-public) linear regression function available for
unit testing by putting it in a separate source file the test
can include. Add a unit test that the new regression function
produces sensible results for several inputs taken from real-world
captures.
2015-01-21 22:27:18 +11:00
Jan Schmidt 4bc7d34f57 clock: Add gst_clock_add_observation_unapplied()
gst_clock_add_observation_unapplied() adds a new master/slave clock
observation and runs the regression without activating the new
calibration results.
2015-01-21 22:27:18 +11:00
Jan Schmidt b79b14815e clock: Add gst_clock_adjust_with_calibration()
gst_clock_adjust_with_calibration() uses directly passed calibration
parameters, instead of using the clock's current calibration,
allowing for calculations using pending or old calibration params
2015-01-21 22:27:18 +11:00
Thiago Santos 0ab956d2c2 docs: fix typo in GstEvent docs
send -> sent
2015-01-20 10:35:47 -03:00
Sebastian Dröge 5b2c79eda7 bin: Pass structs we plan to modify around by pointer, not value
Otherwise the struct is going to be copied, which is not very efficient. And
also has the nice side effect that modifications of the struct might be
done in a copy, and we later use the original struct without the changes.

Caused LATENCY queries to always return the initialization values in one of my
tests, instead of the actual values reported by child elements.
2015-01-16 19:17:31 +01:00
Phillip Wood aefb6fda5e preset: fix incorrect preset version comparison
Use app_version if there are no system presets, so that if the
application presets are newer than the user presets they are merged.

https://bugzilla.gnome.org/show_bug.cgi?id=742877
2015-01-14 11:05:01 +01:00
Stefan Sauer 70788b8578 preset: fix sorting presets
The glib docs are not clear on this, but the qsort man-page is - the
GCompareDataFunc does not get the strings, but pointers to them.
2015-01-11 23:02:57 +01:00
Stefan Sauer 266481e9ff preset: don't return empty preset lists
Add a shortcut for the cases where an element implements the preset iface but
has no presets and return NULL instead of an empty list in that case.
2015-01-04 23:26:19 +01:00
Stefan Sauer 7326d4d71b docs: fix two gtk-doc warnings
One by correcting the end-of-comment marker and one by making sure the function
prototype in the header is in sync with the c file and doc-blob.
2014-12-29 12:05:27 +01:00
Nirbheek Chauhan b627201e7e iterator: Fix outdated example code and accompanying documentation
GstIterator no longer returns a refcounted gpointer
2014-12-27 10:59:31 +00:00
Stefan Sauer ef4910b9e6 debugutils: use a constant for the max param length
Improve readability by using a define for the max-chars. Also use the unicode
ellipsis as dot files are utf-8.
2014-12-21 14:15:54 +01:00
Edward Hervey d92e18b722 gstinfo: Add new maximum level debugging
API: GST_LEVEL_MAX

By compiling gstreamer (or plugins) with GST_LEVEL_MAX defined, only
the debugging statements at or below that level will be compiled in.

This allows compiling in some debugging (like errors and warnings) which
helps in debugging, but without the full cpu/memory overhead of all debugging
enabled.
2014-12-19 11:35:24 +01:00
Arun Raghavan e4d6896d0c debugutils: Truncate parameter values that are too long
This removes some information from the dumps, but improves readability.

https://bugzilla.gnome.org/show_bug.cgi?id=739165
2014-12-18 17:19:36 +05:30
Sebastian Dröge 1f6d5d3ff5 structure/caps: Add gst_{structure,caps}_filter_and_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Sebastian Dröge bc11a1b79d caps: Add gst_caps_foreach() and gst_caps_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Nicolas Dufresne a8d6653037 bufferpool: Don't check size in config validation
Pools are allowed to change the size in order to adapt padding. So
don't check the size. Normally pool will change the size without
failing set_config(), but it they endup changing the size before
the validate method may fail on a false positive.

https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 10:20:37 -05:00