Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

aubuf: add AUBUF_FILE mode #117

Merged
merged 2 commits into from
Dec 23, 2022
Merged

aubuf: add AUBUF_FILE mode #117

merged 2 commits into from
Dec 23, 2022

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Dec 22, 2022

Dropping old frames on first read is not practicable for the file play
use-case.

Dropping old frames on first read is not practicable for the file play
use-case.
@sreimers
Copy link
Member

sreimers commented Dec 22, 2022

Is a new mode necessary? ab->wish_sz/min_sz = 0 should do the same right?

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Dec 22, 2022

A positive wish_sz might also help to achieve a stable start of a file playback.
The play.c in baresip can be simplified if we introduce the AUBUF_FILE mode. Concretely, the minsz stuff can be removed from play.c:
baresip/baresip@0ece152#diff-b2feb29ef04159a46a64332fe2dc2f064fb4167d9623c87f2c82109038f1e321L350

@sreimers
Copy link
Member

Maybe a more generic mode name like AUBUF_STREAM is better (and file reading/writing as a use case example comment)?

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Dec 23, 2022

Maybe a more generic mode name like AUBUF_STREAM is better (and file reading/writing as a use case example comment)?

It is stream vs file. But again was thinking about this. We should not mix the mode with this feature. The last commit adds a "live" flag. This was inspired by gstreamers "is-live" flag in element audiotestsrc.

@sreimers sreimers merged commit 39a3e0b into baresip:main Dec 23, 2022
@cspiel1 cspiel1 deleted the aubuf_file_mode branch December 23, 2022 11:05
@cspiel1
Copy link
Collaborator Author

cspiel1 commented Dec 23, 2022

Thanks for review and merging this!
This one is related: baresip/baresip#2363

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants