Original commit message from CVS:
2005-02-22 Andy Wingo <wingo@pobox.com>
* gst/elements/gstidentity.h
* gst/elements/gstidentity.c (gst_identity_handle_buffer): New
proc, factored out of the old chain func.
(gst_identity_chain): Use handle_buffer. Lock the stream.
(gst_identity_getrange): Lock the stream. Still doesn't do any
reporting tho.
(gst_identity_event): Handle flush events in the loop-based and
decoupled cases.
(identity_queue_flush, identity_queue_pop, identity_queue_push):
New procs, implement a 1-data buffer pen between threads in
decoupled operation.
(gst_identity_class_init, gst_identity_get_property)
(gst_identity_set_property): Use PROP_FOO instead of ARG_FOO. It's
not null if we get it, but I might remove five year old code. Add
has-src-loop, has-sink-loop, has-chain, has-getrange properties,
remove loop-based.
(gst_identity_finalize): Free mutex and cond.
(gst_identity_init): Alloc mutex and cond.
(gst_identity_sink_loop, gst_identity_src_loop): New procs.
(gst_identity_set_dataflow_funcs): New proc.
Original commit message from CVS:
Add finalize method to RealPad.
Add new lock to correctly do the preroll, should probably not
be put here.
Make fakesink do preroll correctly. Emit a message when the
preroll sample is queued.
Add more info in gst-launch regarding state changes.
Original commit message from CVS:
2005-02-21 Andy Wingo <wingo@pobox.com>
* gst/elements/gstfakesink.c:
* gst/elements/gstfakesrc.c:
(gst_fakesink_loop, gst_fakesrc_loop, gst_fakesink_chain)
(gst_fakesrc_get_range): Assert the pad has been activated in the
proper mode. This will fail right now for fakesrc ! identity !
fakesink.
(gst_fakesrc_activate, gst_fakesink_activate): Record the pad
activation mode.
* gst/elements/gstfakesrc.h: Add a pad_mode instance variable.
Original commit message from CVS:
2005-02-21 Andy Wingo <wingo@pobox.com>
* gst/gstpad.c (gst_real_pad_dispose): Free the stream lock (it
wasn't being freed before).
(gst_real_pad_init): Allocate and initialize the stream lock.
* gst/gstpad.h (GstRealPad): Change the stream lock to be
recursive, so that if an event comes while a loop-based sink is
pulling, the stream lock can be had by both the sink's loop
function and the sink's event function.
(GST_STREAM_GET_LOCK, GST_STREAM_LOCK, GST_STREAM_TRYLOCK)
(GST_STREAM_UNLOCK): Updated accordingly.
Original commit message from CVS:
2005-02-21 Andy Wingo <wingo@pobox.com>
* gst/gstmessage.h (GstMessageType): Turned into flags. Added
GST_MESSAGE_ANY as an OR of all flags.
(GST_MESSAGE_PARSE_STATE_CHANGED): New terrible macro. Will be
made into a function soon.
(GstMessage): Add a state_changed structure to the union. The
union will die soon in favor of a single GstStructure tho.
(gst_message_new_state_changed): New API.
* gst/gstmessage.c (gst_message_new_state_changed): New API.
* tools/gst-launch.c (check_intr): Set the state of the pipeline
to PAUSED here; the poll will catch the state change.
(event_loop): New function, polls the pipeline bus for events. Can
block until eos/error/state change, or just handle the pending
events.
(main): Changed to use event_loop instead of running a main loop.
* gst/gstbus.h (gst_bus_poll): Added.
(gst_bus_peek): Return non-const; the message is refcounted
anyway.
* gst/gstbus.c (gst_bus_init): Replace the GAsyncQueue with a
GQueue+mutex to allow for _peek. (The wake-up functionality
provided by GAsyncQueue is already done by our socketpair.) All
queue users changed to lock, operate, and unlock.
(gst_bus_post): Check the retval of write(2) and handle errno.
(gst_bus_peek): Implemented.
(gst_bus_pop, gst_bus_peek, bus_callback): Because the socketpair
is used to wake up the GSource, read off the character in the
GSource handler and not in pop/peek. This is because a peek will
require a pop in the future, and you can't read off the char
twice. Deal with errno in the read.
(bus_callback): Interpret the handler return value as whether or
not to pop the message from the bus.
(poll_handler, poll_timeout, gst_bus_poll): New API. gst_bus_poll
is meant to replace the while(gst_bin_iterate()) idiom.
Original commit message from CVS:
2005-02-18 Andy Wingo <wingo@pobox.com>
* gst/elements/gstfakesrc.c (gst_fakesrc_class_init): Add HAS_LOOP
and HAS_GETRANGE properties, readwrite + construct.
(gst_fakesrc_set_pad_functions)
(gst_fakesrc_set_all_pad_functions): New procs, like in fakesrc.
(gst_fakesrc_set_property, gst_fakesrc_get_property): Same as
fakesrc.
(gst_fakesrc_get_range_unlocked): New proc, factored out of the
core of _loop.
(gst_fakesrc_get_range): Getrange implementation for fakesink.
(gst_fakesrc_loop): Interface with get_range_unlocked.
(gst_fakesrc_activate): Add support for both activation modes,
with assertions.
* gst/elements/gstfakesink.h:
* gst/elements/gstfakesrc.h: Add has_loop and has_chain instance
variables.
* gst/elements/gstfakesink.c (gst_fakesink_class_init): Add
HAS_LOOP and HAS_CHAIN object properties, readwrite but also set
on construction.
(gst_fakesink_set_pad_functions): New proc, sets the functions on
one pad, setting the loop and chain functions properly.
(gst_fakesink_set_all_pad_functions): New proc, does
set_pad_functions on all pads.
(gst_fakesink_request_new_pad): Call set_pad_functions.
(gst_fakesink_set_property, gst_fakesink_get_property): When the
HAS_LOOP and HAS_CHAIN properties are set, reset the functions on
all pads.
(gst_fakesink_activate): Assert that the appropriate functions are
available for the activation mode.
(gst_fakesink_loop): Don't unref the buffer, chain_unlocked does
it for us.
Original commit message from CVS:
2005-02-16 Andy Wingo <wingo@pobox.com>
* gst/elements/gstfakesink.c (gst_fakesink_loop)
(gst_fakesink_chain_unlocked, gst_fakesink_activate): New
functions.
(gst_fakesink_chain): Use chain_unlock.
Original commit message from CVS:
2005-02-11 Andy Wingo <wingo@pobox.com>
* tools/gst-launch.c (check_intr): New timeout to check the
interrupt flag and stop the pipeline properly. Bling!
Original commit message from CVS:
* gst/gstevent.c: (gst_event_new_discontinuous_valist),
(gst_event_discont_get_value), (gst_event_new_segment_seek):
stop time can be -1.
Original commit message from CVS:
2005-02-11 Andy Wingo <wingo@pobox.com>
* tools/gst-inspect.c (print_field): Change prototype for
non-mutating caps_foreach.
* check/gst/gstobject.c (test_fail_abstract_new): Expect a warning
from GLib.
* check/gst/gstcaps.c (test_double_append): Renamed from
test_fail_double_append.
(test_mutability): New test, tests that caps and structures are
mutable only with refcount 1, or in the case of structures, also
when unparented.
* check/gstcheck.c (gst_check_init): Handle WARNING in addition to
CRITICAL.
(gst_check_log_critical_func): Print criticals in both the
expected and unexpected cases.
Original commit message from CVS:
2005-02-11 Andy Wingo <wingo@pobox.com>
* check/gst/gstcaps.c: New test suite. Only one test at the moment
-- this is an infrastructure commit.
* check/gst/gstobject.c (main):
* check/gst/gstdata.c (main):
* check/gst-libs/gdp.c (main): Use gst_check_init() to initialize
gstreamer.
* check/gstcheck.h: Declare all variables as extern so they are
defined once in gstcheck.c.
(ASSERT_CRITICAL): New macro, asserts that the expression passed
as an argument raises one or more critical logs.
* check/gstcheck.c: Define the extern-declared variables here.
(gst_check_log_message_func, gst_check_log_critical_func): The log
function was split in two, one for messages and one for criticals.
The criticals logfunc will fail if a critical was not expected.
The messages logfunc is the same as before.
(gst_check_init): Set up all log handlers, and initialize
gstreamer too.
* check/Makefile.am: Pulled over some pieces from the old
testsuite/ directory. Don't use --gst-fatal-warnings though, we
have some new mechanisms for that.
(TESTS): Added gst/gstcaps.
Original commit message from CVS:
2005-02-10 Andy Wingo <wingo@pobox.com>
* testsuite/caps/value_serialize.c: merge from HEAD.
* testsuite/caps/subtract.c:
* testsuite/caps/filtercaps.c:
* testsuite/caps/enumcaps.c:
* testsuite/caps/deserialize.c:
* testsuite/caps/caps.c:
* testsuite/caps/audioscale.c: Unref caps, not free.
* testsuite/caps/caps_strings: Merged from HEAD.
* gst/elements/gstidentity.c (gst_identity_proxy_getcaps): Getcaps
implementation for identity.
* gst/gststructure.h
* gst/gststructure.c
(gst_caps_structure_fixate_field_nearest_double):
(gst_caps_structure_fixate_field_nearest_int): Moved from
gstcaps.c because we need the private IS_MUTABLE macro.
(IS_MUTABLE): New macro, determines if a
structure is mutable or not.
(gst_structure_free): Don't allow free while holding a pointer to
a parent's refcount.
(gst_structure_set_name): Check for writability.
(gst_structure_id_set_value): Same.
(gst_structure_set_value): Same.
(gst_structure_set_valist): Same.
(gst_structure_remove_field): Same.
(gst_structure_remove_all_fields): Same.
(gst_structure_map_in_place): New routine, like _foreach but
allows the function to mutate the value (via a non-const
prototype). Check for writability.
(gst_structure_foreach): Redefine to only take non-mutating
functions.
* gst/gstcaps.c (IS_WRITABLE): New macro, returns TRUE if the caps
are writable.
(gst_caps_copy): Add some docs about mutability, etc.
(_gst_caps_free): Set the parent refcount pointer on structures to
NULL before freeing them.
(gst_caps_ref): Document.
(gst_caps_make_writable): Doc.
(gst_caps_make_writable): Changed to make_writable, get_writable
sounds too much like retrieving a property.
(gst_caps_copy_1): Removed, not very useful.
(gst_caps_ref_by_count): Removed, no need to have something GLib
doesn't.
(gst_caps_copy_conditional): Ref instead of copying.
(gst_static_caps_get): Retain a reference to the returned caps, so
that the static caps will remain immutable.
(gst_caps_remove_and_get_structure): Set the parent refcount to
NULL when removing the structure.
(gst_caps_append): Fix to work with structure parent refcounts.
Check for writability.
(gst_caps_append_structure): Check for writability, work with
parent refcounts.
(gst_caps_remove_structure): Check for writability.
(gst_caps_set_simple): Check for writability.
(gst_caps_set_simple_valist): Check for writability.
(gst_caps_is_fixed_foreach): Update for non-mutating foreach.
(gst_structure_is_equal_foreach): Same.
(gst_caps_structure_intersect_field): Same.
(gst_caps_structure_subtract_field): Same. Make static.
(gst_caps_normalize_foreach): Same.
(gst_caps_structure_figure_out_union): Same.
(gst_caps_switch_structures): New static function, switches out
structures inside a caps, taking care of parent_refcount setting.
* gst/gstpad.c (gst_pad_get_allowed_caps): Remove the restriction
on only src pads, wim von masterhack claims it was bogus.
* testsuite/caps/Makefile.am
* testsuite/caps/app_fixate.c: Removed app_fixate test, things are
done a bit differently in THREADED.
Original commit message from CVS:
2005-02-10 Andy Wingo <wingo@pobox.com>
* docs/design/part-MT-refcounting.txt (Refcounting): Some
grammar/clarity fixes, and added a section on child structures of
shared refcounted objects.
Original commit message from CVS:
2005-02-10 Andy Wingo <wingo@pobox.com>
* gst/gstcaps.h:
* gst/gstcaps.c (gst_caps_get_writable): Change from
copy_on_write.