mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
bluez5: allow codecs to produce multiple packets from same data
Codecs may need to fragment a single encoder frame across multiple packets that are sent consecutively. Allow codec->encode() to set need_flush=NEED_FLUSH_FRAGMENT, so that sink should immediately call start_encode + encode with NULL input data, to produce the next packet. Previously, other return values than need_flush=1 were unused, so no need to bump codec ABI for this.
This commit is contained in:
parent
0cab700c06
commit
3d4eafcb0f
7 changed files with 66 additions and 6 deletions
|
|
@ -66,6 +66,12 @@ extern const char *codec_plugin_factory_name;
|
|||
#define A2DP_CODEC_DEFAULT_RATE 48000
|
||||
#define A2DP_CODEC_DEFAULT_CHANNELS 2
|
||||
|
||||
enum {
|
||||
NEED_FLUSH_NO = 0,
|
||||
NEED_FLUSH_ALL = 1,
|
||||
NEED_FLUSH_FRAGMENT = 2,
|
||||
};
|
||||
|
||||
struct a2dp_codec_audio_info {
|
||||
uint32_t rate;
|
||||
uint32_t channels;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue