Commit graph

7474 commits

Author SHA1 Message Date
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 88191aa880 docs: fix type in GstObject docs 2014-05-30 00:14:01 +01:00
Evan Nemerson 4397150d54 bufferpool: fix gst_buffer_pool_has_option() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=730962
2014-05-29 23:18:18 +01:00
Thiago Santos 1911554cff element: set pads need-parent flag to false when removing
When a pad is added the need-parent flag is set to true, so when
they are removed the flag should be set back to false

This was preventing GstPads to be reused in elements (removed and
later re-added). A unit tests was added to verify that this is
working now.

The use case is tsdemux that has a program-number property and
allows the user to switch programs. In order to do that tsdemux
will remove the pads of the current program and add from the new
ones. The removed pads are kept in the demuxer for later if the
user selects the old program again.
2014-05-29 17:01:20 -03:00
Tim-Philipp Müller ba3073ffce pad: two minor docs fixes 2014-05-27 13:37:05 +01:00
Thiago Santos c6f92562b6 pad: store last flow return and provide acessor function
Stores the last result of a gst_pad_push or a pull on the GstPad and provides
a getter and a macro to access this field.

Whenever the pad is inactive it is set to FLUSHING

API: gst_pad_get_last_flow_return

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Nicolas Dufresne 103a40b6ce bufferpool: Add method and virtuals to set flushing state
Currently there is no other way to unlock a buffer pool other then
stopping it. This may have the effect of freeing all the buffers,
which is too heavy for a seek. This patch add a method to enter and
leave flushing state. As a convenience, flush_start/flush_stop
virtual are added so pool implementation can also unblock their own
internal poll atomically with the rest of the pool.  This is fully
backward compatible with doing stop/start to actually flush the pool
(as being done in GstBaseSrc).

https://bugzilla.gnome.org/show_bug.cgi?id=727611
2014-05-26 13:31:21 -04:00
Tim-Philipp Müller 48b608337b pluginloader: fix compiler warning on windows
gstpluginloader.c:584:1: error: label 'beach' defined but not used

https://bugzilla.gnome.org/show_bug.cgi?id=730125
2014-05-14 13:40:03 +01:00
Edward Hervey c7d68da704 pluginloader: Don't leak pluginloader in error cases
CID #1212154
2014-05-12 17:03:46 +02:00
Edward Hervey 25bcc2d7f6 caps: Don't leak features on error cases
If we fail to parse fields, we would end up leaking the features we
parsed just before

CID #1212152
2014-05-12 16:59:29 +02:00
Nicolas Dufresne 194db480e0 bufferpool: Add an helper to validate config
When we call gst_buffer_pool_set_config() the pool may return FALSE and
slightly change the parameters. This helper is useful to do the minial required
validation before accepting the modified configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:11:14 -04:00
Nicolas Dufresne 43acfbbb86 bufferpool: Update the configure even if set_config() returned false
According to the documentation, when set_config() return false, it should be
possible to read the modified version of the config. This patch fixes the
implementation so it is now according to the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:08:21 -04:00
Nicolas Dufresne 6079666a71 bufferpool: Add support for reconfiguring a pool
If a pool config is being configured again, check if the configuration have changed.
If not, skip that step. Finally, if the pool is active, try deactivating it.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Nicolas Dufresne 64aa64cb80 value: Add support for GstAllocationParams comparision
This is useful to compare buffer pool configuaration.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Nicolas Dufresne 00614e2c2b value: Add support for GObject comparising in structures
This is useful to allow comparing pool configuration where a GstAllocator
is set.

https://bugzilla.gnome.org/show_bug.cgi?id=728268
2014-05-08 13:08:21 -04:00
Tim-Philipp Müller 035bc8b8db plugin: fix case where gst_plugin_load_file() didn't set the error on failure 2014-05-08 17:51:31 +01:00
Wim Taymans 35a1822d7a pads: update docs for request pads
We would like to encourage the use of gst_element_request_pad()
2014-05-08 09:13:04 +02:00
Tim-Philipp Müller 4e1699e030 value: init flag mask more correctly 2014-05-04 14:52:01 +01:00
Sebastian Dröge d2e431e0ff bin: Always first post the state-changed message for PAUSED->READY before posting any pending EOS message
https://bugzilla.gnome.org/show_bug.cgi?id=727949
2014-05-01 20:11:04 +02:00
Stian Selnes 40c8208ad2 bufferpool: fix log message of buffer pointer 2014-05-01 10:03:39 +02:00
Sebastian Dröge 3b331155e1 query: Add boolean to URI query to specify if a redirect is permanent or not 2014-04-28 10:03:15 +02:00
Felipe Ortiz c10663ba3e docs: add docs for various GstPad macros
https://bugzilla.gnome.org/show_bug.cgi?id=723652
2014-04-26 23:14:36 +01:00
Tim-Philipp Müller b2722a45dd Revert "docs: add docs for various GstPad macros"
This reverts commit d17438d5fd.

This commit featured the wrong author, sorry.
2014-04-26 23:12:13 +01:00
Tim-Philipp Müller 6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Nicolas Dufresne ec69ad4e8a buffer: Only set TAG_MEMORY if the memory has been replaced
Currently we set TAG_MEMORY as soon a resize changes the size of one
of the memory. This has the side effect that buffer pool cannot know if
the memory have simply been resized, or if the memorys has been replaced.
This make it hard to actually implement _reset(). Instead, only set the
TAG_MEMORY if one or more memory has been replaced, and do a light
sanity check of the size.

https://bugzilla.gnome.org/show_bug.cgi?id=727109
2014-04-26 15:03:04 -04:00
Showayb Zahda d17438d5fd docs: add docs for various GstPad macros
https://bugzilla.gnome.org/show_bug.cgi?id=723652
2014-04-26 17:05:41 +01:00
Sebastian Dröge b76d336549 bin: When going to READY make sure to always deactivate pads
We might not have reached PAUSED yet because of an async error,
but nonetheless we want to make sure that the pads are always
deactivated in READY state.
2014-04-25 15:38:39 +02:00
Sebastian Dröge ce8752c5ce bin: Don't left-shift into the sign bit, the result is undefined 2014-04-22 18:23:15 +02:00
Sebastian Dröge 3cbcfa1d7e value: Use an unsigned 64 bit integer as a mask
We shift the mask to the right later and shifting the result
of shifting over the sign bit is undefined.
2014-04-22 18:16:10 +02:00
Edward Hervey 8b51e9dc60 gstvalue: Prevent division or modulo by zero
The step can end up being zero if the underlying value isn't a valid
range GValue.

In those cases, return FALSE.

We don't use g_return*_if_fail since it will already have been triggered
by the above-mentionned _get_step() functions.

CID #1037132
2014-04-17 13:20:45 +02:00
Antoine Jacoutot 3e24bbefba libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2014-04-17 09:26:20 +01:00
Sebastian Dröge 81f9a22228 memory/buffer: Initialise GstMapInfo to zeroes if mapping fails
This should allow for more meaningful errors. Dereferencing NULL
is more useful information than dereferencing a random address
happened to be on the stack.
2014-04-16 19:49:56 +02:00
Sebastian Dröge dded0a4bb6 preset: Unref return value of gst_child_proxy_get_child_by_index() instead of leaking it 2014-04-16 17:49:40 +02:00
Sebastian Dröge 552864332b preset: Automatic code style fixes 2014-04-16 17:49:40 +02:00
Sebastian Dröge dabb959747 pad: Add missing space in debug output 2014-04-15 21:16:06 +02:00
Linus Svensson cb554772e5 pad: don't access unowned and possibly already freed event
Don't print the name of the event when ownership is given away.

https://bugzilla.gnome.org/show_bug.cgi?id=727484
2014-04-12 11:44:36 +01:00
Edward Hervey c7295cf4b9 gstbuffer: Fix range iteration
We want to iterate over items idx to idx + length

We use the len variable as the corrected number of memory to iterate
and then properly go over all items.

Fixes the issue where specifying any idx different from 0 had no effect

Spotted by clang static analyzer
2014-04-11 13:45:21 +02:00
Vincent Penquerc'h 876af7b343 structure: error out when trying to fixate a fraction near an invalid target 2014-04-10 09:47:59 +01:00
Sebastian Dröge 1492465b89 event: Update running time in QoS based on the pad offsets
https://bugzilla.gnome.org/show_bug.cgi?id=722697
2014-04-10 08:25:50 +02:00
Sebastian Dröge 42cbb7c7c7 pad: Apply pad offsets on all events, not just segment events 2014-04-10 08:25:50 +02:00
Sebastian Dröge d445027ec1 event: Add running-time-offset field to all events
Events passing through #GstPads that have a running time
offset set via gst_pad_set_offset() will get their offset
adjusted according to the pad's offset.

If the event contains any information that related to the
running time, this information will need to be updated
before usage with this offset.
2014-04-10 08:25:50 +02:00
Vincent Penquerc'h 3004cc5f45 utils: avoid dividing by zero when multiplying y/z by 0/x
The gcd of 0/x is 0, and this is then used as a denominator.
2014-04-09 16:41:47 +01:00
Sebastian Dröge 191ca95fd9 parse: Don't dist the bison and flex generated headers
https://bugzilla.gnome.org/show_bug.cgi?id=727253
2014-04-07 11:36:58 +02:00
Sebastian Rasmussen e1e5183181 debugutils: Handle caps field values being NULL
GST_DEBUG_BIN_TO_DOT_FILE() would cause a segfault whenever it encountered an
element's caps that had a field value being NULL. Such fields are successfully
handled e.g. by GST_*_OBJECT(), and with this patch so does
GST_DEBUG_BIN_TO_DOT_FILE(). Even if string fields with a NULL value are
not supposed to be valid in caps, such caps can be created.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727701
2014-04-06 14:24:21 +01:00
Edward Hervey 470f194909 gstvalue: Prevent division or modulo by zero
The step can end up being zero if the underlying value isn't a valid
range GValue.

In those cases, return FALSE.

We don't use g_return*_if_fail since it will already have been triggered
by the above-mentionned _get_step() functions.

Spotted by Coverity.
2014-04-05 11:37:53 +02:00
Haakon Sporsheim e3388c22c2 gstvalue: Fix comparison of int/int64 range
Checking step three times seems unnecessary.
A similar bug was fixed for double range in
commit 3ea6b04c10
2014-04-05 07:03:07 +02:00
Sebastian Dröge 04a204cd4c pad: Include event type in debug output when delaying a sticky event because of not-linked 2014-03-29 10:32:25 +01:00
Wim Taymans ee348fe7cb buffer: don't clear TAG on NULL buffer
When the buffer fails to copy, don't clear the TAG on the NULL pointer.
2014-03-24 16:11:30 +01:00
Wim Taymans 533548529b gst: init new flag types to pass make check 2014-03-21 12:16:54 +01:00
Edward Hervey fb9ca6f7b4 devicemonitor: Use local includes and use gst_private before anything
Should fix build issues on BSD
2014-03-17 10:00:00 +01:00