📄 file_capture_decoder.h
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file file_capture_decoder.h
*
* $Revision: 1.22 $
*
* File Capture Decoder - provides a sample decoder which captures all decode
* data and writes it to a file.
*
*/
#ifndef __FILE_CAPTURE_DECODER_H
#define __FILE_CAPTURE_DECODER_H
#include <stdio.h>
#include "decoder.h"
#include "error.h"
/********************************************************************************
FileCaptureDecoder class
********************************************************************************/
class FileCaptureDecoder : public Decoder
{
private:
const char* m_name;
uint32 m_threadId;
volatile BOOLEAN m_threadExitRequest;
volatile BOOLEAN m_receivedDataFlag;
uint32 m_statusUpdateThreshold;
uint32 m_numberOfBuffersReceived;
uint32 m_numberOfBuffersAvailableToRelease;
uint64 m_numberOfBytesReceived;
uint64 m_numberOfBytesReceviedSinceLastUserNotification;
FILE_HANDLE m_fileHandle;
uint32 m_sequenceNumber;
DECODER_SETTINGS_TYPE m_decoderSettings;
uint32 m_video_pts;
uint32 m_audio_pts;
uint32 m_video_stc;
uint32 m_audio_stc;
VDVD_ERROR CloseOutputFile ( void );
public:
friend ULONG FileCaptureDecoderThread ( void* parameter );
FileCaptureDecoder ( void );
VDVD_ERROR Create ( const char* name );
VDVD_ERROR Destroy ( void );
VDVD_ERROR Setup ( DECODER_SETTINGS_TYPE* settings );
VDVD_ERROR SetPlayRate ( PE_ISTREAMCTRL_PLAYRATE* playRate );
VDVD_ERROR Stop ( BOOLEAN holdPicture );
VDVD_ERROR Pause ( void );
VDVD_ERROR Resume ( void );
VDVD_ERROR Flush ( DECODER_TYPE decoderType, DECODE_FLUSH_MODE flushMode );
VDVD_ERROR SendData ( void* buffer, uint32 bufferSize );
VDVD_ERROR ProcessEndOfStream ( void );
VDVD_ERROR GetStatus ( DECODE_STATUS_TYPE* status );
VDVD_ERROR SelectVideoStream ( DECODE_VIDEO_PARAMETERS* parameters );
VDVD_ERROR SelectAudioStream ( DECODE_AUDIO_PARAMETERS* parameters );
};
/********************************************************************************
GLOBAL VARIABLES
********************************************************************************/
extern FileCaptureDecoder g_FileCaptureDecoder;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -