bluez5: media-sink: resync ISO streams on playback start

Resynchronize ISO streams on playback (re)start, so the stream positions
are aligned immediately.  This is better than relying on rate matching
to correct any offsets.
This commit is contained in:
Pauli Virtanen 2023-04-09 19:53:42 +03:00 committed by Wim Taymans
parent 261fb64849
commit 5d1782760c
3 changed files with 49 additions and 33 deletions

View file

@ -18,12 +18,14 @@
*/
struct spa_bt_iso_io
{
uint64_t now;
uint64_t duration;
uint64_t now; /**< Reference time position of next packet (read-only) */
uint64_t duration; /**< ISO interval duration in ns (read-only) */
bool resync; /**< Resync position for next packet; (pull callback sets to
* false when done) */
uint32_t timestamp;
uint8_t buf[4096];
size_t size;
uint32_t timestamp; /**< Packet timestamp (set by pull callback) */
uint8_t buf[4096]; /**< Packet data (set by pull callback) */
size_t size; /**< Packet size (set by pull callback) */
void *user_data;
};