Commit graph

11 commits

Author SHA1 Message Date
Sebastian Dröge 7ac9534322 threadshare: Don't drain the queue when trying to push pending items
Otherwise we'll have to collect all failed items and push them back.
Instead pop items one by one, and if one fails just push that single
item back to the front.

The previous code would've lost all items after the first one that
failed
2018-11-05 13:36:47 +02:00
Sebastian Dröge 51aa06d013 threadshare: Schedule the pending queue in queue/proxysink only on EOS or the first buffer/buffer list
We will get the custom sticky downstream event with the IO context only
after stream-start and others, so would potentially block the current
thread from another futures executor, which then panics. Instead let's
just queue up those events for the time being until a later time.
2018-11-05 13:36:47 +02:00
Sebastian Dröge 0b54cdb8ea threadshare: Use default query handling
While this will still drop most queries, it at least implements some
sane default handling for CAPS/ACCEPT_CAPS queries.
2018-11-05 13:36:47 +02:00
Sebastian Dröge be0403ce24 threadshare: Switch to gobject-subclass 2018-11-05 13:36:47 +02:00
Sebastian Dröge 30b2df753c threadshare: Set element flags correctly for sources and sinks
And let proxysink post EOS events
2018-11-05 13:36:20 +02:00
Sebastian Dröge 099093e9be threadshare: Refactor pending future draining to get rid of some duplicated code 2018-11-05 13:36:20 +02:00
Sebastian Dröge a9d979a988 threadshare: Use catch_panic_pad_function from gst-plugin crate 2018-11-05 13:36:20 +02:00
Sebastian Dröge 88933790e7 threadshare: Add FIXME comment for refactoring opportunities 2018-11-05 13:36:20 +02:00
Sebastian Dröge f5b3e9481f threadshare: Run everything through rustfmt 2018-11-05 13:36:20 +02:00
Sebastian Dröge 6ebc8988b2 threadshare: Make sure to shutdown sockets/queues without any mutexes locked
And make sure that the IOContext stays alive until they are fully done.
2018-11-05 13:36:20 +02:00
Sebastian Dröge b4d1145490 threadshare: Add initial implementation of a proxysrc/sink like element 2018-11-05 13:36:20 +02:00