언어 설정

Menu
Sites
Language
Decode audio stream to the file.

Hello.

I wanna decode and write audiostream from internet to wav file.

I do httpRequest,then decode buffer and save it to a file.

ByteBuffer* pBuffer = pHttpResponse->ReadBodyN();

ByteBuffer *tempbyteBuffer = new ByteBuffer;
tempbyteBuffer->Construct(availableBodyLen);
r = decoder.Decode(*pBuffer, *tempbyteBuffer);

__wavFile.Write(*tempbyteBuffer);

 

But when i try to open file - it shows error message.

How to resolve this issue?

Thanks.

 

Edited by: Egor Chebotarev on 13 3월, 2014

Responses

2 댓글
Alex Dem

Hi,
But maybe all you need is to use Tizen::Media::Player::OpenUrlAsync     (url,    filePath,
listener,    pHeader) and store stream in file created before (path to the file is filePath param)
     filePath:     The file path on the local file system where the downloaded content is saved

Regarding how to decode look at this:
https://developer.tizen.org/dev-guide/2.2.0/org.tizen.native.apireference/classTizen_1_1Media_1_1AudioDecoder.html
And see mediaApp Native example also.

Alexey.

Egor Chebotarev

I saw it but have errors with it.

 

https://developer.tizen.org/dev-guide/2.2.0/org.tizen.native.apireference/classTizen_1_1Media_1_1AudioDecoder.html

 

  // Adds code handling decoded data // How to use decode data?