📄 umc_threaded_demuxer.h
字号:
/*//////////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 2005-2007 Intel Corporation. All Rights Reserved.
//
*/
#ifndef __UMC_THREADED_DEMUXER_H__
#define __UMC_THREADED_DEMUXER_H__
#define VM_THREAD_CATCHCRASH
#include "umc_thread.h"
#include "umc_event.h"
#include "umc_mutex.h"
#include "umc_media_data.h"
#include "umc_splitter.h"
#include "umc_demuxer.h"
namespace UMC
{
class Demuxer;
struct RulesMatchingState;
Ipp32u VM_THREAD_CALLCONVENTION ThreadRoutineStarter(void* u);
class ThreadedDemuxer : public Splitter
{
DYNAMIC_CAST_DECL(ThreadedDemuxer, Splitter)
public:
ThreadedDemuxer();
virtual ~ThreadedDemuxer();
virtual Status Init(SplitterParams& init);
virtual Status Close(void);
virtual Status EnableTrack(Ipp32u nTrack, Ipp32s iState);
virtual Status Run(void);
virtual Status Stop(void);
// trick-modes
virtual Status SetRate(Ipp64f rate);
virtual Status SetTimePosition(Ipp64f timePos);
virtual Status GetTimePosition(Ipp64f& timePos);
virtual void AlterQuality(Ipp64f time);
// getting data
virtual Status GetNextData(MediaData *data, Ipp32u uiTrack);
virtual Status CheckNextData(MediaData *data, Ipp32u uiTrack);
// getting info
virtual Status GetInfo(SplitterInfo** ppInfo);
protected:
Status AnalyzeParams(SplitterParams *pParams);
void TerminateInit(void);
bool TryTrackByRules(Ipp32u uiTrack);
Ipp32u ThreadRoutine();
friend Ipp32u VM_THREAD_CALLCONVENTION ThreadRoutineStarter(void* u);
// pointer to the core demuxing object
// this pointer is used to check if object initialized
Demuxer *m_pDemuxer;
// signaled when PSI is changed
Event *m_pOnPSIChangeEvent;
// internal thread
Thread m_DemuxerThread;
// signaled when init finished
Event m_OnInit;
// signaled when blocking buffer is unlocked
Event m_OnUnlock;
// PID of blocking buffer
Ipp32s m_iBlockingPID;
// saved initialization flags
Ipp32u m_uiFlags;
// stop flag
bool m_bStop;
// end of stream flag
bool m_bEndOfStream;
// indicates than new track is enabled
bool m_bAutoEnable;
// syncro for changing of flag m_bAutoEnable
Mutex m_OnAutoEnable;
// rules matching state, contains rules as well
RulesMatchingState *m_pRulesState;
};
}
#endif /* __UMC_THREADED_DEMUXER_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -