Commit graph

4774 commits

Author SHA1 Message Date
Kipp Cannon
9cfd9f9374 gstutils: API: Add rounding to nearest and next integer versions of the 64 bit integer scaling functions
The new functions are
gst_util_uint64_scale_int_round()
gst_util_uint64_scale_int_ceil()
gst_util_uint64_scale_round()
gst_util_uint64_scale_ceil()

Fixes bug #590919.
2009-08-13 16:32:28 +02:00
Kipp Cannon
61481c1b79 gstutils: Revert parts of last change to optimize the scaling functions again
Partially fixes bug #590919.
2009-08-13 16:32:28 +02:00
Sebastian Dröge
6a84be95be gstutils: Fix violations of strict-aliasing rules in gst_util_uint64_scale() 2009-08-13 16:32:27 +02:00
Kipp Cannon
3d359729af gstutils: Refactor gst_util_uint64_scale()
This will later make it possible to provide rounding versions
of it without much code duplication.

Partially fixes bug #590919.
2009-08-13 16:32:27 +02:00
Jonas Holmberg
824a0b5f5f bufferlist: update doc string 2009-08-11 15:21:33 +02:00
Sebastian Dröge
276a55fd24 gstsegment: Actually start==stop==segment_start is inside the segment
Still the old code was wrong as it claimed that start==stop<segment_start
would be inside the segment and returned insane clipping differences.
2009-08-11 13:21:35 +02:00
Sebastian Dröge
ca8a0376c5 gstsegment: Clipping should detect start=stop<segment_start as outside the segment
Before it returned that [start,stop] is inside the segment and that the
difference between segment_start and start needs to be clipped. If the
clipping is done on a buffer (like in baseaudiosink) this will result
in the data pointer being at a invalid memory position.

Fixes bug #589849.
2009-08-11 12:59:13 +02:00
Edward Hervey
51bc185f7f gst: Remove dead assignments 2009-08-08 14:47:40 +02:00
Wim Taymans
aa33db85cc gstbuffer: add additional checking for writability
Check for metadata writability when setting caps on buffer or when copying
metadata flags. Only enable these extra assertions in git versions.
This should help us find bad elements.
2009-08-06 18:47:32 +02:00
Tim-Philipp Müller
459c2b9c79 docs: fix Since: tag for new gst_caps_can_intersect() function 2009-08-06 14:11:46 +01:00
Stefan Kost
50fbc34f3f utils: use new _caps_can_intersect() 2009-08-06 15:30:34 +03:00
Stefan Kost
aee208ff30 pad: use new _caps_can_intersect() 2009-08-06 15:30:33 +03:00
Stefan Kost
568202cb47 caps: add gst_caps_can_intersect()
Often we don't need the result of the intersection. Add a variant that only
tries to intersect. It can break out earlier and does less GValue copying.
API: gst_caps_can_intersect()
2009-08-06 15:30:33 +03:00
Stefan Kost
baaf7e5319 caps: split callback for structure intersect into two functions
We call this separately. there is no much benefit in reusing the callback.
Splitting is let us remove a branch also.
2009-08-06 15:30:33 +03:00
Stefan Kost
f5314ecae1 logging: log if we copy caps to be able to track it 2009-08-06 15:30:33 +03:00
Stefan Kost
24517c8975 caps: add comments about g_ptr_array size behaviour
Just explain the behaviour to avoid that someone else is wasting time trying to
improve this too.
2009-08-06 15:30:33 +03:00
Stefan Kost
12f9b39fac pad: use correct variable in test 2009-08-06 15:30:32 +03:00
Stefan Kost
e4ee7831e3 registry: add filename to debug message, like elsewhere 2009-08-06 15:30:32 +03:00
Stefan Kost
b01fb4d230 bin: fix compiler warning about unused var when disabling debug logging 2009-08-06 15:13:36 +03:00
Wim Taymans
950c70c8bb caps: add some more debugging in _replace 2009-08-06 10:52:12 +02:00
Wim Taymans
4146fa2eed pad: Add some more debugging 2009-08-06 10:52:05 +02:00
Wim Taymans
3b26e0c600 ghostpad: small improvements
Unref the target pad after we used it for debugging.
Add some more debug.
Only replace caps when they changed.
2009-08-06 10:51:54 +02:00
John Millikin
3e538b71fb taglist: Add support for ALBUM_ARTIST tag
The "album artist" tag is used when the artist of an entire
album differs from the artist of an individual track; for example,
when a "guest artist" appears on an album, or on compilations.

Fixes bug #590430.
2009-08-06 06:41:58 +02:00
Stefan Kost
1a44bd93d6 gstregistrybinary: add +1 after error checking
The current code made the error checking pointless by changing -1 to 0 in error
cases. Also don't leak a pad template on error.
2009-07-20 20:59:29 +03:00
Wim Taymans
a78199ae5e task: fix taskpool leak
GstTaks does not always unref the taskpool it was created from because it
depends on when the pool provided an ID for joining the task.
Rework some code so that we always unref the pool and optionally join when the
pool provided an id.

Fixes #589127
2009-07-20 18:02:53 +02:00
Stefan Kost
de1e991dec binaryregistry: don't unref NULL if we have an early read error 2009-07-20 11:06:22 +03:00
Tim-Philipp Müller
9459a93cb4 tags: only emit a g_warning() for empty tag strings for git versions
For now, don't show a g_warning() for empty tag strings and NULL
tags with non-git versions; we should wait for the fixes in our
plugin modules to make it into a release before we enable this
unconditionally.
2009-07-16 13:59:07 +01:00
Stefan Kost
f18bee2d8a value: add explanation for shortcut 2009-07-14 12:15:05 +03:00
Stefan Kost
c686053aac value: fix can_intersect to behave like intersect
Add a quick return if two types are the same. Change the check for the
intersection function to be the same as the one used in intersect(). The
later tries both directions.
2009-07-14 08:32:23 +02:00
Tim-Philipp Müller
6049559201 gstinfo: maintain ABI compatibility even if debugging is disabled 2009-07-14 00:04:22 +01:00
Jan Schmidt
7bf3554228 structure: Change NULL and empty string handling
Don't forbid the empty string "" in generic structures, only in taglists.
Properly allow the NULL string by adding special cases for serialising
and deserialising it. prop1=(string)NULL is the NULL string,
prop1=(string)"NULL" is the actual string with the value "NULL"
2009-07-13 18:28:37 +01:00
Sebastian Dröge
5f6bfb816b registry: Use g_build_filename() instead of g_strjoin() with /
This makes sure that the generated filenames use the platform
specific directory separator instead of /.

Fixes bug #587973.
2009-07-08 15:12:07 +02:00
Tim-Philipp Müller
6b2986194b docs: add 'Since' tag for new GST_DEBUG_CATEGORY_GET macro 2009-07-07 20:13:48 +01:00
Stefan Kost
2cb16ad7aa info: allow getting other log categories. Fixes #587417
Add a new macro GST_DEBUG_CATEGORY_GET to get a log category by name. This
allows plugins to use e.g. core categories like PERFORMANCE or CLOCK.
API: GST_DEBUG_CATEGORY_GET
2009-07-06 19:54:30 +01:00
Stefan Kost
4ef0264e66 logging: log object type in message 2009-07-06 19:52:44 +01:00
Tim-Philipp Müller
4d76b175ef docs: fix gtk-doc /*< private >*/ marker 2009-07-02 01:18:57 +01:00
Wim Taymans
30bc0361f1 message: fix parsing of the step done message
Parse the duration field too.
2009-06-30 18:23:29 +02:00
Edward Hervey
b50ba09164 binaryregistry: Use local values in while/for loops, use branch prediction macros 2009-06-30 16:30:07 +02:00
Edward Hervey
3c21f2d86c Spread branch prediction macros.
These are based on profiling several playback scenarios using playbin2.
2009-06-30 16:29:58 +02:00
Edward Hervey
923913984e Use local variables in for/while loops.
This makes the generated code faster since:
* It won't have to read an undirect value (which will most likely be
 outside of the L1/L2 cache)
* We know that value never changes (the compiler has no clue that it doesn't).
2009-06-30 16:29:50 +02:00
Wim Taymans
92b0f32d74 bufferlist: use faster gst_buffer_list_get()
Use the faster gst_buffer_list_get() to get the first buffer of a list.
2009-06-29 11:56:10 +02:00
Wim Taymans
939f6045b1 bufferlist: fix example
The _do function now takes user_data in all cases.
2009-06-29 11:55:14 +02:00
Jonas Holmberg
0e66315f2d docs: fix some typos 2009-06-29 11:07:40 +02:00
Stefan Kost
3e21ddf81f logging: add a performace log category
This category can be used to log slow code path and help auditing the
performance. Add FIXME-0.11 to some questionable categories.
2009-06-29 11:28:01 +03:00
Stefan Kost
dc9ca2e39c structure: fix int->gint to be in sync with the *.h and usage 2009-06-27 16:37:07 +03:00
Stefan Kost
fdcde50cb0 request-pad: tell about ref counts in release_request_pad docs.
It is not too obvious that getting and releasing request pads is not entierly
symetrical regarding to the pad refcount. Add a note about that to the docs.
This might deserve a FIXME-0.11 too.
2009-06-26 12:50:53 +03:00
Wim Taymans
5602b935de caps: avoid doing logic in g_assert
Make sure we still do the right thing when glib is compiled without
assertions.
2009-06-24 18:31:08 +02:00
Edward Hervey
0fc8410433 GstStructure: Use direct values for repetitive conditionals (for/while). 2009-06-24 11:00:27 +02:00
Edward Hervey
43dba6cefc miniobjects: Don't chain up to empty finalize method.
If ever we do anything in mini_object_finalize, we should make sure the 4
core miniobject finalize methods chain back up again.
2009-06-24 11:00:27 +02:00
Edward Hervey
5d819beffb gstcaps: Use direct values for repetitive conditionals (for/while). 2009-06-24 11:00:27 +02:00
Tim-Philipp Müller
d628988e0a make check: add check for enum type class unrefs in gst_deinit() too
Just because we can really.
2009-06-24 09:28:01 +01:00
Wim Taymans
3afa91d7aa trace: use proper locking in GstTrace
Protect the allocated list of objects with a lock so that trace actually works
reliably.
Shortcut the alloc trace sooner when disabled.
2009-06-23 13:46:28 +02:00
Wim Taymans
9993022fc4 object: also add pointers to debug
Add the object pointers in the debug info for _replace.
2009-06-23 13:46:27 +02:00
Stefan Kost
4bf3d4450a taglist: fix typo in tag description 2009-06-22 18:17:28 +03:00
Jan Schmidt
c2e980f827 init: Fix indent, and ref the gst_buffer_list_item_get_type() class
Fix the check tests by reffing the GstBufferList class. Run gst-indent
to make git happy about some existing stuff
2009-06-21 00:09:53 +01:00
Wim Taymans
570ec39b1c bufferlist: remove old enum from docs 2009-06-19 19:25:59 +02:00
Tim-Philipp Müller
720bd6d932 gstinfo: define __gst_debug_min to LOG_LEVEL_NONE if debugging is disabled
Just in case someone who clearly can't be deterred by any number of leading
underscores uses this very private but still somewhat documented symbol
directly in their code (*cough* qtdemux *cough*).
2009-06-19 15:03:52 +01:00
Wim Taymans
6438f6f9b9 bufferlist: Various cleanups
Add new method to iterate a bufferlist without having to allocate an iterator.
Add convenience method for getting an item from the list based on the group and
index.
Remove redundant _do_data callback and method.
Update unit-tests and add some more for the new methods.
2009-06-19 15:31:53 +02:00
Tim-Philipp Müller
17f794deeb docs: make gtk-doc happy 2009-06-19 14:10:30 +01:00
Tim-Philipp Müller
f3a358158a taskpool: fix unused variable warning in case debugging is disabled 2009-06-19 13:42:45 +01:00
Tim-Philipp Müller
4fdf54f1c5 gstinfo: fix export of GST_CAT_BUFFER_LIST when --gst-disable-debug is used
Move all the categories to export to one single place, so we don't
accidentally update or add vars in one place but not the other.
2009-06-19 13:40:13 +01:00
Josep Torra
bf2c345667 gstelement: moved the clock unref to the right place 2009-06-17 16:45:17 +02:00
Josep Torra
5d0b8a7489 gstelement: unref the clock when the element changes to null state 2009-06-17 16:17:27 +02:00
Руслан Ижбулатов
7ad8d2e54c Replaced deprecated win32-compatibility function with undeprecated one.
Fixes #560442.
2009-06-17 09:52:33 +01:00
Josep Torra
d280a3977e gstbin: swap the lines of my previous commit
Fixes a bug introduced in my previous commit that released the
clock provider and after used it to create the clock lost message.
2009-06-16 18:36:41 +02:00
Josep Torra
6103d45dc0 gstbin: remove clock references when clock lost happens
Remove reference to clock and clock provider stored in the bin
when the clockprovider element is removed from the bin.
2009-06-16 17:51:12 +02:00
Branko Subasic
f44b667120 ghostpad: Add support for GstBufferLists
Fixes #585834
2009-06-16 11:34:54 +02:00
Christopher Halse Rogers
2896964ec2 iterator: Explicitly mention refcounting in docs
Fixes #585938
2009-06-16 11:21:42 +02:00
Tim-Philipp Müller
470e561216 gstxml: fix (de)serialisation of properties of type GstStructure
souphttpsrc has a property of type GstStructure, which causes an
assertion when serialising it to xml. Fixes #585137.
2009-06-16 08:55:17 +01:00
Wim Taymans
d881bf69d1 bin: make sure we set the next state correctly
When the continue function is scheduled, make sure we set the next state instead
of the pending state.
Add some more debug info.

fixes #585569
2009-06-15 18:44:45 +02:00
Wim Taymans
309d78770c debug: add some more debug to element and pads 2009-06-15 18:42:59 +02:00
Руслан Ижбулатов
18a34288cf segment: fix include order to get config.h before _mingw.h
config.h must always be included before any other includes, either
directly or indirectly via gst_private.h. Fixes #585733.
2009-06-14 20:00:49 +01:00
Tim-Philipp Müller
dccea0406b taglist: add functions to create a new taglist with tags in one go
Add functions to create a new tag list and set tags in one go, which
is nice for use in combination with functions that take ownership of
the taglist, such as gst_event_new_tag() or gst_element_found_tags().

API: add gst_tag_list_new_full()
API: add gst_tag_list_new_full_valist()
2009-06-14 16:17:50 +01:00
René Stadler
c403e4b7f0 Fix remaining --disable-gst-debug ABI breakage.
Fixes #579177.
2009-06-12 18:19:23 +03:00
Wim Taymans
f456be1db6 message: fix docs 2009-06-12 15:48:35 +02:00
Wim Taymans
25067558dc stepping: more stepping improvements
Update design doc with step-start docs.
Add eos field to step done message
when stepping in reverse, update the segment time field.
Flush out the current step when we are flushing.
2009-06-12 13:20:36 +02:00
Wim Taymans
e969b3a399 message: add step-start message 2009-06-12 13:16:29 +02:00
Tim-Philipp Müller
4530151ad2 gstvalue: more efficient value table lookup for fundamental types
Small micro-optimisation: look up value table for fundamental types
via an array dedicated to fundamental types instead of going through
a hash table lookup. Since there can be only 255 fundamental types,
the table size/efficiency trade-off should be acceptable, esp. since
the most commonly-used types are all fundamental types. The size of
the table could probably be minimised further if needed by allocating
the table dynamically and only expanding it on demand.
2009-06-11 19:02:40 +01:00
Tim-Philipp Müller
e8bfd88f26 gstvalue: don't put GTypes into int variables
GTypes are not ints and as such are not guaranteed to fit into an int
(with the exception of fundamental types), so we really shouldn't put
them into int variables. Even if a rather unlikely obscure corner case,
this has actually been a problem at some point in the past, see commit
99f16655f4.
2009-06-11 18:48:50 +01:00
Jan Schmidt
4165cdf4af elementfactory: Fix a compiler warning
Use (gpointer) instead of (gpointer *) to fix a strict-aliasing build warning.
2009-06-11 14:00:09 +01:00
Tim-Philipp Müller
7e9105bca0 Make sure config.h is only included once
Fixes build problem on win32 (#585075).
2009-06-10 20:29:41 +01:00
Stefan Kost
094d71f004 plugin: add since: tags for the api docs.
The previous related commit added new API.
API: add gst_plugin_get_cache_data, gst_plugin_set_cache_data
2009-06-10 18:07:11 +03:00
Stefan Kost
a6999575d5 plugin: fix leaks introduced by fix for #584389 2009-06-10 12:03:42 +03:00
Tim-Philipp Müller
cdd47a37e9 structure: add gst_structure_*_get*() vararg functions
Add a bunch of vararg getter convenience functions to complement
the vararg setter functions, and a basic unit test. Fixes #534208.

API: gst_structure_get()
API: gst_structure_id_get()
API: gst_structure_get_valist()
API: gst_structure_id_get_valist()
2009-06-10 09:39:12 +01:00
Tim-Philipp Müller
26b201273a docs: a few small API doc fixes and additions 2009-06-10 09:39:12 +01:00
Tim-Philipp Müller
a33de081b2 logging: when logging taglists, shorten long buffer dumps
Don't dump hundreds of kB of hexdata into debug logs when converting
taglists containing huge images into a string. Instead, shorten the
buffer data so that the string is still readable and debug logs
stay managable. Can be turned off with GST_DEBUG_OPTIONS=full-tags.
See #584988.
2009-06-10 09:39:11 +01:00
Wim Taymans
afeec70eff segment: make conversion more precise
Make sure the conversion from and the conversion to give the same results.
2009-06-09 10:23:23 +02:00
Tim-Philipp Müller
f44204c8fa utils: gst_util_uint64_scale*() micro-optimisations
Sprinkle G_LIKELY/G_UNLIKELY; add inlined _scale_int_unchecked()
so we don't do some checks twice when calling it from _scale().
2009-06-08 17:13:17 +01:00
Tim-Philipp Müller
998b2392d3 Remove double semicolons at end of line 2009-06-08 17:13:17 +01:00
Stefan Kost
ed88db818b registry: allow plugins to cache extra data in registry. Fixes #570233
Add a GstStructure to GstPlugin. Plugins can retieve it in plugin_init and
access the cached info or build the cache and store it there.
2009-06-07 23:48:59 +03:00
Stefan Kost
55577a48ea registry: don't recreate features on first use. Fixes #584389
The first time one calls gst_element_factory_make(), gst recreates the plugin
feature and the element factory. As a side effect we ref the class to fill
in detail we already have filled from the registry cache. This patch changes
the behaviour to just update the existing entries. The factory is now attached
to the type and set in gst_element_base_class_init().
2009-06-07 23:48:59 +03:00
Wim Taymans
1769cc7297 gstvalue: remove type checks and redundant code 2009-06-07 17:32:35 +02:00
Wim Taymans
19f98d6418 value: fix fraction range lcopy function
This function seems to be broken for 3.5 years. Luckily nobody ever tried to
make a fraction range object property...
2009-06-07 15:43:57 +02:00
Wim Taymans
65f9b38138 gstvalue: performance improvements
Add a GType->GstValueTable hashtable mapping.
Avoid _get_type() multiple times when we can.
Use GSlice for fraction range dynamic memory
Add G_LIKELY when we can
Improve lookup of the value table using the hashtable
2009-06-07 15:35:12 +02:00
Wim Taymans
c6e6e7c97b structure: no need to clear on init
We don't need to clear the field on init because we will do that again before we
are going to use the field later.
2009-06-07 14:30:28 +02:00
Jan Schmidt
766e7afc23 gststructure: Fix some memory leaks. Sprinkle G_LIKELY/UNLIKELY
Fix some memory leaks shown by the new serialisation/deserialisation unit
test. Split the gst_string_wrap function in gstvalue.c into components and
use them to make gst_string_take_and_wrap, which takes ownership of the
string, avoiding a strdup.

Add some G_LIKELY/UNLIKELY, and clean up some leaks in error paths.
2009-06-05 21:00:43 +01:00
Wim Taymans
814b46b6a6 ghostpad: avoid excessive notify for caps
Avoid an object property notify if the caps on the other pad were already
set (and thus notified).
2009-06-04 18:26:04 +02:00
Wim Taymans
0e74bfe248 segment: add gst_segment_set_running_time
Added new method for closing the segment to a specific running time.

API: GstSegment::gst_segment_set_running_time()
2009-06-04 12:53:20 +02:00
Tim-Philipp Müller
32ba8b4fb3 errors: reword state change failed error message and remove bugzilla link
Reword this message a bit to make it clearer what it means, namely that
the state change may have failed for good reasons, but that the element
just failed to post a proper error on the bus. This is not an internal
GStreamer bug, and we really don't need people to flood bugzilla with
bug reports if one such plugin bug ever makes it into the wild.
2009-06-04 00:59:03 +01:00
Tim-Philipp Müller
604097bc3a API: add GST_MESSAGE_SRC_NAME macro
Add GST_MESSAGE_SRC_NAME macro that always returns a non-NULL string.
Useful for debugging and logging purposes.
2009-06-04 00:40:51 +01:00
Wim Taymans
92984a116b segment: add method for converting to position
Add gst_segment_to_position() that converts a running_time to a position in the
segment. A faulty variant of this function is currently used in inputselector
but we'll need it for frame stepping too.

API: GstSegment::gst_segment_to_position()
2009-06-03 19:06:30 +02:00
Stefan Kost
47d9904eba structure: fix serialisation of nested structures.
Use string_warp/unwrap to escape delimiters, otherwise deserialisation fails.
Also move GST_ASCII_IS_STRING to private header to avoid keeping it in sync.
Also use '\0' when terminating a string for better readability.
2009-06-02 18:39:17 +03:00
Tim-Philipp Müller
51f50a5c67 info: widen log level strings to take into account the new MEMDUMP 2009-06-01 20:28:30 +01:00
Wim Taymans
0c205b96b4 framestep: implement backwards framestep
Update framestep document, we want to pass the flush flag in the step-done
message.

Add flush flag to the gstmessage.

Update examples to use the new step-done message api.

Implement framestep with playback rates < 0.0 too.
2009-06-01 13:37:28 +02:00
Wim Taymans
386c516e51 add new API for framestepping
Add new STEP event and methods for creating/parsing the event
Update design docs.
Add new STEP_DONE message and method to create/parse.

API: GstEvent::gst_event_new_step()
API: GstEvent::gst_event_parse_step()
API: GstMessage::gst_message_new_step_done()
API: GstMessage::gst_message_parse_step_done()
2009-06-01 13:36:49 +02:00
Tim-Philipp Müller
a565dbd1f3 structures: don't leak invalid or empty strings when we warn
Fixes minor memory leak in unit tests caused by the recent changes.
Since we're expected to take ownership of the GValue in the structure
field struct here, we need to unset it if we don't use it.
2009-06-01 10:10:20 +01:00
Stefan Kost
612387da25 registry: fix comment formatting 2009-05-31 22:39:05 +03:00
Tim-Philipp Müller
7c4e618471 taglists: make _get_{string|pointer} return FALSE for NULL values
Make gst_tag_list_get_string() return FALSE for NULL strings and
empty strings, and gst_tag_list_get_pointer() return FALSE for
NULL pointers, like we do with dates and buffers.

Fixes #560345.
2009-05-31 16:17:45 +01:00
Tim-Philipp Müller
30c890c7a2 taglists: warn if someone tries to add empty or NULL string tags to a taglist
Also warn if an element or application tries to add a field with an
empty string to a structure (NULL strings are still needed and
allowed though) and do all those checks in the right function.

Fixes #559643.
2009-05-31 15:38:01 +01:00
Tim-Philipp Müller
c8acbbfde0 structure: add gst_structure_id_new() convenience function
Add convenience wrapper for gst_structure_id_empty_new() plus
gst_structure_id_set() and use it in a few places.

API: gst_structure_id_new()
2009-05-29 19:28:10 +01:00
Tim-Philipp Müller
bc7c7e9836 micro-optimisation: use GST_QUARK in more places
Use gst_structure_id_empty_new() in combination with GST_QUARK
rather than gst_structure_id_new() when creating message, event,
query and taglist structures. Mostly just because we can.
2009-05-29 19:27:43 +01:00
Wim Taymans
ae62089f58 element: reset start_time in lost state 2009-05-29 16:14:36 +02:00
Wim Taymans
6beb496878 docs: update element an pipeline docs 2009-05-29 13:03:15 +02:00
Wim Taymans
087c8957d2 pipeline: deprecate old methods, fix test
Deprecate the old _set_stream_time and _get_last_stream_time methods because
they are now equivalent to the better named _set/_get_start_time.
2009-05-29 12:21:36 +02:00
Wim Taymans
6affcdd2ad pipeline: use START_TIME to keep track of time
Use the element START_TIME to keep track of the running time when the pipeline
paused so that it can be used to restore the base_time.
Take the start_time before setting the children to PAUSED so that we can
distribute the start_time to the children.
2009-05-29 11:55:39 +02:00
Wim Taymans
465b40a2b8 bin: set the base_time and start_time better
Simply set the start_time and base_time on the element instead of calling the
setters.
2009-05-29 11:55:38 +02:00
Wim Taymans
2f23444d35 bin: make the bin set the start_time on elements
Set the start_time of the bin on the elements when they are added to the
pipeline and when a state change happens.
2009-05-29 11:55:38 +02:00
Wim Taymans
83b2c63a30 element: add start_time field an methods
Add a start_time field and some methods. The start_time will contain the
running_time of when the element last went to paused. This time can be user to
report the position in PAUSED but also to do more correct clipping and
stepping later.
2009-05-29 11:55:38 +02:00
Wim Taymans
8f7c59936e pad: add pad private structure
Add pad private structure and move the new chainlistfunc into the private
struct. This avoids ABI breakage and allows us to expand in the future.
2009-05-28 16:36:32 +02:00
Wim Taymans
791fa43812 buffer: avoid memory leaks
Avoid leaking the caps of the dest buffer and avoid doing needless caps
refs.
When the source and target buffers are the same, return immediatly.
2009-05-27 16:19:34 +02:00
Sebastian Dröge
4e8f547f98 API: Add gst_message_{new,parse}_tag_full() to get/set the source pad
Fixes bug #582588.
2009-05-27 14:32:51 +02:00
Sebastian Dröge
db6f445620 Revert "element: Set the originating pad as message source in gst_element_found_tags_for_pad ()"
This reverts commit bebfde7502.

This change shouldn't be done in a stable release series as
applications are actually expecting the sender to be an
GstElement. One example is totem.
2009-05-27 14:06:13 +02:00
Wim Taymans
91f901975a element: fix typo in comments 2009-05-25 18:45:19 +02:00
Wim Taymans
03037d56f4 clock: remove assertion
Remove an assertion, this is not really an error in all cases.
Fixes #582010
2009-05-25 16:54:25 +02:00
Wim Taymans
cabc9cbbef clock: enable monotonic clock when we can
Enable the monotonic clock by default when we can.
Fixes #583554
2009-05-25 16:23:30 +02:00
Wim Taymans
fd8559e4fb pad: keep task ref before releasing the lock
Keep a ref to the task on the pad so that a concurrent stop can stop and join
the task.
2009-05-25 13:03:42 +02:00
Wim Taymans
d20de24c97 gsttask: avoid join to return early
Unset the running flag after we released the lock for posting the stream-status
message. If we set the running flag to FALSE too early, the join method will
just continue without waiting for the message to be posted, leading to potential
crashes.
2009-05-25 11:56:47 +02:00
Stefan Kost
9574d82bf9 preset: fix update rule
Only update the preset from system, if we had a preset before and system
version is newer.
2009-05-24 23:14:26 +03:00
Stefan Kost
158895f56b registry: don't free node-date and deref again. Fixes #580579
When writing a cache chunk fails, we were freeing the node and jump to a final
cleanup which dereferenced a null pointer. Leve freeing the node to the cleanup
code in fail_free_list. (sorry for committing wrong fix before).
2009-05-22 23:16:00 +03:00
Stefan Kost
4faa75ab35 registry: don't free node-date and deref again. Fixes #580579
When writing a cache chunk fails, we were freeing the node and jump to a final
cleanup which dereferenced a null pointer. Leve freeing the node to the cleanup
code in fail_free_list.
2009-05-22 23:10:00 +03:00
Stefan Kost
c2da78a953 docs: fix gtk-doc warnings
Move MT safety to main description (it does not belong to Return: or Since:
statement). Add a few missing return docs. Downgrade a normal comment froma doc
comment. Fix a doc header to only contain symbol name.
2009-05-22 12:53:11 +03:00
Jan Schmidt
c05e2382cb docs: Fix up some documentation warnings.
Since: tags should always be the last thing in a doc block, apparently.
Add some Returns: descriptions to some recent functions.
2009-05-22 09:33:02 +01:00
Wim Taymans
f7c5767559 docs: update docs for stream_time->running_time
Change some instances where we wrongly refer to stream time where it should have
been running time.
2009-05-21 17:32:00 +02:00
Hannes Bistry
b47f425069 loadsave: fix requestpad handling and serialisation order.
Support request pads when loading. Reverse pad serialisation order to
preserve it when recreating the pipeline.
2009-05-20 10:58:59 +03:00
Tim-Philipp Müller
71c7ae6c07 docs: mention that GST_FORMAT_{PERCENT|BUFFERS} are not implemented 2009-05-18 01:00:36 +01:00
Sebastian Dröge
44ea1ac6b4 gstclock: Fix ABI breakage on 32 bit architectures
The padding of GstClock is a GstClockTime and not a
gpointer, so adding a pointer requires the padding
size to be changed depending on the pointer size.
Use an union instead.

Fixes bug #582878.
2009-05-17 10:46:39 +02:00
Thiago Santos
f2890f46a5 [gstvalue] adds safety parenthesis to macros missing them. 2009-05-15 15:26:18 -03:00
Thiago Santos
69a1a60a87 [gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros.
Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros.
Fixes #582708.
2009-05-15 15:26:17 -03:00
Wim Taymans
bb8f296d45 clock: use seqlocks to parallellize readers 2009-05-15 16:14:52 +02:00
Edward Hervey
4f951e2614 Makefile.am: update for added/moved/removed files that weren't dist-ed. 2009-05-15 11:00:53 +02:00
Sebastian Dröge
bebfde7502 element: Set the originating pad as message source in gst_element_found_tags_for_pad ()
Fixes bug #582588.
2009-05-14 12:25:20 +02:00
Wim Taymans
ae08561ae6 element: add gst_element_lost_state_full()
Add a gst_element_lost_state_full() with an extra argument to control
distribution of a new base_time. We will need this for flushing step
operations.

API: GstElement::gst_element_lost_state_full()
2009-05-14 11:36:28 +02:00
Stefan Kost
39d21970b0 debugutils: show more pad-details
Show pad activation mode and pad-flags inside the pad. Write down some ideas
about how we could improve the caps layout.
2009-05-13 11:03:27 +03:00
Stefan Kost
82635ea2a7 debugutils: layout improvement
dot does not take the head/tail labels into account. For unfixed caps they get
quite large. Double the padding to make it sort of readable in more cases. Also
make normal font bigger and caps-label font smaller to increase our luck.
2009-05-13 00:32:17 +03:00
Tim-Philipp Müller
fb007e5d50 Initialise some more types in gst_init(), esp. the new enum types
Possibly fixes GObject class creation/unref race conditions when
creating the last-message string in fakesink for events with
structures that have fields with these enum types.
2009-05-12 20:58:32 +01:00
Tim-Philipp Müller
7f0b2f3d3b systemclock: remove duplicate _get_type() function for GstClockType
Remove the static gst_clock_type_get_type() function in the
systemclock code in favour of the public one in gstenumtypes.c.
2009-05-12 20:57:09 +01:00
Stefan Kost
b71014259a ghostpad: remove deprecated API
_internal_link_function() is deprecated and _iterate_internal_links_function()
is already provided.
2009-05-12 18:31:20 +03:00
Stefan Kost
5ce13775b8 parse-launch: allow specifying GstElement properties via gst_parse_bin_from_description
If deserializing a property fails, check if the value type is a string and if so
attempt to create a bin from the string value. This allows to e.g. specify
audio-sink/video-sink for playbin on gst-launch commandline.
2009-05-12 18:31:19 +03:00
Wim Taymans
2dcbe1a4d3 bufferlist: make objects opaque 2009-05-12 16:18:48 +02:00
Wim Taymans
19dc33935e bufferlist: fix a comment 2009-05-12 15:33:25 +02:00