48 lines
1.9 KiB
C
48 lines
1.9 KiB
C
|
#pragma once
|
|||
|
#include <Windows.h>
|
|||
|
#include <string>
|
|||
|
#include <mmeapi.h>
|
|||
|
// 取一帧视频对应的音频数据n
|
|||
|
int Audio_share_memory_get_oneframe(unsigned char* pAudiobuffer_per, LPVOID pAudio_Memory);
|
|||
|
|
|||
|
|
|||
|
// 取一帧视频数据
|
|||
|
int Video_share_memory_get_oneframe(unsigned char* pVideobuffer_per, LPVOID pVideo_Memory);
|
|||
|
|
|||
|
//取當前的共享內存中的索引
|
|||
|
DWORD Index_share_memory_get_cur_index(LPVOID pIndex_Memory);
|
|||
|
|
|||
|
//获得当前正在播放的视频对应的index
|
|||
|
DWORD get_cur_play_video_index();
|
|||
|
|
|||
|
//将当前播放视频的index 写入到读共享内存中
|
|||
|
//这个index值为:0,1,2,3。。。。124 ,没帧对应的时长为 40毫秒
|
|||
|
void Bota_Video_Read_share_memory_set_cur_index(LPVOID pRead_Memory);
|
|||
|
|
|||
|
//設置的共享內存中的索引,蔣當前的值/6400,如為2,則表示第二個0.2秒的音視頻都好了
|
|||
|
void Index_share_memory_set_cur_index(DWORD curIndex);
|
|||
|
|
|||
|
//當前的index知道的共享內存中的data是否已經播放完
|
|||
|
BOOL current_index_data_is_played_over(DWORD curIndex);
|
|||
|
|
|||
|
// 取一帧视频图片数据对应mask图片数据,没有内存拷贝
|
|||
|
unsigned char* Mask_share_memory_get_oneframe_Ex(LPVOID pMask_Memory);
|
|||
|
// 取一帧视频数据
|
|||
|
unsigned char* Video_share_memory_get_oneframe_Ex(LPVOID pVideo_Memory);
|
|||
|
|
|||
|
// 获得当前readindex视频对应的音频数据,没有内存拷贝
|
|||
|
unsigned char* Audio_share_memory_get_oneframe_Ex(LPVOID pAudio_Memory, LPVOID pEndFlag_Memory);
|
|||
|
|
|||
|
// 获得当前readindex视频对应的SpeechId
|
|||
|
std::string Speech_Id_Cache_get_oneframe_Ex(LPVOID pAudio_Memory);
|
|||
|
|
|||
|
//从音频共享内存中区中区一帧视频对应的音频数据,播放(这里是异步的)
|
|||
|
int audio_one_frame_play_Ex(HWAVEOUT hwo, unsigned char* paudioData, DWORD dwBufferLength);
|
|||
|
|
|||
|
//判断当前播放帧的位置是否在内存中的位置的前面,则是服务端慢了
|
|||
|
BOOL Server_is_slow(DWORD curIndex, DWORD memIndex);
|
|||
|
|
|||
|
//读的index + 1
|
|||
|
void Memory_read_index_add();
|
|||
|
|