ÉèΪÊ×Ò³Êղر¾Õ¾

AnyChat¼¼ÊõÖ§³ÖÂÛ̳

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á

QQ怬

Ö»ÐèÒ»²½£¬¿ìËÙ¿ªÊ¼

ËÑË÷
²é¿´: 28469|»Ø¸´: 3
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

2014-11-30 AnyChatÒôÊÓƵ¼ÖÆÕûÌå½â¾ö·½°¸

[¸´ÖÆÁ´½Ó]

249

Ö÷Ìâ

2967

Ìû×Ó

9108

»ý·Ö

¹ÜÀíÔ±

Rank: 9Rank: 9Rank: 9

»ý·Ö
9108
Ìøתµ½Ö¸¶¨Â¥²ã
Â¥Ö÷
    ÒôÊÓƵ¼ÖÆÊÇÒôÊÓƵ½â¾ö·½°¸ÖÐ×îÖØÒªµÄ¹¦ÄÜÌØÐÔÖ®Ò»£¬ÌرðÊÇһЩÐÐÒµÓ¦ÓÃÖÐÒôÊÓƵ¼ÖÆÊÇ×î»ù±¾µÄ¹¦ÄÜÐèÇó£¬AnyChat×÷Ϊҵ½çÒ»Á÷µÄ¿çƽ̨ÒôÊÓƵ½â¾ö·½°¸£¬ÔÚÒôÊÓƵ¼ÖÆ·½ÃæÒ²ÌṩÁ˷dz£ÍêÉƵÄÕûÌå½â¾ö·½°¸£¬¸ÅÀ¨ÆðÀ´ÓÐÈçÏÂÌص㣺

Ò»¡¢API½Ó¿Ú¶¨Òå
    AnyChatÔÚ¿Í»§¶ËÌṩµÄ¼ÖÆAPI½Ó¿ÚÓë»Øµ÷ʼþΪ£º
  1. // Óû§Òô¡¢ÊÓƵ¼ÖÆ£¨À©Õ¹£©
  2. BRAC_API DWORD BRAC_StreamRecordCtrlEx(DWORD dwUserId, BOOL bStartRecord, DWORD dwFlags, DWORD dwParam, LPCTSTR lpUserStr);

  3. // ¼Ïñ¡¢¿ìÕÕÈÎÎñÍê³ÉÀ©Õ¹»Øµ÷º¯Êý¶¨Òå
  4. typedef void (CALLBACK * BRAC_RecordSnapShotEx_CallBack)(DWORD dwUserId, LPCTSTR lpFileName, DWORD dwElapse, DWORD dwFlags, DWORD dwParam, LPCTSTR lpUserStr, LPVOID lpUserValue);
¸´ÖÆ´úÂë
AnyChatÔÚ·þÎñÆ÷¶ËÌṩµÄ¼ÖÆAPI½Ó¿ÚÓë»Øµ÷ʼþΪ£º
  1. // ÖÐÐĶ˼Ïñ¿ØÖÆ£¨À©Õ¹£©
  2. BRAS_API DWORD BRAS_StreamRecordCtrlEx(DWORD dwUserId, BOOL bStartRecord, DWORD dwFlags, DWORD dwParam, LPCTSTR lpUserStr=NULL, DWORD dwRecordServerId=-1);

  3. // ·þÎñÆ÷¼Ïñ»Øµ÷º¯Êý¶¨Ò壨À©Õ¹£©
  4. typedef void (CALLBACK * BRAS_OnServerRecordEx_CallBack)(DWORD dwUserId, LPCTSTR lpFileName, DWORD dwElapse, DWORD dwFlags, DWORD dwParam, LPCTSTR lpUserStr, DWORD dwRecordServerId, LPVOID lpUserValue);
¸´ÖÆ´úÂë
¶þ¡¢Â¼ÖÆAPIµ÷ÓÃ
    APIµÚÒ»¸ö²ÎÊý±íʾ¼ÖƶÔÏó£¬Ö¸Â¼ÖÆijһ¸öÓû§µÄÒôÊÓƵ£¬¶ÔÓںϳɼÖÆ£¬Ö»ÐèҪͨ¹ýµÚÈý¸ö²ÎÊý£¨dwFlags£©¼ÓÈëÌض¨µÄ±êÖ¾¼´¿ÉʵÏÖ¡£

    ¿ªÊ¼Â¼ÖÆÒÔ¼°Í£Ö¹Â¼Öƾùµ÷ÓÃͬһ¸öAPI½Ó¿Ú£¨Èç¿Í»§¶ËΪ£ºBRAC_StreamRecordCtrlEx£©£¬Í¨¹ýµÚ¶þ¸ö²ÎÊý£¨bStartRecord£©À´¿ØÖÆ£¬µ±bStartRecord=TRUE£¨1£©Ê±£¬±íʾ¿ªÊ¼Â¼ÖÆ£¬µ±bStartRecord=FALSE£¨0£©Ê±£¬±íʾֹͣ¼ÖÆ¡£

    µ±µ÷ÓÃAPI¿ªÊ¼Â¼ÖÆʱ£¬Ï൱ÓÚÏ´ïÁËÒ»¸ö¼ÖÆÈÎÎñ£¬AnyChatÄں˽«¿ªÊ¼Â¼ÖÆ£¬¿ÉÒÔÔÚ¿Í»§¶Ëµ÷ÓÃAPI£¨BRAC_QueryUserState£©À´²éѯ¼ÖÆ״̬£»Í¨¹ýµÚÈý¸ö²ÎÊý£¨dwFlags£©¿É¿ØÖƼÖÆÐÐΪ£ºÊÇÔÚ¿Í»§¶Ë¼ÖÆ£¬»¹ÊÇÔÚ·þÎñÆ÷¼ÖÆ£»ÊǼÖÆÒôƵ£¬»¹ÊÇÒôÊÓƵһͬ¼ÖÆ£»ÊǼÖƵ¥¸öÓû§£¬»¹ÊÇͨ»°Ë«·½ºÏ³É¼ÖƵȣ¬¾ßÌåÓ¦Óÿɲο¼ºóÐøµÄ¡°Â¼Öƹ¦ÄÜʾÀý¡±²¿·Ö¡£

    µ±µ÷ÓÃAPIֹͣ¼ÖÆʱ£¬AnyChatÄں˻á½áÊø¼ÖÆÈÎÎñ£¬Í¬Ê±´¥·¢ÉϲãÓ¦ÓõĻص÷ʼþ£¨Èç¿Í»§¶ËΪ£ºBRAC_RecordSnapShotEx_CallBack£©£¬Ôڻص÷ʼþÖУ¬½«Â¼ÖÆÎļþÃû£¨º¬Â·¾¶£©¡¢Â¼ÖÆʱ³¤¡¢Óû§×Ô¶¨Òå²ÎÊýµÈÐÅÏ¢·µ»Ø¸øÉϲãÓ¦Óá£

    AnyChatÄÚºËÌṩÁËÁ½¸ö×Ô¶¨Òå²ÎÊý£¬Ò»¸öÊÇÕûÐΣ¨dwParam£©£¬Ò»¸öÊÇ×Ö·û´®ÀàÐÍ£¨lpUserStr£©£¬ÔÚ¿ªÊ¼Â¼ÖÆ£¨»ò½áÊø¼ÖÆ£©Ê±Í¨¹ýAPI½Ó¿Ú´«È룬Èç¹û¿ªÊ¼Â¼ÖÆ¡¢½áÊø¼ÖƾùΪ´«È룬ÔòÒÔ½áÊø¼ÖÆʱµÄֵΪ׼£¬ÔÚ¼ÖÆÍê³É»Øµ÷ʼþÖзµ»Ø¸øÉϲãÓ¦Óã¬Èç¿ÉÒÔͨ¹ý×Ö·û´®ÀàÐÍ×Ô¶¨Òå²ÎÊýÀ´´«ÊäÒ»¸öÉϲãÓ¦ÓõÄÒµÎñÁ÷Ë®ºÅ£¬Ôò¿ÉÒÔʵÏÖÔڻص÷ʼþÖн«Â¼ÖƵÄÎļþÃûÓëÒµÎñÁ÷Ë®ºÅ½øÐйØÁª£¬±£´æÔÚÊý¾Ý¿âÖеȹ¦ÄÜ¡£

Èý¡¢Â¼Öƹ¦ÄÜʾÀý
ÏÂÃæÒÔJavaScript½Å±¾ÎªÀý£¬Õë¶Ô³£ÓõļÖƹ¦Äܸø³öʾÀý´úÂ룺

1¡¢¿Í»§¶Ë¶Ôµ¥¸öÓû§µÄÒôƵ¡¢ÊÓƵ½øÐмÖÆ£¬Â¼ÖÆΪMP4¸ñʽ
  1. BRAC_SetSDKOption(BRAC_SO_RECORD_FILETYPE, 0);    // ¼ÖÆΪMP4¸ñʽ
  2. var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO;
  3. BRAC_StreamRecordCtrlEx(userid, 1,  dwFlags, 0, "Hello, world!");
¸´ÖÆ´úÂë
2¡¢¿Í»§¶Ë¶Ôµ¥¸öÓû§µÄÒôƵ½øÐмÖÆ£¬Â¼ÖÆΪMP3¸ñʽ
  1. BRAC_SetSDKOption(BRAC_SO_RECORD_FILETYPE, 3);    // ¼ÖÆΪMP3¸ñʽ
  2. var dwFlags = ANYCHAT_RECORD_FLAGS_AUDIO;
  3. BRAC_StreamRecordCtrlEx(userid, 1,  dwFlags, 0, "Hello, world!");
¸´ÖÆ´úÂë
3¡¢¿Í»§¶Ë¶Ôͨ»°Ë«·½µÄÒôƵ¡¢ÊÓƵ½øÐмÖÆ£¬Â¼ÖÆΪMP4¸ñʽ£¬»­Öл­Ä£Ê½£º
  1. BRAC_SetSDKOption(BRAC_SO_RECORD_FILETYPE, 0);    // ¼ÖÆΪMP4¸ñʽ
  2. var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO;
  3. BRAC_StreamRecordCtrlEx(userid, 1,  dwFlags, 0, "Hello, world!");
¸´ÖÆ´úÂë
ËÄ¡¢ÆäËü
1¡¢¿Í»§¶Ë¿ÉÒÔͨ¹ýAPI£ºBRAC_SetSDKOption(BRAC_SO_RECORD_TMPDIR, path)À´ÉèÖüÏñÎļþ±£´æ·¾¶£»
2¡¢¿Í»§¶Ë¿ÉÒÔͨ¹ýAPI£ºBRAC_SetSDKOption(BRAC_SO_RECORD_VIDEOBR, bitrate)À´ÉèÖüÖÆÊÓƵµÄÖÊÁ¿£¬µ÷½Ú¼ÖÆÊÓƵµÄÇåÎú¶È£»
3¡¢ÓйؼÏñÎļþ¸ÄÃû£¬ÓÐÁ½ÖÖ·½Ê½À´ÊµÏÖ£º
        ·½Ê½Ò»£ºÂ¼ÖÆÍê³ÉÖ®ºó£¬AnyChat½«´¥·¢ÉϲãÓ¦ÓõļÖÆÍê³É»Øµ÷ʼþ£¬Ôڻص÷ʼþÖзµ»Ø¼ÖÆÎļþÃû£¨º¬Â·¾¶£©£¬ÉϲãÓ¦ÓÿÉÒÔÔڻص÷ʼþÖе÷ÓòÙ×÷ϵͳÌṩµÄÎļþ¸ÄÃûº¯Êý£¨ÈçWindowsƽ̨Ϊ£ºMoveFileº¯Êý£©¶ÔÎļþ½øÐиÄÃû²Ù×÷£»
        ·½Ê½¶þ£ºÀûÓÃAnyChat×Ô¶¨Òå¼ÏñÎļþÃûµÄ¹¦ÄÜ£¬ÔÚ¿ªÊ¼Â¼ÖÆʱ£¬Í¨¹ýlpUserStr²ÎÊý´«ÈëJson¸ñʽµÄ¼ÏñÎļþÃû£»
4¡¢ÓйؼÖÆÍê³É»Øµ÷ʼþÖС°lpUserStr¡±µÄÖµ£¬Èç¹û½áÊø¼ÖÆʱ£¬µ÷ÓÃAPI£ºBRAC_StreamRecordCtrlExÓд«ÈëlpUserStrµÄÖµ£¬Ôò»Øµ÷ÒÔ½áÊø¼ÖÆʱ´«ÈëֵΪ׼£¬·ñÔòÒÔ¿ªÊ¼Â¼ÖÆʱ´«ÈëֵΪ׼¡£


²Î¿¼£º
1¡¢ÓйØÖÐÐļÏñ·þÎñÆ÷²¿Êð¿É²Î¿¼£ºWindowsƽ̨ÖÐÐļÏñ·þÎñÆ÷²¿Êð¡¢Linuxƽ̨ÖÐÐļÏñ·þÎñÆ÷²¿Êð£»
2¡¢ÓйØÖÐÐļÏñ·þÎñÆ÷ÅäÖÃÏRecordRootURL¡¿µÄ˵Ã÷
3¡¢ÓйØÖÐÐļÏñ·þÎñÆ÷ÅäÖÃÏRecordCacheDir¡¿µÄ˵Ã÷







·ÖÏíµ½:  QQºÃÓѺÍȺQQºÃÓѺÍȺ QQ¿Õ¼äQQ¿Õ¼ä ÌÚѶ΢²©ÌÚѶ΢²© ÌÚѶÅóÓÑÌÚѶÅóÓÑ
ÊÕ²ØÊÕ²Ø3
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

249

Ö÷Ìâ

2967

Ìû×Ó

9108

»ý·Ö

¹ÜÀíÔ±

Rank: 9Rank: 9Rank: 9

»ý·Ö
9108
ɳ·¢
 Â¥Ö÷| ·¢±íÓÚ 2014-12-4 15:10:33 | Ö»¿´¸Ã×÷Õß

AnyChat¼Ïñ½â¾ö·½°¸Ö®¿Í»§¶ËºÏ³É¼ÏñÔ­Àíͼ

ÔÚ¿Í»§¶Ë½øÐÐÊÓƵºÏ³É£¬Â¼ÖÆÎļþ±£´æÔÚ¿Í»§¶Ë±¾µØ
  1. var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO;
¸´ÖÆ´úÂë

AnyChat¼Ïñ½â¾ö·½°¸Ö®¿Í»§¶ËºÏ³É¼ÏñÔ­Àíͼ.jpg (212.75 KB, ÏÂÔØ´ÎÊý: 5067)

AnyChat¼Ïñ½â¾ö·½°¸Ö®¿Í»§¶ËºÏ³É¼ÏñÔ­Àíͼ.jpg

249

Ö÷Ìâ

2967

Ìû×Ó

9108

»ý·Ö

¹ÜÀíÔ±

Rank: 9Rank: 9Rank: 9

»ý·Ö
9108
°åµÊ
 Â¥Ö÷| ·¢±íÓÚ 2014-12-4 15:31:41 | Ö»¿´¸Ã×÷Õß

AnyChat¼Ïñ½â¾ö·½°¸Ö®·þÎñÆ÷ºÏ³É¼ÏñÔ­Àíͼ

ÔÚ¼Ïñ·þÎñÆ÷ÉϽøÐÐÊÓƵºÏ³É£¨»áÕ¼Ó÷þÎñÆ÷ÔËËã×ÊÔ´£©£¬Â¼ÖÆÎļþ±£´æÔÚ·þÎñÆ÷
  1. var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO + ANYCHAT_RECORD_FLAGS_SERVER;
¸´ÖÆ´úÂë

AnyChat¼Ïñ½â¾ö·½°¸Ö®·þÎñÆ÷ºÏ³É¼ÏñÔ­Àíͼ.jpg (238.17 KB, ÏÂÔØ´ÎÊý: 4846)

AnyChat¼Ïñ½â¾ö·½°¸Ö®·þÎñÆ÷ºÏ³É¼ÏñÔ­Àíͼ.jpg

249

Ö÷Ìâ

2967

Ìû×Ó

9108

»ý·Ö

¹ÜÀíÔ±

Rank: 9Rank: 9Rank: 9

»ý·Ö
9108
µØ°å
 Â¥Ö÷| ·¢±íÓÚ 2014-12-4 15:33:27 | Ö»¿´¸Ã×÷Õß
ÔÚ¿Í»§¶Ë½øÐÐÊÓƵºÏ³É£¨²»Õ¼Ó÷þÎñÆ÷ÔËËã×ÊÔ´£©£¬¿Í»§¶ËÉÏ´«ºÏ³ÉºóµÄÒôÊÓƵÁ÷£¬Â¼Ïñ·þÎñÆ÷¶ÔÊÓƵÁ÷½øÐмÖÆ£¬Îļþ±£´æÔÚ·þÎñÆ÷¡£
  1. var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO + ANYCHAT_RECORD_FLAGS_SERVER + ANYCHAT_RECORD_FLAGS_STREAM;
¸´ÖÆ´úÂë

AnyChat¼Ïñ½â¾ö·½°¸Ö®ºÏ³ÉÁ÷¼ÏñÔ­Àíͼ.jpg (263.93 KB, ÏÂÔØ´ÎÊý: 4891)

AnyChat¼Ïñ½â¾ö·½°¸Ö®ºÏ³ÉÁ÷¼ÏñÔ­Àíͼ.jpg
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | Á¢¼´×¢²á

±¾°æ»ý·Ö¹æÔò

Archiver|ÊÖ»ú°æ|AnyChat ( ÔÁICP±¸13022410ºÅ-1 )  

GMT+8, 2024-11-24 02:05 , Processed in 0.180692 second(s), 28 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí