Commit graph

4578 commits

Author SHA1 Message Date
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