[Speex-dev] In-band user data
Jean-Marc Valin
jean-marc.valin at usherbrooke.ca
Tue Jul 10 07:13:06 PDT 2007
>>> Next, and slightly unrelated question:
>>> Why does
>>> int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket
>>> *packet, spx_int32_t *start_offset);
>>> include the packet parameter? It's not used in the code, and it also
>>> makes the API slightly confusing as it's very unclear what that
>>> parameter should be :)
>>>
>>
>> The packet parameter is included to allow coming up iterations of the
>> jitter-buffer to improve the perceived quality by changing the packet,
>> without changing the API.
>>
> Ah, so the data in the jitter buffer should still be a pure speex
> packet? I thought one of the reasons for moving away from
> speex_jitter_blabla was to make the jitter buffer more generic? I'm
> currently using 1 byte before the packet for metadata which accompanies
> each and every packet. I could move that to in-band user data as well,
> but that would mean it's 2 bytes instead of 1 :(
There's nothing speex-specific with jitter_buffer_update_delay(). The
packet data is treated as raw bytes. The reason you pass it is that (in
the future), jitter_buffer_update_delay() can actually change the data
you got from the last get() call. But if you don't like that, you can
always pass NULL and you'll be fine.
Jean-Marc
More information about the Speex-dev
mailing list