⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umc_vc1_dec_thread.h

📁 audio-video-codecs.rar语音编解码器
💻 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) 2004-2007 Intel Corporation. All Rights Reserved.
//
//
//          VC-1 (VC1) decoder, Slice for threading (base on h264)
//
*/
#include "umc_defs.h"
#if defined (UMC_ENABLE_VC1_VIDEO_DECODER)

#ifndef __UMC_VC1_DEC_THREAD_H_
#define __UMC_VC1_DEC_THREAD_H_

#include "vm_types.h"
#include "umc_structures.h"
#include "umc_vc1_dec_job.h"


namespace UMC
{

#pragma pack(1)

class VideoAccelerator;
class VC1TaskStore;
class VC1ThreadDecoder
{
    friend class VC1VideoDecoder;
public:
    // Default constructor
    VC1ThreadDecoder();
    // Destructor
    virtual
    ~VC1ThreadDecoder();

    // Initialize slice decoder
    virtual Status Init(void *p,
                        Ipp32s iNumber,
                        VC1TaskStore* pTaskStore,
                        VideoAccelerator* va);

    // Start decoding asynchronously
    Status StartProcessing(void);
    // Wait for end of asynchronous decoding
    Status WaitForEndOfProcessing(void);

    // wait (if thread already worked) and stop thread
    Status WaitAndStop(void);

    // Decode picture segment
    virtual Status process(void);
    virtual Status processMainThread(void);
    Ipp32s  getThreadID()
    {
        return this->m_iNumber;
    }

protected:
    // Release slice decoder
    void Release(void);

    //
    // Threading tools
    //

    // Starting routine for decoding thread
    static
    Ipp32u DecodingThreadRoutine(void *p);

    vm_thread m_hThread;                                        // (vm_thread) handle to asynchronously working thread
    vm_event m_hStartProcessing;                                // (vm_event) event to start asynchronous processing
    vm_event m_hDoneProcessing;                                 // (vm_event) event to show end of processing

    Ipp32s m_iNumber;                                           // (Ipp32s) ordinal number of decoder


    volatile
    bool m_bQuit;                                               // (bool) quit flag for additional thread(s)
    Status m_Status;                                            // (Status) async return value
    bool m_bStartDecoding;

private:
    VC1TaskProcessor*  m_pJobSlice;                      // pointer to slice job. Need compete decoder pipeline
    VC1TaskStore*      m_pStore;
};

#pragma pack()

} // namespace UMC

#endif // __umc_vc1_dec_thread_H
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -