[Speex-dev] In-band user data
Jean-Marc Valin
jean-marc.valin at usherbrooke.ca
Mon Jul 9 22:05:40 PDT 2007
Thorvald Natvig a écrit :
> I'm moving my "metadata" which accompanies some of the speech packets
> into the speex bits. However, as usual, I'm a bit confused.
>
> The manual (PDF from current SVN), section 5.10 (bottom of page 21)
> states that:
>
> "Finally, applications may define custom in-band messages using mode 13.
> The size of the message in bytes is encoded with
> 5 bits, so that the decoder can skip it if it doesn’t know how to
> interpret it."
...
> Looking at the code in speex_callbacks.c, it seems the
> speex_default_user_handler first unpacks 4 bits as size, then advances
> 8*size + 5 bits.
> First of all, shouldn't that be 5 bits for size (to match manual)? And
> where did that '+ 5 bits' come from?
I think I messed up (at least twice!) here and you're probably the first
to attempt to use this feature. Let me have a closer look at what it
should really be.
> 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 :)
Peter's earlier answer is correct here.
Jean-Marc
More information about the Speex-dev
mailing list