您可以通过API接口来获取当前显示视频的大小,然后根据视频大小来调整Surface的大小:
|
您好,看了您的附图,如果按您的设想全屏显示的话,则所显示的视频会失真(变形),目前的黑边是SDK加上的,具体您可以参考com.bairuitech.anychat\AnyChatVideoHelper.java,是有关视频显示部分的代码。 主要原因是您视频显示区域(Surface)的大小和视频原始的大小不匹配造成的。 |
这次的登录日志 [2014-09-16 15:54:10(264)] ---------------------------AnyChat Platform Core SDK Client Log--------------------------- [2014-09-16 15:54:10(265)] Load libanychatcore.so success!(V5.1 Build Time:Sep 1 2014 02:08:04) [2014-09-16 15:54:10(266)] Android OS SDK Version:18, Support ARMv7:2, Support Neon:4 [2014-09-16 15:54:10(300)] Load libmediautil_v7.so success!(V5.1 Build Time:Sep 1 2014 02:09:05) [2014-09-16 15:54:10(313)] Load libmediashow_4.0.so failed,video display functions will fail!(dlopen failed: cannot locate symbol "_ZN7android7Surface7isValidEv" referenced by "libmediashow_4.0.so"...) [2014-09-16 15:54:10(333)] dlopen failed: cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_7SurfaceEEE" referenced by "libmediacore_4.2.so"... [2014-09-16 15:54:10(335)] Load libmediacore.so success!(V5.1 Build Time:Sep 1 2014 02:08:33) [2014-09-16 15:54:10(336)] CPU:38.40 MIPS, Hardwareualcomm MSM 8226 (Flattened Device Tree) [2014-09-16 15:54:10(998)] Invoke BRAC_Release Elapse:31 ms |
[2014-09-16 15:43:20(768)] ---------------------------AnyChat Platform Core SDK Client Log--------------------------- [2014-09-16 15:43:20(769)] Load libanychatcore.so success!(V5.1 Build Time:Sep 1 2014 02:08:04) [2014-09-16 15:43:20(770)] Android OS SDK Version:18, Support ARMv7:2, Support Neon:4 [2014-09-16 15:43:20(810)] Load libmediautil_v7.so success!(V5.1 Build Time:Sep 1 2014 02:09:05) [2014-09-16 15:43:20(827)] Load libmediashow_4.0.so failed,video display functions will fail!(dlopen failed: cannot locate symbol "_ZN7android7Surface7isValidEv" referenced by "libmediashow_4.0.so"...) [2014-09-16 15:43:20(845)] dlopen failed: cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_7SurfaceEEE" referenced by "libmediacore_4.2.so"... [2014-09-16 15:43:20(848)] Load libmediacore.so success!(V5.1 Build Time:Sep 1 2014 02:08:33) [2014-09-16 15:43:20(850)] CPU:38.40 MIPS, Hardwareualcomm MSM 8226 (Flattened Device Tree) [2014-09-16 15:43:22(275)] Invoke BRAC_Connect(demo.anychat.cn,8906)=0 [2014-09-16 15:43:22(276)] Invoke LoginServer(username=guo) [2014-09-16 15:43:22(371)] CheckClientSocketLink Connect(ip=121.199.51.198,port=8906) [2014-09-16 15:43:22(888)] Server version: V5.1(Build Time:2014-09-03 20:45:57, Server OS:Windows) [2014-09-16 15:43:23(092)] Message OnConnect(bSuccess:1, errorcode=0) [2014-09-16 15:43:23(759)] OnReceiveUserDefine(dwSrcUserId:0, dwTarUserId:-1, dwCommand:13, wParam:0, lParam:0, dwBufSize:212) [2014-09-16 15:43:23(781)] Message OnLoginSystem(userid=2789,errorcode=0,username=guo), msg deliver worked(0) [2014-09-16 15:43:23(811)] Load libmediashow_4.0.so failed,video display functions will fail!(dlopen failed: cannot locate symbol "_ZN7android7Surface7isValidEv" referenced by "libmediashow_4.0.so"...) [2014-09-16 15:43:23(987)] Connection to streaming media server successfully!(udp delay:87ms) [2014-09-16 15:43:24(012)] Apply video parameter:320x240, bitrate:150000, quality:3, gop:40, fps:10, preset:3, codec:0 [2014-09-16 15:43:24(013)] Invoke BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1) [2014-09-16 15:43:24(013)] Invoke SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1) [2014-09-16 15:43:24(013)] Invoke BRAC_SetSDKOption(BRAC_SO_CORESDK_USEHWCODEC=0) [2014-09-16 15:43:25(274)] Invoke EnterRoom(roomid=1) [2014-09-16 15:43:25(871)] Message OnEnterRoom(roomid=1,errorcode=0,siteindex=5) [2014-09-16 15:43:25(872)] Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver [2014-09-16 15:43:25(874)] Message OnReceiveOnlineUser(count=6,roomid=1) [2014-09-16 15:43:26(058)] socket error, disconnected by peer!, bTcp(1) - userid(2668) [2014-09-16 15:43:26(561)] Message OnP2PConnectState(userid=2668, state=2) [2014-09-16 15:43:26(591)] Message OnP2PConnectState(userid=-4076, state=1) [2014-09-16 15:43:26(734)] Message OnP2PConnectState(userid=-4076, state=3) [2014-09-16 15:43:27(883)] Invoke UserCameraControl(userid=2788,bOpen=1) [2014-09-16 15:43:27(883)] Invoke UserSpeakControl(userid=2788,bOpen=1) [2014-09-16 15:43:27(889)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:43:27(891)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:43:28(279)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:28(302)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:28(336)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:43:28(336)] Audio codec init, handle:2, 11, 1, 16000, 16, 15850 [2014-09-16 15:43:28(367)] userid(2788) video decode delay:21ms [2014-09-16 15:43:28(503)] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1 [2014-09-16 15:43:28(702)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:4 [2014-09-16 15:43:32(845)] Invoke UserCameraControl(userid=2788,bOpen=0) [2014-09-16 15:43:32(849)] Invoke UserSpeakControl(userid=2788,bOpen=0) [2014-09-16 15:43:32(857)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:43:32(857)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:43:53(283)] Invoke UserCameraControl(userid=2788,bOpen=1) [2014-09-16 15:43:53(283)] Invoke UserSpeakControl(userid=2788,bOpen=1) [2014-09-16 15:43:53(288)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:43:53(288)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:43:53(571)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:53(582)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:53(597)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:43:54(010)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:5 [2014-09-16 15:43:54(745)] userid(2788) video decode delay:25ms [2014-09-16 15:43:56(045)] Invoke UserCameraControl(userid=2788,bOpen=0) [2014-09-16 15:43:56(067)] Invoke UserSpeakControl(userid=2788,bOpen=0) [2014-09-16 15:43:56(068)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:43:56(068)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:43:57(772)] Invoke UserCameraControl(userid=-4079,bOpen=1) [2014-09-16 15:43:57(773)] Invoke UserSpeakControl(userid=-4079,bOpen=1) [2014-09-16 15:43:57(778)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:43:57(779)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:43:58(105)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:58(129)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:43:58(149)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:43:58(484)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:9 [2014-09-16 15:43:59(025)] userid(-4079) video decode delay:19ms [2014-09-16 15:44:06(810)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:44:06(816)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:44:06(822)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:44:06(823)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:44:13(260)] Invoke UserCameraControl(userid=-4079,bOpen=1) [2014-09-16 15:44:13(261)] Invoke UserSpeakControl(userid=-4079,bOpen=1) [2014-09-16 15:44:13(261)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:44:13(261)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:44:13(574)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:44:13(612)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:44:13(630)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:44:13(979)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:12 [2014-09-16 15:44:16(126)] userid(-4079) video decode delay:19ms [2014-09-16 15:44:24(132)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:44:24(138)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:44:24(150)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:44:24(150)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:44:34(552)] Invoke UserCameraControl(userid=-4079,bOpen=1) [2014-09-16 15:44:34(553)] Invoke UserSpeakControl(userid=-4079,bOpen=1) [2014-09-16 15:44:34(557)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:44:34(557)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:44:34(825)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:44:34(856)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:44:34(871)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:44:35(226)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:15 [2014-09-16 15:44:43(272)] userid(-4079) video decode delay:22ms [2014-09-16 15:45:04(519)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:45:04(521)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:45:04(524)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:45:04(524)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:45:18(754)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:45:18(755)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:45:18(755)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:45:18(756)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:45:23(075)] Invoke UserCameraControl(userid=-4079,bOpen=1) [2014-09-16 15:45:23(075)] Invoke UserSpeakControl(userid=-4079,bOpen=1) [2014-09-16 15:45:23(081)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:45:23(081)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:45:23(367)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:45:23(399)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:45:23(411)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:45:23(796)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:18 [2014-09-16 15:45:28(228)] userid(-4079) video decode delay:14ms [2014-09-16 15:45:30(102)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:45:30(104)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:45:30(107)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:45:30(108)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:45:49(511)] Invoke UserCameraControl(userid=-4079,bOpen=1) [2014-09-16 15:45:49(512)] Invoke UserSpeakControl(userid=-4079,bOpen=1) [2014-09-16 15:45:49(515)] Invoke UserCameraControl(userid=-1,bOpen=1) [2014-09-16 15:45:49(515)] Invoke UserSpeakControl(userid=-1,bOpen=1) [2014-09-16 15:45:49(799)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:45:49(840)] video init finish:320x240, NV21, fps:25 [2014-09-16 15:45:49(865)] Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0 [2014-09-16 15:45:50(199)] video codec init:codec:1, 10fps, 320x240, bitrate:150000, quality:3, preset:3, gop:40, handle:21 [2014-09-16 15:45:50(232)] socket error, disconnected by peer!, bTcp(1) - userid(2668) [2014-09-16 15:46:06(932)] userid(-4079) video decode delay:27ms [2014-09-16 15:46:12(639)] Invoke UserCameraControl(userid=-4079,bOpen=0) [2014-09-16 15:46:12(641)] Invoke UserSpeakControl(userid=-4079,bOpen=0) [2014-09-16 15:46:12(659)] Invoke UserCameraControl(userid=-1,bOpen=0) [2014-09-16 15:46:12(660)] Invoke UserSpeakControl(userid=-1,bOpen=0) [2014-09-16 15:46:48(051)] Invoke LeaveRoom(roomid=-1) Elapse:102 ms [2014-09-16 15:46:48(909)] Invoke LogoutServer(userid=2789) Elapse:4 ms [2014-09-16 15:46:48(930)] Invoke BRAC_Release Elapse:20 ms |
您好,请将SD卡根目录下的日志文件BRAnyChatCore.log上传,我们看一下您所使用的SDK版本信息,谢谢。 |
Archiver|手机版|AnyChat ( 粤ICP备13022410号-1 )
GMT+8, 2024-11-23 21:40 , Processed in 0.143821 second(s), 26 queries .
Powered by Discuz! X3
© 2001-2013 Comsenz Inc.