Commit graph

7 commits

Author SHA1 Message Date
Andy Wingo 0d557a7bc2 gst/gstmessage.h gst/gstmessage.c (_gst_message_free)
Original commit message from CVS:
2005-02-23  Andy Wingo  <wingo@pobox.com>

* gst/gstmessage.h
* gst/gstmessage.c (_gst_message_free)
(gst_message_new_application): New message type, APPLICATION,
explicitly for use by applications.

* gst/gstbus.c (gst_bus_post): Only write a byte to the wakeup
socket if the queue is coming from an empty state. Fixes a bug
where posting a message could block, waiting for someone to read
out bytes from the socket.
(bus_watch_callback): Renamed from bus_callback, let gst_bus_pop
handle the socket read.
(bus_watch_destroy): Renamed from bus_destroy.

* check/Makefile.am: Re-enable the gst-register test so we can
deal with elements here. Add the gstbus tests.

* check/gst/gstbus.c: New check, spawns off a bunch of threads all
posting messages to a bus, then reads to see if they are in the
right order.

* check/pipelines/simple_launch_lines.c: Add some tests, and make
sure to pop the message off the bus after the poll.

* gst/gstbus.c (gst_bus_pop): Read off the control byte if the
queue becomes empty.
2005-02-23 16:08:21 +00:00
Andy Wingo 1a5201826c gst/gstmessage.h (GstMessageType): Turned into flags. Added
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.
2005-02-21 11:54:55 +00:00
Wim Taymans 10e648c7d9 Removed schedulers and compat stuff.
Original commit message from CVS:
Removed schedulers and compat stuff.
Use iterators in bin for the various lookup functions.
Optimized the clock a bit.
Added some more docs.
Fixed scheduling in the ()-(l) case.
Fixed and added some testcases.
Removed old code.
2005-01-26 10:56:09 +00:00
Wim Taymans 864a9acf69 More state change fixes.
Original commit message from CVS:
More state change fixes.
Added/fixed some testcases.
Threadsafety fixes.
2005-01-18 10:52:08 +00:00
Wim Taymans 11f8f6a649 Bus cleanups.
Original commit message from CVS:
Bus cleanups.
Backport some HEAD changes.
Queue cleanup
2005-01-11 14:58:12 +00:00
Wim Taymans 74ca793b0a Clock fixes. Added async callbacks and clock unscheduling.
Original commit message from CVS:
Clock fixes. Added async callbacks and clock unscheduling.
Threading fixes. Fixed race condition in GstTask and possible
deadlock in _pad_get_caps(). Made various subsystems (query,
format,..) threadsafe.
Lots of cleanups and documentation.
2005-01-06 18:17:12 +00:00
Thomas Vander Stichele 65285e1acf newly added files
Original commit message from CVS:
newly added files
2004-12-08 18:05:14 +00:00