Chrome PNaCl で RTSP プレーヤーを作成したいと考えています。
ffmpeg NaCl ポートのbuild.shファイルに次のネットワーク フラグを含めて、ffmpeg naclport を正常にビルドしました。
--enable network --enable-protocols --enable-demuxer=rtsp --enable-demux=rtp --enable-demuxer=sdp --enable-decoder=h264
さらに、自分の PNaCl モジュールで ffmpeg NaCl ポートのコーディングとリンクに成功しました。manifest.json ファイルに次のネットワーク権限を含めました。
"permissions": [
{
"socket": [
"tcp-listen:*:*",
"tcp-connect:*:*",
"resolve-host:*:*",
"udp-bind:*:*",
"udp-send-to:*:*"
],
}
PNaCl で次のコードを実行すると、avformat_open_input(...) は -5 または I/O エラーを返します。
AVFormatContext* formatContext = avformat_alloc_context();
av_register_all();
avformat_network_init();
const char * stream_path = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";
int result = avformat_open_input(&formatContext, stream_path ,NULL,NULL);
if(result< 0){
PostMessage("input not opened, result: ");
PostMessage(result);
}else{
PostMessage(std::string("input successfully opened"));
}
PNaCl モジュールが RTSP ストリームにアクセスできないのはなぜですか?
PS。これは同様の質問ですが、決定的な答えはありません。