mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
stream: add functions to get the assigned data loop
This commit is contained in:
parent
c3d4abd7f1
commit
64695a8611
|
@ -1956,6 +1956,13 @@ uint64_t pw_filter_get_nsec(struct pw_filter *filter)
|
||||||
return SPA_TIMESPEC_TO_NSEC(&ts);
|
return SPA_TIMESPEC_TO_NSEC(&ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SPA_EXPORT
|
||||||
|
struct pw_loop *pw_filter_get_data_loop(struct pw_filter *filter)
|
||||||
|
{
|
||||||
|
struct filter *impl = SPA_CONTAINER_OF(filter, struct filter, this);
|
||||||
|
return impl->data_loop;
|
||||||
|
}
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
struct pw_buffer *pw_filter_dequeue_buffer(void *port_data)
|
struct pw_buffer *pw_filter_dequeue_buffer(void *port_data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -219,6 +219,10 @@ int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time);
|
||||||
* the nsec value in the spa_io_position. Since 1.1.0 */
|
* the nsec value in the spa_io_position. Since 1.1.0 */
|
||||||
uint64_t pw_filter_get_nsec(struct pw_filter *filter);
|
uint64_t pw_filter_get_nsec(struct pw_filter *filter);
|
||||||
|
|
||||||
|
/** Get the data loop that is doing the processing of this filter. This loop
|
||||||
|
* is assigned after pw_filter_connect(). * Since 1.1.0 */
|
||||||
|
struct pw_loop *pw_filter_get_data_loop(struct pw_filter *filter);
|
||||||
|
|
||||||
/** Get a buffer that can be filled for output ports or consumed
|
/** Get a buffer that can be filled for output ports or consumed
|
||||||
* for input ports. */
|
* for input ports. */
|
||||||
struct pw_buffer *pw_filter_dequeue_buffer(void *port_data);
|
struct pw_buffer *pw_filter_dequeue_buffer(void *port_data);
|
||||||
|
|
|
@ -2369,6 +2369,13 @@ uint64_t pw_stream_get_nsec(struct pw_stream *stream)
|
||||||
return SPA_TIMESPEC_TO_NSEC(&ts);
|
return SPA_TIMESPEC_TO_NSEC(&ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SPA_EXPORT
|
||||||
|
struct pw_loop *pw_stream_get_data_loop(struct pw_stream *stream)
|
||||||
|
{
|
||||||
|
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||||
|
return impl->data_loop;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_trigger_deprecated(struct spa_loop *loop,
|
do_trigger_deprecated(struct spa_loop *loop,
|
||||||
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
||||||
|
|
|
@ -447,7 +447,7 @@ pw_stream_new(struct pw_core *core, /**< a \ref pw_core */
|
||||||
struct pw_properties *props /**< stream properties, ownership is taken */);
|
struct pw_properties *props /**< stream properties, ownership is taken */);
|
||||||
|
|
||||||
struct pw_stream *
|
struct pw_stream *
|
||||||
pw_stream_new_simple(struct pw_loop *loop, /**< a \ref pw_loop to use */
|
pw_stream_new_simple(struct pw_loop *loop, /**< a \ref pw_loop to use as the main loop */
|
||||||
const char *name, /**< a stream media name */
|
const char *name, /**< a stream media name */
|
||||||
struct pw_properties *props,/**< stream properties, ownership is taken */
|
struct pw_properties *props,/**< stream properties, ownership is taken */
|
||||||
const struct pw_stream_events *events, /**< stream events */
|
const struct pw_stream_events *events, /**< stream events */
|
||||||
|
@ -536,6 +536,10 @@ int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t
|
||||||
* the pw_time_now value. Since 1.1.0 */
|
* the pw_time_now value. Since 1.1.0 */
|
||||||
uint64_t pw_stream_get_nsec(struct pw_stream *stream);
|
uint64_t pw_stream_get_nsec(struct pw_stream *stream);
|
||||||
|
|
||||||
|
/** Get the data loop that is doing the processing of this stream. This loop
|
||||||
|
* is assigned after pw_stream_connect(). * Since 1.1.0 */
|
||||||
|
struct pw_loop *pw_stream_get_data_loop(struct pw_stream *stream);
|
||||||
|
|
||||||
/** Query the time on the stream, deprecated since 0.3.50,
|
/** Query the time on the stream, deprecated since 0.3.50,
|
||||||
* use pw_stream_get_time_n() to get the fields added since 0.3.50. */
|
* use pw_stream_get_time_n() to get the fields added since 0.3.50. */
|
||||||
SPA_DEPRECATED
|
SPA_DEPRECATED
|
||||||
|
|
Loading…
Reference in a new issue