设为首页收藏本站

AnyChat技术支持论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 2541|回复: 3
打印 上一主题 下一主题

取不到本地的摄像头名称

[复制链接]

4

主题

14

帖子

46

积分

新手上路

Rank: 1

积分
46
跳转到指定楼层
楼主
发表于 2014-10-18 15:25:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
BRAC_GetCurVideoCapture 返回的数值也是0,是成功的,但是本地的摄像头的名称取不到。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

249

主题

2967

帖子

9076

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9076
沙发
发表于 2014-10-18 20:51:09 | 只看该作者
回复 支持 反对

使用道具 举报

1

主题

6

帖子

29

积分

新手上路

Rank: 1

积分
29
板凳
发表于 2014-10-22 20:44:18 | 只看该作者
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   DeviceName:Array[0..10] of PAnsiChar;
  4.   DeviceNum:LongWord;
  5.   i:Integer;
  6.   szVideoDeviceName:Array[0..1023] of AnsiChar;
  7.   n:Integer;
  8.   dwLen:DWORD;
  9. begin
  10.   ZeroMemory(@DeviceName,sizeof(DeviceName));
  11.   DeviceNum:=10;
  12.   if BRAC_EnumVideoCapture(@DeviceName,DeviceNum)=GV_ERR_SUCCESS then
  13.   begin
  14.     Self.ComboBox1.Items.Clear;
  15.     for i := 0 to DeviceNum-1 do
  16.     begin
  17.       if Assigned(DeviceName[i]) then
  18.                   begin
  19.                           Self.ComboBox1.Items.Add(StrPas(DeviceName[i]));
  20.         GlobalFree(HGLOBAL(DeviceName[i]));
  21.                           DeviceName[i] := nil;
  22.                   end;
  23.     end;

  24.     dwLen:=Sizeof(szVideoDeviceName);
  25.     ZeroMemory(@szVideoDeviceName,dwLen);
  26.     if BRAC_GetCurVideoCapture(szVideoDeviceName,dwLen)=GV_ERR_SUCCESS then
  27.     begin
  28.       n:=Self.ComboBox1.Items.IndexOf(StrPas(szVideoDeviceName));
  29.     end;
  30.   end;
  31. end;
复制代码
所用的开发工具 Delphi XE2,枚举视频设备能得到正确的返回,取当前的视频设备返回的名称是空
回复 支持 反对

使用道具 举报

1

主题

6

帖子

29

积分

新手上路

Rank: 1

积分
29
地板
发表于 2014-10-22 21:20:13 | 只看该作者
附日志内容

[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
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|AnyChat ( 粤ICP备13022410号-1 )  

GMT+8, 2024-4-28 07:06 , Processed in 0.176718 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表