| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- // libvideorecord.cpp : 定义 DLL 应用程序的导出函数。
- //
- #include "libvideorecord.h"
- #include "libvideorecord_impl.h"
- // 这是已导出类的构造函数。
- // 有关类定义的信息,请参阅 libvideorecord.h
- Clibvideorecord::Clibvideorecord(bool *pResult, CHostApi *pHostAPI, const char* audioqueuename, const char* videoqueuename, const char* videoqueue2name, const char* salesaudioqueuename, const char* remotevideoqueuename, const char* remoteaudioqueuename)
- {
- m_pImpl = new libvideorecord_impl(pResult,pHostAPI,audioqueuename,videoqueuename,videoqueue2name,salesaudioqueuename,remotevideoqueuename,remoteaudioqueuename);
- return;
- }
- Clibvideorecord::~Clibvideorecord()
- {
- delete m_pImpl;
- return;
- }
- bool Clibvideorecord::StartVideoRecord(
- int fps,
- int videoquality,
- eVideoFormat eFormat,
- Rvc_RecordAudioParam_t* pAudioParam,
- SubtitleParam *subtitleParam /* = NULL */,
- bool bWholeSection /* = false */,
- bool bSessionManage /* = false */,
- const char *pathname /* = NULL */,
- int pathlength /* = 0 */,
- const char *filename /* = NULL */,
- int filenamelength /* = 0 */
- )
- {
- return m_pImpl->StartVideoRecord(fps, videoquality, eFormat, subtitleParam, bWholeSection, bSessionManage, pathname, pathlength, filename, filenamelength, pAudioParam);
- }
- bool Clibvideorecord::StopVideoRecord() //退出
- {
- return m_pImpl->StopVideoRecord();
- }
- void Clibvideorecord::CloseVideoFile() //结束当前录像
- {
- m_pImpl->m_bCloseVideo = true;
- }
- bool Clibvideorecord::PauseRecord() //暂停录像
- {
- return m_pImpl->PauseRecord();
- }
- bool Clibvideorecord::ContinueRecord() //继续录像
- {
- return m_pImpl->ContinueRecord();
- }
- bool Clibvideorecord::ReNameVideoFile(const char*newfilename)
- {
- m_pImpl->ChangeFilename(newfilename);
- return true;
- }
- bool Clibvideorecord::SetRightVideoWaterMark(const wchar_t* strWaterMark)
- {
- bool bRet = false;
- if (NULL == strWaterMark){
- return bRet;
- }
- size_t ulen = wcslen(strWaterMark);
- bRet = m_pImpl->setRightWaterMark(strWaterMark, ulen * sizeof(wchar_t));
- return bRet;
- }
|