AnyChat技术支持论坛
标题:
取不到本地的摄像头名称
[打印本页]
作者:
lelong
时间:
2014-10-18 15:25
标题:
取不到本地的摄像头名称
BRAC_GetCurVideoCapture 返回的数值也是0,是成功的,但是本地的摄像头的名称取不到。
作者:
admin
时间:
2014-10-18 20:51
您好,请参考:
http://bbs.anychat.cn/forum.php?mod=viewthread&tid=155
作者:
azuredragon
时间:
2014-10-22 20:44
procedure TForm1.Button1Click(Sender: TObject);
var
DeviceName:Array[0..10] of PAnsiChar;
DeviceNum:LongWord;
i:Integer;
szVideoDeviceName:Array[0..1023] of AnsiChar;
n:Integer;
dwLen:DWORD;
begin
ZeroMemory(@DeviceName,sizeof(DeviceName));
DeviceNum:=10;
if BRAC_EnumVideoCapture(@DeviceName,DeviceNum)=GV_ERR_SUCCESS then
begin
Self.ComboBox1.Items.Clear;
for i := 0 to DeviceNum-1 do
begin
if Assigned(DeviceName[i]) then
begin
Self.ComboBox1.Items.Add(StrPas(DeviceName[i]));
GlobalFree(HGLOBAL(DeviceName[i]));
DeviceName[i] := nil;
end;
end;
dwLen:=Sizeof(szVideoDeviceName);
ZeroMemory(@szVideoDeviceName,dwLen);
if BRAC_GetCurVideoCapture(szVideoDeviceName,dwLen)=GV_ERR_SUCCESS then
begin
n:=Self.ComboBox1.Items.IndexOf(StrPas(szVideoDeviceName));
end;
end;
end;
复制代码
所用的开发工具 Delphi XE2,枚举视频设备能得到正确的返回,取当前的视频设备返回的名称是空
作者:
azuredragon
时间:
2014-10-22 21:20
附日志内容
[2014-10-22 21:19:57(873)] ---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2014-10-22 21:19:57(877)] Load BRAnyChatCore.dll success!(V5.1 Build Time:Sep 14 2014 19:25:01)
[2014-10-22 21:19:57(893)] Load BRMiscUtil.dll success!(V5.1 Build Time:Sep 14 2014 19:23:17)
[2014-10-22 21:19:58(233)] Load BRMediaUtil.dll success!(V5.1 Build Time:Sep 14 2014 19:23:24)
[2014-10-22 21:19:58(241)] Load BRMediaShow.dll success!(V5.1 Build Time:Sep 14 2014 19:23:22)
[2014-10-22 21:19:58(300)] Load BRMediaCore.dll success!(V5.1 Build Time:Sep 14 2014 19:23:40)
[2014-10-22 21:19:58(483)] Invoke BRAC_Connect(video2.913399.com,14001)=0
[2014-10-22 21:19:58(500)] Invoke LoginServer(username=10000)
[2014-10-22 21:19:58(505)] Invoke EnterRoom(roomid=1)
[2014-10-22 21:19:58(571)] CheckClientSocketLink Connect(ip=121.199.43.135,port=14001)
[2014-10-22 21:19:58(806)] Server version: V4.8(Build Time:2013-12-02 20:18:03, Server OS:Windows)
[2014-10-22 21:19:58(813)] Message OnConnect(bSuccess:1, errorcode=0)
[2014-10-22 21:19:59(101)] Message OnLoginSystem(userid=10000,errorcode=0,username=10000), msg deliver worked(1)
[2014-10-22 21:19:59(167)] Connection to streaming media server successfully!(udp delay:31ms)
[2014-10-22 21:19:59(190)] Message OnEnterRoom(roomid=1,errorcode=0,siteindex=0)
[2014-10-22 21:19:59(194)] Message OnReceiveOnlineUser(count=1,roomid=1)
[2014-10-22 21:19:59(593)] WaveIn Audio Capture Driver(麦克风 (Realtek High Definition)
[2014-10-22 21:19:59(600)] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
[2014-10-22 21:19:59(608)] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
[2014-10-22 21:19:59(659)] Audio Playback Device Init(0, 1, 16000, 16), WaveOut Playback Driver
[2014-10-22 21:20:02(132)] Invoke BRAC_SetVideoPos(dwUserId:-1, hWnd:0x1d14b6, l:0, t:0, r:240, b:180)
[2014-10-22 21:20:02(139)] Invoke UserCameraControl(userid=-1,bOpen=-1)
[2014-10-22 21:20:03(383)] MinCroppingSize(640, 480) MaxCroppingSize(640, 480) Format(YUY2, 0x32595559)
[2014-10-22 21:20:03(390)] MinCroppingSize(640, 480) MaxCroppingSize(640, 480) Format(YUY2, 0x8d2681)
[2014-10-22 21:20:03(398)] MinCroppingSize(320, 240) MaxCroppingSize(320, 240) Format(YUY2, 0x32595559)
[2014-10-22 21:20:03(404)] MinCroppingSize(320, 240) MaxCroppingSize(320, 240) Format(YUY2, 0x8d2681)
[2014-10-22 21:20:03(410)] MinCroppingSize(176, 144) MaxCroppingSize(176, 144) Format(YUY2, 0x32595559)
[2014-10-22 21:20:03(419)] MinCroppingSize(176, 144) MaxCroppingSize(176, 144) Format(YUY2, 0x8d2681)
[2014-10-22 21:20:03(424)] MinCroppingSize(160, 120) MaxCroppingSize(160, 120) Format(YUY2, 0x32595559)
[2014-10-22 21:20:03(432)] MinCroppingSize(160, 120) MaxCroppingSize(160, 120) Format(YUY2, 0x8d2681)
[2014-10-22 21:20:03(437)] MinCroppingSize(640, 480) MaxCroppingSize(640, 480) Format(YUY2, 0x32595559)
[2014-10-22 21:20:03(444)] MinCroppingSize(640, 480) MaxCroppingSize(640, 480) Format(YUY2, 0x8d2681)
[2014-10-22 21:20:03(451)] Video Config Size(320, 240) Format(YUY2, 25fps)
[2014-10-22 21:20:03(552)] video init finish:320x240, YUY2, fps:25
[2014-10-22 21:20:05(425)] video codec init:codec:1, 15fps, 320x240, bitrate:60000, quality:3, preset:3, gop:60, handle:2
欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/)
Powered by Discuz! X3