mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
stream: remove useless size on input streams
Setting the size on input stream buffers based on the elapsed ticks does not give a meaningfull value for the queue size so just leave it to the user to set the size field.
This commit is contained in:
parent
d9a18742f4
commit
1d0ce27005
2 changed files with 5 additions and 13 deletions
|
|
@ -717,12 +717,9 @@ static int impl_node_process_input(void *object)
|
|||
struct pw_stream *stream = &impl->this;
|
||||
struct spa_io_buffers *io = impl->io;
|
||||
struct buffer *b;
|
||||
uint64_t size;
|
||||
|
||||
size = impl->time.ticks - impl->dequeued.incount;
|
||||
|
||||
pw_log_trace(NAME" %p: process in status:%d id:%d ticks:%"PRIu64" delay:%"PRIi64" size:%"PRIi64,
|
||||
stream, io->status, io->buffer_id, impl->time.ticks, impl->time.delay, size);
|
||||
pw_log_trace(NAME" %p: process in status:%d id:%d ticks:%"PRIu64" delay:%"PRIi64,
|
||||
stream, io->status, io->buffer_id, impl->time.ticks, impl->time.delay);
|
||||
|
||||
if (io->status != SPA_STATUS_HAVE_DATA)
|
||||
goto done;
|
||||
|
|
@ -730,8 +727,6 @@ static int impl_node_process_input(void *object)
|
|||
if ((b = get_buffer(stream, io->buffer_id)) == NULL)
|
||||
goto done;
|
||||
|
||||
b->this.size = size;
|
||||
|
||||
/* push new buffer */
|
||||
if (push_queue(impl, &impl->dequeued, b) == 0)
|
||||
call_process(impl);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ struct pw_stream;
|
|||
|
||||
/** \enum pw_stream_state The state of a stream \memberof pw_stream */
|
||||
enum pw_stream_state {
|
||||
PW_STREAM_STATE_ERROR = -1, /**< the strean is in error */
|
||||
PW_STREAM_STATE_ERROR = -1, /**< the stream is in error */
|
||||
PW_STREAM_STATE_UNCONNECTED = 0, /**< unconnected */
|
||||
PW_STREAM_STATE_CONNECTING = 1, /**< connection is in progress */
|
||||
PW_STREAM_STATE_PAUSED = 2, /**< paused */
|
||||
|
|
@ -164,11 +164,8 @@ enum pw_stream_state {
|
|||
struct pw_buffer {
|
||||
struct spa_buffer *buffer; /**< the spa buffer */
|
||||
void *user_data; /**< user data attached to the buffer */
|
||||
uint64_t size; /**< For input streams, this field is set by pw_stream
|
||||
* with the duration of the buffer in ticks.
|
||||
* For output streams, this field is set by the user.
|
||||
* This field is added for all queued buffers and
|
||||
* returned in the time info. */
|
||||
uint64_t size; /**< This field is set by the user and the sum of
|
||||
* all queued buffer is returned in the time info */
|
||||
};
|
||||
|
||||
struct pw_stream_control {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue