void AVIDump::Stop() { HandleDelayedPackets(); av_write_trailer(s_format_context); CloseVideoFile(); s_file_index = 0; NOTICE_LOG(VIDEO, "Stopping frame dump"); OSD::AddMessage("Stopped dumping frames"); }
WMERESULT CExternalRendererImp::SetVideoFile(const char *pFileName) { if(!pFileName) { CM_ERROR_TRACE_THIS("CFileCaptureEngineImp::SetVideoFile, invalid file name or video format "); return WME_E_INVALIDARG; } m_strFileName = pFileName; CloseVideoFile(); OpenVideoFile(); return WME_S_OK; }
bool AVIDump::Start(int w, int h) { s_pix_fmt = AV_PIX_FMT_RGBA; s_width = w; s_height = h; s_last_frame_is_valid = false; s_last_pts = 0; InitAVCodec(); bool success = CreateVideoFile(); if (!success) { CloseVideoFile(); OSD::AddMessage("AVIDump Start failed"); } return success; }
CExternalRendererImp::~CExternalRendererImp() { CloseVideoFile(); }