回呼函式如下:
我每次打開預覽影像的時候,都不會自動打開聲音,都要手動的去把電腦的音量打開才會有聲音,而且通過NET_DVR_SaveRealData函式保存在本地的錄像,打開只有畫面,沒有聲音,請大神們指點指點,謝謝了
procedure testRealDataCallBack_V30(lRealHandle: Longint; dwDataType: Longword; pBuffer: LPByte; dwBufSize: Longword; pUser:Pointer);stdcall;
begin
if dwDataType=NET_DVR_SYSHEAD then
begin
if (not(PlayM4_GetPort(@g_nPort))) then //獲取播放庫未使用的通道號
begin
Exit;
end;
if dwBufSize > 0 then
begin
if not(PlayM4_SetStreamOpenMode(g_nPort, STREAME_REALTIME)) then //設定實時流播放模式
begin
Exit;
end;
if not(PlayM4_OpenStream(g_nPort, pBuffer, dwBufSize, 1024*1024)) then //打開流介面
begin
Exit;
end;
if not(PlayM4_SetVolume(g_nPort,100)) then
begin
showmessage('PlayM4_SetVolume error');
Exit;
end;
if not(PlayM4_Play(g_nPort, Form1.Btn_Play_Wnd.Handle)) then
begin
Exit;
end;
if not (PlayM4_PlaySound(g_nPort)) then
begin
showmessage('PlayM4_PlaySound error');
Exit;
end;
end;
end;
if dwDataType = NET_DVR_STREAMDATA then
begin
if (dwBufSize > 0) and (g_nPort <> -1) then
begin
if not(PlayM4_InputData(g_nPort, pBuffer, dwBufSize)) then
begin
Exit
end;
end;
end;
end;
uj5u.com熱心網友回復:
我想學一下,我在調Net_dvr_realplay_30時出錯,給代碼學習一下。[email protected]
uj5u.com熱心網友回復:
海康設備 都有開發SDK 和 Demo 吧我每次打開預覽影像的時候,都不會自動打開聲音,都要手動的去把電腦的音量打開才會有聲音
這應該跟系統有關吧
uj5u.com熱心網友回復:
俺就奇怪,為啥不找廠商需求支持,它們會提供sdk及相應檔案的啊
uj5u.com熱心網友回復:
不要奇怪,廠商SDK檔案根本找不到相關說明uj5u.com熱心網友回復:
一樣的問題,一樣的疑惑uj5u.com熱心網友回復:
我也在做這塊,有一些小的成果,我們可以討論。。。我的qq1027833306uj5u.com熱心網友回復:

這個帖子還在呀,呵呵,一直沒鎖哈,看來海康二次開發的人比較多哈
uj5u.com熱心網友回復:
我也遇到這樣奇怪的問題,預覽的時候呼叫SDK播放聲音回呼成功,但就是沒聲音,樓主解決了沒?uj5u.com熱心網友回復:
前幾年我也做不過不是用delphi 的庫是 他們提供的 一樣也沒有聲音 只有影像 我也打電話問過唉。。。。。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/90319.html
