2016-05-18 3 views
3

PJSIP/PJSUA2 documentationによれば、オーディオデータを取得/送信する方法は、ファイルとの間でデータの書き込み/読み取りを行うAudioMediaRecorder/AudioMediaPlayerを使用することです。PJSIP/PJSUA2 - ストリームAudioMediaPlayer/AudioMediaRecorder

ストリームとバッファでこれを行う方法はありますか?

+1

JMRが言ったように、それは[pjmedia_aud_stream]を使用してそのようなことを行うことが可能と思われる(http://www.pjsip.org/pjmedia/docs/html/structpjmedia__aud__stream.htm) (more info [here](http://www.pjsip.org/pjmedia/docs/html/group__audio__device__api.htm)) – nicolaspanel

+0

あなたのコメントに応じて私の回答を更新しました。 – JMR

+0

私の答えが何らかの形で助けてくれれば、その答えを矛盾として受け入れることができます。 – JMR

答えて

-2

このようなサービスをお望みですか?http://www.pjsip.org/pjmedia/docs/html/page_pjmedia_samples_playfile_c.htm

ユーザーにより示唆されるように

--Updated--

ソリューション:

http://www.pjsip.org/pjmedia/docs/html/group__audio__device__api.htm

オーディオストリームを開始するには、次のストリームを停止するには

status = pjmedia_aud_stream_start(stream); 

を:

status = pjmedia_aud_stream_stop(stream); 

ストリームを破壊する:

status = pjmedia_aud_stream_destroy(stream); 

Info: The following shows how to retrieve the capability value of the stream (in this case, the current output volume setting). 
// Volume setting is an unsigned integer showing the level in percent. 
unsigned vol; 
status = pjmedia_aud_stream_get_cap(stream, 
PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, 
&vol); 
Info: And following shows how to modify the capability value of the stream (in this case, the current output volume setting). 
// Volume setting is an unsigned integer showing the level in percent. 
unsigned vol = 50; 
status = pjmedia_aud_stream_set_cap(stream, 
PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, 
&vol); 
+0

いいえ、全体のポイントは、ファイルの代わりにストリームを使用してオーディオデータを取得/送信することです。とにかくありがとうございました! – nicolaspanel

+0

http://www.pjsip.org/pjmedia/docs/html/group__audio__device__api.htmこれを見て、多分あなたを助けることができます。 「オーディオストリームの操作」 – JMR