Commit graph

5429 commits

Author SHA1 Message Date
Tim-Philipp Müller
ee5b369ffd gstvalue: make new gst_value_list_merge() work properly
Fix freeing of partially-inited list value when both values
passed are equal and we want to return a single non-list
value as result. Fixes unit test. Also fix up docs a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=637776
2011-01-03 15:57:20 +00:00
Stefan Kost
373be6f14e tags: don't produce duplicated entries when merging same value twice
Add a variant of gst_value_list_concat() that skips duplicates and use that when
merging taglists.

API: gst_value_list_merge()
2011-01-02 22:35:08 +00:00
Tim-Philipp Müller
8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
Michael Smith
bdb6a9aeec Fix GStatBuf definition for win32 when building against older glib.
Now matches upstream glib definition.
2010-12-22 16:36:50 -08:00
Tim-Philipp Müller
0e3410c100 miniobject: add gobject-introspection annotation 2010-12-22 22:36:05 +00:00
Sebastian Dröge
c81db31bfa taglist: Don't leak copies of empty strings 2010-12-19 12:49:58 +01:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Edward Hervey
6c37015a29 gstdatetime: Fix documentation
second => seconds
microsecond argument was dropped
2010-12-17 15:48:34 +01:00
Stefan Kost
eb56687a6d info: use the publicly visible address to fix the tests
The -Bsymbolic change causes us to get a different address when internaly
looking up the function than what application would get when the use the symbol
that they see. This made removing the default loghandler to fail, as it is set
internally and removed externaly.
2010-12-15 23:19:54 +02:00
Edward Hervey
90fff577f0 Merge commit '0eaa25cbf5c0e4bf86545fb67c181a0ecd2f19c7' into 0.11 2010-12-08 17:51:10 +01:00
Stefan Kost
4ef9bf1019 registry: maintain the typefind extension list order 2010-12-08 11:53:10 +02:00
Stefan Kost
4054ea491e docs: add () to xref the function. 2010-12-08 11:53:10 +02:00
Tim-Philipp Müller
cc55b9772b utils: remove some dead code, GST_DEBUG_COLOR is never defined 2010-12-07 19:35:55 +00:00
Tim-Philipp Müller
7b0e3356eb utils: const-ify arguments to gst_object_default_error() 2010-12-07 19:35:24 +00:00
Tim-Philipp Müller
711f2d8abb docs: gst_error_get_message() returns string in UTF-8, not current locale
We tell gettext to return everything in UTF-8 encoding.
2010-12-07 19:34:46 +00:00
Tim-Philipp Müller
0eaa25cbf5 pad: register gst_pad_get_fixed_caps_func() with the debug log system 2010-12-07 18:37:04 +00:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans
b2ab72b916 pad: remove get_caps_reffed variants
Make the _get_caps functions behave like the _get_caps_reffed variants and
remove the _reffed variants. This means that _get_caps doesn't return a writable
caps anymore and an explicit _make_writable() is needed before modifying the
caps.
2010-12-07 18:14:38 +01:00
Wim Taymans
f558409fdc pad: Clean up .h file 2010-12-07 16:52:47 +01:00
Wim Taymans
ce0355e6d0 Merge branch 'master' into 0.11 2010-12-07 15:53:56 +01:00
Wim Taymans
920ef127ce element: rework GstElementDetails
Clean up the GstElement structure
Replace GstElementDetails with metadata
2010-12-07 15:33:04 +01:00
Wim Taymans
a0ed044de8 plugin: remove deprecated methods
Remove more deprecated methods and fix unit test.
2010-12-07 15:31:27 +01:00
Wim Taymans
7d24f18027 object: fix docs 2010-12-07 15:19:34 +01:00
Stefan Kost
6e97957b60 plugin: recommend "--gst-disable-registry-fork" as well
Disabling forking helps with debugging the cause of the crash in gdb.
2010-12-07 12:59:16 +02:00
Wim Taymans
99efec3636 object: Removed deprecated fields and methods
Make GstObject extend from GInitiallyUnowned, remove the FLOATING flag and use
GObject methods for managing the floating ref.
Remove class lock, it was a workaround for a glib < 2.8 bug.
Remove the parent-set and parent-unset signals, attempt to implement with notify
but disabled because deadlocks in deep-notify.
2010-12-07 11:58:34 +01:00
Wim Taymans
993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01:00
Wim Taymans
99775e5271 more 0.10 -> 0.11 2010-12-06 13:21:45 +01:00
Wim Taymans
8bf6b0c3fe poll: return wakeup event in GPollFD 2010-12-06 11:20:35 +01:00
Mark Nauwelaerts
58868d4218 pad: add some debug to fast push path
... so we don't loose track at times it is needed the most.
2010-12-06 11:07:38 +01:00
Edward Hervey
c044024e2c gstbin: Make element names clearer in debug statements
Replaces confusing messages like:
 "Name name is not unique in bin bin, not adding"
by
 "Name 'name' is not unique in bin 'bin', not adding"
2010-12-05 14:15:02 +01:00
David Schleef
5cdcdaee07 registry: Fix permissions if umask is broken
Fixes: #564056.
2010-12-04 21:08:21 -08:00
David Schleef
66d2781877 Use g_snprintf() instead of snprintf() 2010-12-03 11:29:30 -08:00
Wim Taymans
bf979b0036 clock: init variables in _reinit()
Properly initialize variables in _reinit() too
2010-12-03 16:11:05 +01:00
Wim Taymans
ba7157dce6 clock: make sync clock wait lockfree
Make the common case lockfree.
2010-12-03 16:11:04 +01:00
Tim-Philipp Müller
f4e57cee5d binaryregistry: use function introduced in GLib 2.22 unconditionally 2010-12-03 14:55:50 +00:00
Wim Taymans
77830123cf poll: small cleanups 2010-12-03 15:50:38 +01:00
Wim Taymans
9bf56084cf poll: make sure we remove the readfd messages 2010-12-03 15:50:38 +01:00
Wim Taymans
35d10af06d poll: add method to get a GPollFD 2010-12-03 15:50:38 +01:00
Wim Taymans
22fa4470e2 poll: Refactor and make more lockfree
Refactor the wakeup of the poll thread.
Always make a control socket to make things easier.
Make more methods lockfree.
2010-12-03 15:50:38 +01:00
Wim Taymans
e266d4d397 poll: move lock to where it makes more sense 2010-12-03 15:50:38 +01:00
Wim Taymans
73ee14302f poll: make timer polls lockfree
Make sure we don't take a mutex in the normal code path of the timer
poll.
2010-12-03 15:50:38 +01:00
Mark Nauwelaerts
efe3c70450 caps: fix doc typo 2010-12-03 13:35:38 +01:00
Stefan Kost
bd82021e86 gstobject: add stdio.h for snprint 2010-12-03 13:52:42 +02:00
Edward Hervey
fc7967a0b5 pipeline: Use an object as first argument to GST_WARNING_OBJECT 2010-12-03 12:03:43 +01:00
Edward Hervey
6aa8ca37ee micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers 2010-12-03 12:03:42 +01:00
Edward Hervey
5519b1fcb1 gstquery: Use structure property directly, avoid function variable.
All functions in this file can access the structure field of a query directly.
This avoids having to call gst_query_get_structure() to get it, along with being
able to remove some function variables that were used to store the result of that
function.
2010-12-03 11:33:37 +01:00
Edward Hervey
3a9396d259 gstinfo: remove useless ternary operator usage. 2010-12-03 11:33:37 +01:00
Edward Hervey
6b002234cd gstevent: Use structure property directly, avoid function variable.
All functions in this file can access the structure field of an event directly.
This avoids having to call gst_query_get_structure() to get it, along with being
able to remove some function variables that were used to store the result of that
function.
2010-12-03 11:33:37 +01:00
Wim Taymans
cec2a42808 pad: add push cache to bufferlists
Add the push cahce for the bufferlist push code path as well.
2010-12-03 11:28:52 +01:00
Wim Taymans
59bc71c47a pad: don't cache the peer chainfunc
There is no need to cache the peer chainfunction as we can just as efficiently
get to it from the peer object. Also not caching the chain function works better
because then we automatically get the new chainfunctions when they change.
2010-12-03 11:28:52 +01:00
Wim Taymans
d3630379da pad: clear pad cache when installing probes
Move the method to clear the pad cache into _private.h
Clear the pad cache when installing pad probes.
2010-12-03 11:28:52 +01:00
Wim Taymans
2239038d76 pad: explicitly inline some functions 2010-12-03 11:28:52 +01:00
Wim Taymans
67d7c543b3 pad: remove unused variable 2010-12-03 11:28:52 +01:00
Wim Taymans
5e37ade932 pad: invalidate caches on flush and pad block 2010-12-03 11:28:52 +01:00
Wim Taymans
8abc14052a pad: don't unref NULL caps 2010-12-03 11:28:52 +01:00
Wim Taymans
14542a0d46 pad: add invalidate function
More small optimisations, remove the unneeded valid boolean.
Add function to invalide the cache.
Invalidate the cache on unlink.
2010-12-03 11:28:52 +01:00
Wim Taymans
1c79181afd pad: small cleanup 2010-12-03 11:28:52 +01:00
Wim Taymans
b83e66be46 pad: improve pad push caching
Build the cache while we push data. When we don't have a cache, we run the
slowpath and collect cacheable properties. When all conditions are met, keep the
cached data around so that we can more efficiently push data around.
2010-12-03 11:28:52 +01:00
Wim Taymans
d59b7f81b7 pad: prototype of pad push cache
Prototype of how we can cache the peer and caps for a pad link.
2010-12-03 11:28:52 +01:00
Wim Taymans
1e1872137d task: avoid task lock for each iteration
Make the task state an atomic variable so that we can avoid taking and releasing
the task lock for each iteration.
2010-12-03 11:21:03 +01:00
Stefan Kost
898583b2a0 docs: query doc improvements
More xrefs. Mentioned that some queries need a running pipeline.
2010-12-03 09:50:32 +02:00
Stefan Kost
a4c5448eee elementfactory: clarify list item types in comments 2010-12-03 09:50:31 +02:00
Stefan Kost
d4e2107987 padtemplate: add two FIXME0.11: comments 2010-12-03 09:50:31 +02:00
Stefan Kost
f9039c2204 padtemplate: allow disablinbg the template name conformance checks 2010-12-03 09:50:31 +02:00
Stefan Kost
20c173bada padtemplate: the supplied caps may not be NULL
There is a earlier g_return_val_if_fail check. Also
gst_static_pad_template_get does not have such a check.
2010-12-03 09:50:31 +02:00
Stefan Kost
1c50dcd54f gstobject: more default name generation more efficient
Save ~2000 malloc/memcpy/free pairs at startup by running to_lower in-place.
Also skip the numbers as we can.
2010-12-03 09:50:31 +02:00
Stefan Kost
aa440a1e24 pluginfeature: use the parent_class from G_DEFINE_TYPE macro and drop extra copy 2010-12-03 09:50:31 +02:00
Stefan Kost
ffa8f100ce elementfactory: use g_intern_string for interface names 2010-12-03 09:50:31 +02:00
Stefan Kost
d370a2437a registry: also intern the static caps 2010-12-03 09:42:44 +02:00
Stefan Kost
2d17d86ba8 elementfactory: meta-data can be NULL 2010-12-03 00:00:09 +02:00
Thiago Santos
2f94ad3d6c gstdatetime: Fix handling of timezones
Fix returning of timezones on systems with gdatetime
to use floats on the math expression to avoid
truncating the fractional part.

Also adds a test for covering this case.
2010-12-02 16:28:43 -03:00
Wim Taymans
a0cb088284 utils: return immediately for -1 conversion
When we are asked to convert -1, we can return immediately with a -1 return
value.
2010-12-02 19:10:45 +01:00
Wim Taymans
e84d563033 utils: a convert query can have a -1 input value
It is allowed to pass -1 to the src_val for a convert.
2010-12-02 19:10:45 +01:00
Wim Taymans
7590cee744 pipeline: avoid using invalid clock times
Be extra careful to not use invalid clock times but give a warning instead. This
should make things work better with faulty clock implementations.
2010-12-02 19:10:44 +01:00
Wim Taymans
d36903c1c2 caps: improve some comments about the zigzag intersection 2010-12-02 19:10:44 +01:00
Edward Hervey
b4285611ad gstclock: New API to re-use a single shot GstClockID
API: gst_clock_single_shot_id_reinit

https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Wim Taymans
8412c2a656 segment: move g_return_if_fail to where it is needed 2010-12-02 19:03:35 +01:00
Sebastian Dröge
0ff0e6a434 version: Take nano version into account in GST_CHECK_VERSION()
If the nano is > 0 the current version should be handled the same as
micro + 1.
2010-12-02 19:02:08 +01:00
Sebastian Dröge
f2f7842f6b pad: Set the event source object if none is set yet in gst_pad_push_event()
Otherwise the source will stay at NULL, the event is passed to the
peerpad via gst_pad_send_event() and then the peerpad is set as
source of the event instead of the originating pad.
2010-12-02 19:02:08 +01:00
David Hoyt
7199a4f1ff gsttask: Set thread names on Windows with MSVC if a debugger is attached
Fixes bug #632168.
2010-12-02 19:02:08 +01:00
Sebastian Dröge
a797b9f22b macros: Define restrict keyword if not available
This change always defines the restrict keyword if a
non-C99 C compiler is used. In the case of GCC >= 4
it will be defined to __restrict__, in all other
cases to nothing. This allows to use the restrict
keyword unconditionally.
2010-12-02 19:02:07 +01:00
Tim-Philipp Müller
5cac987148 utils: avoid 'unused argument' warnings caused by GST_BOILERPLATE_FULL
The unused data parameter in the class_init trampoline function
seems to cause warnings with some c++ compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=635869
2010-11-29 12:29:10 +00:00
Evan Nemerson
4906671694 introspection: Include exported packages information in GIRs
https://bugzilla.gnome.org/show_bug.cgi?id=635389
2010-11-21 00:36:30 +00:00
Tim-Philipp Müller
b84621e0d0 elementfactory: fix caps leak in element factory list utility functions 2010-11-18 00:29:19 +00:00
Thiago Santos
1b27e1e792 datetime: Add _from_unix_epoch variants
Adds 2 variants for the gst_date_time_from_unix_epoch function,
one for UTC and another for local time.

API: gst_date_time_new_from_unix_epoch_utc
API: gst_date_time_new_from_unix_epoch_local_time

Fixes #653031

https://bugzilla.gnome.org/show_bug.cgi?id=635031
2010-11-17 09:58:32 -03:00
Vladimir Eremeev
b804d53320 math-compat: don't re-define _USE_MATH_DEFINES if already defined
This avoids compiler warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=633886
2010-11-03 14:21:02 +00:00
Edward Hervey
726e4479b7 elementfactory: Fix 64bit constant
Basically we're not meant to put anything more complex than simple numbers,
due to the definition of G_GUINT64_CONSTANT:
G_GUINT64_CONSTANT(val)	(val##UL)

Which previously resulted in .... 1 << 49UL
2010-10-22 11:52:47 +02:00
Tim-Philipp Müller
5b25761f29 docs: add some gtk-doc Since: markers
Add some gtk-doc Since: markers, fix one Since: marker,
fix typo.
2010-10-16 16:53:49 +01:00
Thiago Santos
e9312870e5 datetime: Use seconds as double
Use seconds as double to make API similar to glib's
gdatetime. Also move timezone parameter to the
first position, just like glib's.

https://bugzilla.gnome.org/show_bug.cgi?id=628408
2010-10-13 11:48:57 -03:00
Thiago Santos
0d3c623b4b gstdatetime: Move doc outside the ifdefs
Move the datetime documentation of the functions outside the
ifdefs

https://bugzilla.gnome.org/show_bug.cgi?id=628408
2010-10-13 11:28:52 -03:00
Thiago Santos
c7e5bc1e5d datetime: Use GDateTime if available
Use GDateTime internally on GstDateTime if glib already
provides it.

https://bugzilla.gnome.org/show_bug.cgi?id=628408
2010-10-13 11:28:52 -03:00
Thiago Santos
6d883ed95c glib-private: Add include protection macro 2010-10-13 11:28:38 -03:00
Tim-Philipp Müller
59209b1891 buffer: add guard to buffer_set_caps() that checks if caps are simple 2010-10-13 14:54:23 +01:00
Stefan Kost
a09bd97bc6 systemclock: add a missing G_PARAM_STATIC_STRINGS 2010-10-13 15:59:16 +03:00
Tim-Philipp Müller
0dbb0f203e miniobject: avoid duplicate type check when freeing miniobject
gst_mini_object_unref() has guards that check the type already, so
we don't really need to re-check it here again while getting the
class (there's not really much point to that anyway, since we don't
check the return value of the get_class, so we'd crash anyway if
we're not dealing with a mini object, the only question would
be if there'd be a warning before the crash or not).
2010-10-11 19:55:52 +01:00
Edward Hervey
2c4afb966d miniobject: Directly increate mini_object in mini_object_free()
Speeds up mini_object_unref by 25% by avoiding the typecheck which
is avoidable here since it is only called on existing miniobjects.
2010-10-11 18:55:14 +02:00
Edward Hervey
89d3da6cba miniobject: Remove confusing DEBUG_REFCOUNT define
the debugging statements will be silenced automatically if debugging
is disabled, and the type check is actually required.
2010-10-11 18:41:14 +02:00
Wim Taymans
839114b05d bin: fix documentation for iterate_sources 2010-10-11 15:53:11 +02:00
Sebastian Dröge
87d02b7b32 bin: Initialize variable 2010-10-11 14:20:15 +02:00
Wim Taymans
27c6aba33c bin: Improve tracking of source elements
Track elements tagged with the IS_SOURCE flag in a similar way we track the sink
elements. This allows us to efficiently dispatch downstream events to the right
elements.
2010-10-11 11:16:27 +02:00
Wim Taymans
eed98f6c2c element: add IS_SOURCE flag
Add the GST_ELEMENT_IS_SOURCE flag so that we can tag source elements like we
can with sink elements.
2010-10-11 11:16:27 +02:00
Vincent Penquerc'h
0bb4fafd30 registry: g_mapped_file_unref exists already since GLib 2.21.3 2010-10-10 18:30:58 +02:00
Tim-Philipp Müller
fd6334cb7c pads: use new g_object_notify_by_pspec() for caps notifies if available
If we're building against GLib >= 2.26.0, we can use the more efficient
g_object_notify_by_caps(), which avoids the param spec lookup.
2010-10-07 19:03:42 +01:00
Tim-Philipp Müller
ca607d99b2 clock: remove unnecessary g_object_notify() call
GObject will do that for us when g_object_set*() is called.
2010-10-07 19:03:42 +01:00
Tim-Philipp Müller
05918f28dc gstinfo: remove random MSVC compatibility define for M_PI that doesn't belong here
Code that needs this should include gst/math-compat.h or use G_PI.
2010-10-05 18:31:58 +01:00
Tim-Philipp Müller
2797f74c84 gst: add math-compat.h header
Add minimal math-compath.h header where we can define fallback
versions for miscellaneous math functions that aren't always
available, so we don't have to duplicate this in plugins.
The header is not included by default, so needs to be
included explicitly for now.

https://bugzilla.gnome.org/show_bug.cgi?id=630802
2010-10-05 18:31:29 +01:00
Thiago Santos
dd53349ad2 gstdatetime: Fix string serialization
Correctly serialize tzoffset as a gstvalue
2010-09-27 20:41:52 -03:00
Trond Andersen
a95eacb56a clock: fix racy shutdown clock id leak
Clock IDs were leaked if the clock got disposed before the worker thread
got a chance to reap unscheduled entries.

Fixes bug #630439.
2010-09-23 21:54:01 +02:00
Thiago Santos
7e1d9c8c0d tag: Adds GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR
Adds a new tag to indicate the error in horizontal positioning
in meters. This is one of the available 'gps error' fields in
exif, for example.

API: GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR
2010-09-23 10:37:06 -03:00
Stefan Kost
5550136fb2 Revert "pad: use a nested lock to avoid reffing the peer"
This reverts commit 9b424b1570.
2010-09-23 15:34:54 +03:00
Stefan Kost
9b424b1570 pad: use a nested lock to avoid reffing the peer
Fixes #503592
2010-09-22 10:22:40 +03:00
Wim Taymans
0447e72c97 bufferlist: add function to add a list of buffers
Add a function to add a list of buffers to the bufferlist.
2010-09-17 17:35:45 +02:00
Tim-Philipp Müller
80ddde400a elementfactory: make sure gstreamer has been initialized when creating elements
Add gst_is_initialized() guard to gst_element_factory_make(), so
people who forgot to call gst_init() get a useful warning for what
seems to be a common enough mistake.
2010-09-16 19:40:15 +01:00
Tim-Philipp Müller
34abe02458 query: minor gst_query_add_buffering_range() code reflow
Sprinkle some G_UNLIKELY(), return TRUE/FALSE constants, avoid an
unnecessary g_value_unset(), move g_value_init()+set_int64_range()
closer to where they're needed.
2010-09-16 19:40:15 +01:00
Tim-Philipp Müller
58e5d5e5b9 query: gst_query_add_buffering_range() optimisations
Don't create a new GValueArray copy for every single _add_buffering_range()
call, but append to the existing value array owned by the structure instead.
2010-09-16 19:40:15 +01:00
Tim-Philipp Müller
608628d10d structure: micro-optimisation for some setter functions
Split out functions that do the actual work, so we avoid doing
the same g_return_if_fail() checks multiple times for each call.
2010-09-16 19:40:15 +01:00
Tim-Philipp Müller
7e5a9580ef structure: add gst_structure_{id_}take_value()
Add _set_value() variants that take ownership of the value passed
instead of making a copy of the value. This is useful for setting
values to things that aren't refcounted (e.g. GValueArrays or
strings or string arrays, etc.).

API: gst_structure_take_value()
API: gst_structure_id_take_value()

https://bugzilla.gnome.org/show_bug.cgi?id=629831
2010-09-16 19:39:58 +01:00
Wim Taymans
e6a291bfab bin: fix doc string, we post element messages 2010-09-16 19:19:21 +02:00
Wim Taymans
a9a82da134 bin: add message-forward option
Add an option to forward all the internal messages that would otherwise be
filtered such as EOS, SEGMENT and ASYNC messages.
This allows the application to, for example, detect that a partial pipeline is
prerolled or reached eos.
The original messages are wrapped inside an element message because the parent
bins are not supposed to see those internal messages escape.
2010-09-16 19:17:53 +02:00
Tim-Philipp Müller
30fe3b2be9 plugin: use strstr() instead of g_strstr_len()
Saves us a strlen() call.
2010-09-16 10:48:10 +01:00
Thiago Santos
60fba4df8b gstpad: Fix flush-stop event handling
A flush-stop event would make a pad unflushing, causing it
to start acting as an activated pad. This, for example,
could lead to the chain function being called when stuff
isn't initialized.

This could happend when setting qtdemux to NULL while a seek
was being handled in the upstream filesrc (in push mode).

This patch makes it check if it is activated before setting
it to unflushing.
2010-09-13 20:52:03 -03:00
Stefan Kost
8ef7e46d24 docs: fix warnings pointed out by gtk-doc 2010-09-13 11:18:25 +03:00
Stefan Kost
ef5a78e71f taskpool: make debug only code conditional 2010-09-13 11:18:24 +03:00
Colin Walters
cfadd1d937 introspection: Build with latest g-i
Hide a compatibility typedef.

https://bugzilla.gnome.org/show_bug.cgi?id=629241
https://bugzilla.gnome.org/show_bug.cgi?id=550616
2010-09-12 15:13:32 +01:00
Stefan Kost
efef6e2248 pluginloader: don't leak entries for blacklisted files 2010-09-09 22:24:38 +03:00
Edward Hervey
06738c15b7 gstobject: avoid string creation when not needed 2010-09-09 18:40:08 +02:00
Tim-Philipp Müller
bf2bdba6b3 caps: simplify code a bit
No need to call g_slist_length() here.
2010-09-08 18:51:09 +01:00
Stefan Kost
770694f0f1 pad: add a unchecked variant for pull
Add internal _get_range_unchecked thats is called from _get_range and
_pull_range.
2010-09-08 10:25:55 +03:00
Tim-Philipp Müller
3ce55e6551 gsterror: add default error message for GST_LIBRARY_ERROR_ENCODE
No idea though why we even have GST_LIBRARY_ERROR_ENCODE or when one
would want to use that instead of GST_STREAM_ERROR_ENCODE.
2010-09-06 20:26:28 +01:00
Tim-Philipp Müller
490d2f0ab5 gsterror: avoid pointless string copying
There's no need to create these tables with duplicates of the
untranslated error message string constants, we can just use
old-fashioned switch/case and call gettext directly. This also
makes things slightly more thread safe and more robust to bad
input (invalid error codes).
2010-09-06 20:26:14 +01:00
Stefan Kost
dd5e14f983 docs: give a practical example for the gst_object_has_anchestor 2010-09-06 17:02:45 +03:00
Stefan Kost
cc0171d5cd elementfactory: use the parent_class defined by G_DEFINE_TYPE 2010-09-06 14:35:26 +03:00
Olivier Crête
c5888dc6cf registrychunks: Use the correct variable for debug message
Debug print was using a variable that was not initialized.
2010-09-06 14:11:27 +03:00
Stefan Kost
65356fbb7a element-details: allow for arbitrary element details
Add a GstStructure to GstElementClass and GstElementFactory. Add setters/getter.
Handle it in the registry code. Print items in gst-inspect.
Fixes #396774.

API: gst_element_class_set_meta_data(), gst_element_factory_get_meta_data_detail()
2010-09-06 12:31:04 +03:00
Sebastian Dröge
36e1ad94e1 gstquery: Only fill the start/stop values of the buffering ranges if a non-NULL pointer was provided 2010-09-03 19:58:49 +02:00
Philippe Normand
9ef1c47079 gstquery: new buffering_ranges API
Added a new query type to retrieve informations about the areas of the
media currently buffered. See bug 623121.

API: gst_query_add_buffering_range
API: gst_query_get_n_buffering_ranges
API: gst_query_parse_nth_buffering_range
2010-09-03 19:55:25 +02:00
Edward Hervey
17f9254264 GstElementFactory: Add listing features
https://bugzilla.gnome.org/show_bug.cgi?id=626181
2010-09-03 19:31:12 +02:00
Jeffrey S. Smith
4375e998ee Fix casts in a bunch of inline functions to maintain correct const-ness
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.

https://bugzilla.gnome.org/show_bug.cgi?id=627910
2010-09-02 00:09:08 +01:00
Philippe Normand
b2e6379be8 gstvalue: Add new GstInt64Range type
new GstInt64Range to store gint64 ranges.

API: GST_TYPE_INT64_RANGE
API: gst_value_set_int64_range
API: gst_value_get_int64_range_min
API: gst_value_get_int64_range_max

Fixes bug #627826.
2010-09-01 11:07:37 +02:00
Arun Raghavan
00a0f4fd0b docs: Trivial cleanup for GST_DEBUG_CATEGORY_GET 2010-08-30 21:27:28 -03:00
Edward Hervey
b0b8fb9b31 info: Re-instate the default for color usage
This was accidently removed in 7a722091b6
2010-08-30 16:03:38 +02:00
Sebastian Dröge
c857047be7 utils: Fix inverted assertion logic in gst_util_fraction_compare() 2010-08-28 09:35:01 +02:00
Sebastian Dröge
8ca48752fb utils: Add gst_util_fraction_compare() to compare fractions
And use it for the fraction comparisons in gstvalue.c instead
of using comparisons by first converting the fractions to double.
Should fix bug #628174.

API: gst_util_fraction_compare()
2010-08-28 09:31:59 +02:00
Sebastian Dröge
d7f59ca0c4 pad: Deprecate GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS()
The problem with both macros is, that they suggest something that isn't true.
If GST_FLOW_IS_FATAL is true, there could still be a problem for many elements
and they should stop what they're currently doing and return that value
upstream (e.g. not-linked in a parser). If GST_FLOW_IS_SUCCESS is false, it
could still be that this is "ok" for the element (e.g. not-linked for a demuxer
on a few of its pads but not all).

It's better to not have these "convenience" macros but instead let people
*think* about the handling of different flow returns, that makes sense for
their element. And we should document the expected handling of flow returns for
different classes of elements in the plugin writer's guide.

Fixes bug #628014.
2010-08-27 16:59:08 +02:00
Alessandro Decina
94a314eaee gstplugin: load the gst-python plugin loader with G_MODULE_BIND_LAZY. 2010-08-26 14:32:40 +02:00
Thiago Santos
0bd40a4397 tag: Adds GST_TAG_APPLICATION_DATA
Adds GST_TAG_APPLICATION_DATA for representing arbitrary private
data that applications might want to store into tags. Exif/id3,
for example, have tags for this.

API: GST_TAG_APPLICATION_DATA

Fixes #626651
2010-08-24 21:10:33 -03:00
David Schleef
3ef2688658 Valgrind define is HAVE_VALGRIND_VALGRIND_H 2010-08-23 18:21:25 -07:00
David Schleef
7a722091b6 Allow gst_debug_set_default_threshold() before gst_init()
Calling gst_debug_set_default_threshold() before initialization
seems like the "obvious" order.
2010-08-23 18:21:25 -07:00
Mark Nauwelaerts
c485918405 registrychunks: intern all GstPluginDesc members when unpacking 2010-08-23 10:59:50 +02:00
Mark Nauwelaerts
ad85386a57 gstobject: fix leak when naming parented object 2010-08-23 10:59:45 +02:00