我想在我的问答游戏中添加 sip 呼叫。所以,我通过这种方式构建了 SipHome 项目:
http://code.google.com/p/csipsimple/wiki/HowToBuild#Without_building_the_native_library
没关系。应用程序编译并启动。现在我想在我的应用程序上添加视频通话功能。结帐后(http://csipsimple.googlecode.com/svn/trunk/)我也有这个 SVN 依赖项:
CSipSimpleBranded
CSipSimpleCodecG729
CSipSimpleCodecPack
CSipSimpleVideoPlugin
我已将 CSipSimpleVideoPlugin 项目中的类PluginReceiver 、CaptureReceiver、PluginReceiverFfmpeg 和 PluginReceiverVpx放到SipHome项目中。而且我还把接收器的描述放到了SipHome manifest 项目中:
<receiver android:name=".plugins.video.PluginReceiver" >
<intent-filter>
<action android:name="com.csipsimple.plugins.action.REGISTER_VIDEO" />
</intent-filter>
<meta-data
android:name="lib_name"
android:value="libpj_video_android.so" />
<!-- For now it does not matter in the future we should have one per device, codec, and converter (if needed) -->
<meta-data
android:name="init_factory"
android:value="pjmedia_webrtc_vid_render_factory" />
</receiver>
<!--
Receiver for video capture
<receiver android:name=".plugins.video.CaptureReceiver" >
<intent-filter>
<action android:name="com.csipsimple.plugins.action.REGISTER_CAPTURE_VIDEO" />
</intent-filter>
<meta-data
android:name="lib_name"
android:value="libpj_screen_capture_android.so" />
<meta-data
android:name="init_factory"
android:value="pjmedia_webrtc_vid_capture_factory" />
</receiver>
-->
<receiver android:name=".plugins.video.PluginReceiverFfmpeg" >
<intent-filter>
<action android:name="com.csipsimple.codecs.action.REGISTER_VIDEO_CODEC" />
</intent-filter>
<meta-data
android:name="lib_name"
android:value="libpj_video_android.so" />
<meta-data
android:name="init_factory"
android:value="pjmedia_codec_ffmpeg_vid_init" />
<meta-data
android:name="deinit_factory"
android:value="pjmedia_codec_ffmpeg_vid_deinit" />
</receiver>
<receiver android:name=".plugins.video.PluginReceiverVpx" >
<intent-filter>
<action android:name="com.csipsimple.codecs.action.REGISTER_VIDEO_CODEC" />
</intent-filter>
<meta-data
android:name="lib_name"
android:value="libpj_vpx.so" />
<meta-data
android:name="init_factory"
android:value="pjmedia_codec_vpx_init" />
<meta-data
android:name="deinit_factory"
android:value="pjmedia_codec_vpx_deinit" />
</receiver>
我在登录后设置了 USE_VIDEO=true 标志:
prefProviderWrapper.setPreferenceBooleanValue(SipConfigManager.USE_VIDEO, true);
当我调用InCallActivity时,我看到了 VideoButton,但按下它后,我在 logcat 中有这个:
pjsua_vid.c .无法创建重新邀请:媒体行中没有 SDP 有效负载格式 (PJMEDIA_SDP_ENOFMT) [状态 = 220032]
并且视频不显示。
谢谢。