Commit graph

4343 commits

Author SHA1 Message Date
Stefan Kost 0961f05009 Rename api added in previous commit and add since tag to docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttagsetter.c:
* gst/gsttagsetter.h:
Rename api added in previous commit and add since tag to docs.
API: gst_tag_setter_reset_tags()
2008-12-16 15:51:52 +00:00
Stefan Kost 2e25b024cc Add function to reset tagsetter for element reuse.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttagsetter.c:
* gst/gsttagsetter.h:
Add function to reset tagsetter for element reuse.
API: gst_tag_setter_flush()
2008-12-16 14:05:40 +00:00
Stefan Kost 4a162d56ab gst/gsttaglist.c: Avoid copy of empty taglist.
Original commit message from CVS:
* gst/gsttaglist.c:
Avoid copy of empty taglist.
2008-12-16 09:37:53 +00:00
Stefan Kost f28a2a6cfc More complete unit tests. Fix handling of empty taglists (they were not merged before).
Original commit message from CVS:
* gst/gsttaglist.c:
* tests/check/gst/gsttag.c:
More complete unit tests. Fix handling of empty taglists (they were
not merged before).
2008-12-16 09:23:21 +00:00
Stefan Kost f085768807 gst/: Update GstTagSetter and GstTagMergeMode documentation. Mention that tags can come from events and from applicat...
Original commit message from CVS:
* gst/gsttaglist.h:
* gst/gsttagsetter.c:
Update GstTagSetter and GstTagMergeMode documentation. Mention
that tags can come from events and from application. Fix example.
2008-12-16 07:07:36 +00:00
Sebastian Dröge 4a19260c75 gst/gstutils.c: Fix a caps memory leak introduced by the last change.
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Fix a caps memory leak introduced by the last change.
2008-12-09 16:23:58 +00:00
Sebastian Dröge 629b2a910b gst/gstutils.c: Check if the caps of the pads are compatible before returning a pad and claiming it is compatible. Th...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Check if the caps of the pads are compatible before returning
a pad and claiming it is compatible. This, among other things,
fixes a bug with gst-launch where an incompatible pad is chosen
and linking fails. Fixes bug #544003.
2008-12-09 15:45:36 +00:00
David Schleef e716f92dd7 gst/gst.c: Search for plugins on win32 based on the location of the gstreamer DLL. Fixes #548786
Original commit message from CVS:
* gst/gst.c:
Search for plugins on win32 based on the location of the
gstreamer DLL.  Fixes #548786
2008-12-05 20:32:03 +00:00
이문형 67edb154e5 gst/gstpoll.c: Adds support for FD_CONNECT event (win32). See #562258.
Original commit message from CVS:
Patch by: 이문형 <iwings at gmail dot com>
* gst/gstpoll.c: (gst_poll_fd_ctl_write), (gst_poll_fd_has_error):
Adds support for FD_CONNECT event (win32). See #562258.
2008-11-27 11:12:30 +00:00
Simon Holm Thøgersen 9c15d8efec gst/gstregistry.c: Reduce the number of stat() calls for every file from three times to one time. Fixes bug #560360.
Original commit message from CVS:
Patch by: Simon Holm Thøgersen <odie at cs dot aau dot dk>
* gst/gstregistry.c: (gst_registry_scan_path_level):
Reduce the number of stat() calls for every file from three times
to one time. Fixes bug #560360.
2008-11-24 09:59:07 +00:00
Wim Taymans ede1e01d13 gst/gstpad.c: Avoid getting the acceptcaps function too early.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_accept_caps):
Avoid getting the acceptcaps function too early.
2008-11-21 16:48:48 +00:00
Michael Smith 8b1ed490b3 gst/gstregistrybinary.c: In win32 codepath, if we fail to write the registry, create the directory for it and try aga...
Original commit message from CVS:
* gst/gstregistrybinary.c:
In win32 codepath, if we fail to write the registry, create the
directory for it and try again, matching the behaviour in non-win32
codepaths.
2008-11-20 20:44:56 +00:00
Wim Taymans 82479761f1 gst/gstquery.*: Add GstQueryType for custom queries instead of having to use the not-so-very-convenient registration ...
Original commit message from CVS:
* gst/gstquery.c:
* gst/gstquery.h:
Add GstQueryType for custom queries instead of having to use the
not-so-very-convenient registration infrastructure to register new
types.
2008-11-20 10:35:50 +00:00
Andrew Feren 604382bfb5 gst/gstobject.c: Unref the GEnumClass after usage again. Fixes bug #561501.
Original commit message from CVS:
Patch by: Andrew Feren <acferen at yahoo dot com>
* gst/gstobject.c: (gst_object_default_deep_notify):
Unref the GEnumClass after usage again. Fixes bug #561501.
2008-11-19 12:20:03 +00:00
Wim Taymans 9184d9ee3c gst/gstbin.*: Add do-latency signal with the old default fallback implementation. This allows for custom latency calc...
Original commit message from CVS:
* gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init),
(gst_bin_recalculate_latency), (gst_bin_do_latency_func),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add do-latency signal with the old default fallback implementation. This
allows for custom latency calculations for when the default is not
sufficient.
API: GstBin::do-latency signal.
2008-11-19 12:06:41 +00:00
Wim Taymans c311f2153a Add method to recalculate and redistribute the latency on a bin.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (gst_bin_recalculate_latency),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add method to recalculate and redistribute the latency on a bin.
API: gst_bin_recalculate_latency().
2008-11-18 09:58:33 +00:00
Wim Taymans cc5c8784cb gst/gstbuffer.h: Document the free_func.
Original commit message from CVS:
* gst/gstbuffer.h:
Document the free_func.
2008-11-18 09:52:41 +00:00
Stefan Kost d27aea0391 gst/gstvalue.c: Don't crash if either of the string GValues is empty.
Original commit message from CVS:
* gst/gstvalue.c:
Don't crash if either of the string GValues is empty.
2008-11-17 21:25:39 +00:00
Sebastian Dröge e79e2061ae gst/gstutils.h: Add G_GNUC_PURE to gst_util_uint64_scale* and the double<->uint64 conversion functions.
Original commit message from CVS:
* gst/gstutils.h:
Add G_GNUC_PURE to gst_util_uint64_scale* and the double<->uint64
conversion functions.
2008-11-17 04:49:06 +00:00
Wim Taymans 3cc67ebab7 gst/gstbuffer.c: Avoid costly typechecking for trivially correct pointers.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_finalize):
Avoid costly typechecking for trivially correct pointers.
* gst/gstpoll.c: (gst_poll_wait):
Add some G_LIKELY here and there.
* libs/gst/base/gstadapter.c: (gst_adapter_push):
Add some debug info.
2008-11-13 18:09:45 +00:00
Sebastian Dröge 681e4d01c8 gst/gstregistrybinary.*: Don't write and check a CRC for the binary registry file. It's guaranteed that the registry ...
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_write_chunk),
(gst_registry_binary_initialize_magic),
(gst_registry_binary_write_cache),
(gst_registry_binary_check_magic):
* gst/gstregistrybinary.h:
Don't write and check a CRC for the binary registry file. It's
guaranteed that the registry is completely written (it's first written
to a temporary file and then moved) and if the registry was corrupted
by some hardware failure we would have bigger problems.
Bump binary registry version to 0.10.21.1 for this as it's an
incompatible change and to ensure that the registry gets rebuild
after the update.
This saves some milliseconds for reading/writing the registry.
Fixes bug #560399.
2008-11-12 10:39:25 +00:00
Wim Taymans 7f987200b5 gst/gstvalue.c: Reorganize some more, be more conservative with the GST_TYPE_ARRAY not being fixed and inline the tri...
Original commit message from CVS:
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
Reorganize some more, be more conservative with the GST_TYPE_ARRAY not
being fixed and inline the trivial check.
2008-11-06 15:37:16 +00:00
Wim Taymans 18aeb9a41e gst/gstcaps.c: Callgrind micro optimisations.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free),
(gst_caps_merge_structure), (gst_caps_get_structure),
(gst_caps_copy_nth), (gst_caps_set_simple),
(gst_caps_set_simple_valist), (gst_caps_is_fixed),
(gst_caps_is_equal_fixed), (gst_caps_intersect),
(gst_caps_subtract), (gst_caps_normalize), (gst_caps_do_simplify),
(gst_caps_to_string):
Callgrind micro optimisations.
Avoid array bounds checks and force inline of trivial function.
* gst/gstobject.c: (gst_object_set_name_default):
-1 is equivalent to letting glib to the strlen but then there is more
room for optimisations and it's not our fault.
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
no need to clear the array, we're cool.
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
The most common _is_fixed() check is done on fundamental glib base
types so we check this first instead of doing a huge amount of
useless GST_TYPE_ARRAY calls.
2008-11-06 15:09:34 +00:00
Wim Taymans 812640dd18 gst/gstevent.h: Add a SKIP seek flag for use with advanced trickmodes.
Original commit message from CVS:
* gst/gstevent.h:
Add a SKIP seek flag for use with advanced trickmodes.
API: GstSeekFlags::GST_SEEK_FLAG_SKIP
2008-11-06 12:03:17 +00:00
Wim Taymans 209c57085c gst/gststructure.c: No need to memset, we can clear the value ourselves.
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
No need to memset, we can clear the value ourselves.
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_get_compare_func):
Some optimisations from a few callgrind sessions:
When checking if a type is fixed, check for trivial fundamental types
first before checking types for which we need to get the type followed
by the heavy duty type checks, this reduces the amount of
g_type_fundamental() calls a lot.
When getting the compare function, first check for our registered types.
If that fails, do the heavy duty g_type_is_a() checks, reduces the
amount of g_type_is_a() considerably.
2008-11-05 16:57:35 +00:00
Wim Taymans 16e6c3ef96 gst/gstbin.c: Get the seqnum before we dispose the message.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_handle_message_func):
Get the seqnum before we dispose the message.
2008-11-04 18:10:04 +00:00
Wim Taymans 0a71170006 Copy seqnums from events to messages so that they can all be related back to eachother.
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_start),
(gst_bin_handle_message_func), (gst_bin_query):
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object),
(gst_base_sink_event), (gst_base_sink_change_state):
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Copy seqnums from events to messages so that they can all be related
back to eachother.
2008-11-04 15:56:55 +00:00
Andy Wingo 1f1d642981 gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.

Also add API: to previous changelog entry.
2008-11-04 13:56:37 +00:00
Andy Wingo 5f5fbbdd7d Add sequence numbers to events and messages. See #559250.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

Add sequence numbers to events and messages. See #559250.

* gst/gstutils.c (gst_util_seqnum_next, gst_util_seqnum_compare):
New functions.

* gst/gstevent.h:
* gst/gstevent.c (_gst_event_copy, gst_event_new): Initialize new
events with a new sequence number, and copy it when copying.
(gst_event_get_seqnum, gst_event_set_seqnum): Accessors for an
event's sequence number.

* gst/gstmessage.h:
* gst/gstmessage.c (_gst_message_copy, gst_message_new_custom):
(gst_event_get_seqnum, gst_event_set_seqnum): As with events, so
with messages.

* docs/gst/gstreamer-sections.txt: Add new functions to the docs.
2008-11-04 12:22:53 +00:00
Stefan Kost 1d61cb0381 gst/gstregistrybinary.c: Don't bother with the GTimer if we don't output the results.
Original commit message from CVS:
* gst/gstregistrybinary.c:
Don't bother with the GTimer if we don't output the results.
2008-11-03 12:29:10 +00:00
Stefan Kost 0d430a59ef gst/gstregistrybinary.c: Oh my, studip, stupid me. Remove double stat() call.
Original commit message from CVS:
* gst/gstregistrybinary.c:
Oh my, studip, stupid me. Remove double stat() call.
2008-10-31 15:54:44 +00:00
Stefan Kost 5b29f0a1cc gst/gstpreset.c: Use g_unlink instead of unlink.
Original commit message from CVS:
* gst/gstpreset.c:
Use g_unlink instead of unlink.
* gst/gststructure.c:
Use glib type.
* gst/gstutils.c:
Add a FIXME:.
* gst/gsttaglist.c:
* gst/gsttypefind.c:
* gst/gstvalue.c:
Formatting & whitespaces.
2008-10-31 14:24:49 +00:00
Stefan Kost 588ab506b9 gst/: Use g_unlink() as none of these are directories.
Original commit message from CVS:
* gst/gstregistrybinary.c:
* gst/gstregistryxml.c:
Use g_unlink() as none of these are directories.
2008-10-30 14:15:14 +00:00
Wim Taymans d0b44d1578 gst/gstpipeline.c: Some more comments.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func):
Some more comments.
2008-10-29 17:04:50 +00:00
Wim Taymans d2e5ffde24 gst/gstsegment.c: Set the last_stop to a more meaningful position when configuring the segment. ie. the start/stop of...
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full):
Set the last_stop to a more meaningful position when configuring the
segment. ie. the start/stop of the segment or clipped against the
updated segment boundaries.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add some unit tests for the last_stop.
2008-10-23 09:49:07 +00:00
Sebastian Dröge 5644be89d7 API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
Wim Taymans b340b510ce gst/gstpad.c: When we use gst_pad_alloc_buffer() without wanting to set the caps we also don't need to check if the c...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_configure_src):
When we use gst_pad_alloc_buffer() without wanting to set the caps we
also don't need to check if the caps are compatible because the caller
presumably is going to perform its own custom checks. Fixes some cases
where basetransform elements would error out when it was not needed.
2008-10-20 13:32:07 +00:00
Tim-Philipp Müller 1be929a4b6 gst/gstquark.c: Fix printf format warning.
Original commit message from CVS:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
Fix printf format warning.
2008-10-14 17:10:43 +00:00
Wim Taymans 97ec47cabb docs/design/part-TODO.txt: Remove item from the todo list because it was fixed with the latency state change rewrites.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Remove item from the todo list because it was fixed with the latency
state change rewrites.
* docs/design/part-seeking.txt:
* docs/design/part-segments.txt:
Update some docs.
* gst/gstevent.c: (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_latency),
(gst_event_parse_latency):
Use quarks to construct and parse events.
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
Add some more quarks to the table.
Emit a warning when the quark tables are not in sync.
* tests/check/gst/gstbus.c: (GST_START_TEST):
Add an assert.
2008-10-13 17:19:25 +00:00
Wim Taymans 85de653640 gst/gstbus.c: Fix deadlock, g_source_get_id() cannot be called in finalize.
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_source_finalize),
(gst_bus_add_watch_full_unlocked), (gst_bus_add_watch_full),
(gst_bus_enable_sync_message_emission),
(gst_bus_disable_sync_message_emission),
(gst_bus_add_signal_watch_full), (gst_bus_remove_signal_watch):
Fix deadlock, g_source_get_id() cannot be called in finalize.
Keep track of the watch source by keeping a pointer to the source object
instead.
Use the bus lock to protect access to the pointer to the current
watch source.
2008-10-13 10:50:17 +00:00
Olivier Crete 882c997103 gst/gstbus.c: Only allow one bus watch to be set at a time. This is necessary because the dispatcher pops the message...
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbus.c: (gst_bus_source_finalize),
(gst_bus_add_watch_full), (gst_bus_add_signal_watch_full):
Only allow one bus watch to be set at a time. This is necessary
because the dispatcher pops the message from the bus and the second
watcher will then get NULL or the next message (and the first won't
get this next message then, etc). If more than one "watcher" is
required signal watches should be used. Fixes bug #526044.
2008-10-13 09:22:22 +00:00
Sebastian Dröge e6543e71ef gst/gstxml.c: Clarify that the save_thyself() and restore_thyself() virtual functions of GstObject need to be overrid...
Original commit message from CVS:
* gst/gstxml.c:
Clarify that the save_thyself() and restore_thyself() virtual
functions of GstObject need to be overriden, not
gst_object_(save|restore)_thyself() which is impossible.
Fixes bug #555700.
2008-10-10 15:38:06 +00:00
Wim Taymans 401cc7fe6a gst/gstpad.c: Revert a patch from 21 months ago that broke caps negotiation in pull mode. Basically, having a buffer ...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_range), (gst_pad_pull_range):
Revert a patch from 21 months ago that broke caps negotiation in pull
mode. Basically, having a buffer pass over a pad will trigger the
setcaps function when caps change, just like in push mode.
2008-10-10 15:27:37 +00:00
Wim Taymans bc8e367885 gst/gstbin.c: The message src can be NULL, don't try to print the object names in that case.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_remove_func), (update_degree),
(gst_bin_handle_message_func):
The message src can be NULL, don't try to print the object names in that
case.
* libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate):
Add some more debug info.
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline),
(GST_START_TEST):
Add some debug.
Fix the test, pull based sinks go ASYNC to PAUSED, just like other
scheduling modes.
2008-10-10 10:38:12 +00:00
Wim Taymans 3245d41e16 gst/gstpipeline.c: Release the object lock before trying to flush the bus.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_change_state):
Release the object lock before trying to flush the bus.
2008-10-08 15:21:12 +00:00
Wim Taymans 33bd5179c3 gst/gstghostpad.*: Unbreak -good build, private is a reserved c++ keyword.
Original commit message from CVS:
* gst/gstghostpad.c:
* gst/gstghostpad.h:
Unbreak -good build, private is a reserved c++ keyword.
2008-10-08 10:39:24 +00:00
Andy Wingo b731374c49 gst/gstghostpad.*: Fix unintended API removal: re-add GST_GHOST_PAD_CAST to the header.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.h (GST_GHOST_PAD_CAST):
* gst/gstghostpad.c (GST_GHOST_PAD_CAST): Fix unintended API
removal: re-add GST_GHOST_PAD_CAST to the header.
2008-10-08 10:19:11 +00:00
Andy Wingo 9640db9fe2 gst/gstghostpad.h (GstProxyPad, GstProxyPadClass, GstGhostPad)
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.h (GstProxyPad, GstProxyPadClass, GstGhostPad)
(GstGhostPadClass): Publically expose these structures so as to
allow easy subclassing from C. Hide the member data behind a
private opaque data pointer.

* gst/gstghostpad.c: Adapt to store instance data in the type
instance's private data region, not in the public struct.
2008-10-08 10:12:45 +00:00
Sebastian Dröge 2d2a55a2a4 gst/gstregistrybinary.c: If we can't get a cache file don't try to save something to it.
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_write_cache):
If we can't get a cache file don't try to save something to it.
Dereferencing NULL pointers usually isn't a good idea.
2008-10-08 10:07:15 +00:00
Andy Wingo 83d3b5d88e gst/gstghostpad.c (gst_ghost_pad_construct): If we got a template via g_object_get(), be sure to unref it.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_construct): If we got a
template via g_object_get(), be sure to unref it.

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): Fix incorrect doc.
2008-10-08 08:54:55 +00:00