[opus] multi stream decode
Audric Ackermann
audric.bilb at gmail.com
Tue Dec 18 07:21:53 PST 2012
Hi,
I don't understand how works the multi stream api in opus.
I need to send two mono streams over network with RTP.
I think I'm right when I create an OpusMsDecoder with
opus_multistream_decoder_create (48000, 2, 2 ,0 ,mapping, NULL)
where mapping is: unsigned char mapping[2] = {0,1} isn't it ?
Next, i need to encode data which I get from jack (float) so I use
opus_multistream_encode_float(enc, data, 480 , encodedData, MAX_DATA)
Then I send it using RTP.
My question is how can I make the opposite in the client.
I created my decoder with
m_decoder = opus_multistream_decoder_create (48000, 2, 2 ,0,mapping,NULL)
and
unsigned char mapping[2] = {0,1};
Currently, I can read my RTP packet from network, and get data from it. I
need now to decode opus data to something readable for jack. I do it like
that :
opus_multistream_decode_float(m_decoder, data, len, decodedBuffer, BUFLEN,
0);
But how can I know the start of the two packets ?
Thanks for your help,
Audric Ackermann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20121218/190d3981/attachment.htm
More information about the opus
mailing list