umc_h261_video_encoder.h

来自「audio-video-codecs.rar语音编解码器」· C头文件 代码 · 共 70 行

H
70
字号
/*//////////////////////////////////////////////////////////////////////////////
//
//                  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 _ENCODER_H261_H_
#define _ENCODER_H261_H_

#include "umc_video_encoder.h"
#include "umc_dynamic_cast.h"
#include "vm_strings.h"
#include "h261_enc.hpp"

namespace UMC
{

#define STR_LEN 511

class H261EncoderParams : public VideoEncoderParams
{
    DYNAMIC_CAST_DECL(H261EncoderParams, VideoEncoderParams)
public:
    h261_Param  m_Param;
    H261EncoderParams();
    virtual Status ReadParamFile(const vm_char *ParFileName);
};

class H261VideoEncoder: public VideoEncoder
{
protected:
  ippVideoEncoderH261 h261enc;
public:
  H261VideoEncoder();
  ~H261VideoEncoder();
  virtual Status Init(BaseCodecParams *init);
  virtual Status GetFrame(MediaData *in, MediaData *out);
  virtual Status GetInfo(BaseCodecParams *info);
  virtual Status Close();
  virtual Status Reset();
  virtual Status SetParams(BaseCodecParams* params);
  // RTP (RFC 2032) support
  Ipp32u* GetFrameGOBstartPos() { return h261enc.GetFrameGOBstartPos(); };
  Ipp16u* GetFrameGOBN_MBAP() { return h261enc.GetFrameGOBN_MBAP(); }
  Ipp8u*  GetFrameQuant() { return h261enc.GetFrameQuant(); };
  IppMotionVector*  GetFrameMVpred() { return h261enc.GetFrameMVpred(); };
  Ipp32u* GetFrameMBpos() { return h261enc.GetFrameMBpos(); };
  Ipp32s  GetFrameNumCodedMB() { return h261enc.GetFrameNumCodedMB(); };
protected:
  bool        m_IsInit;
  H261EncoderParams  m_Param;
  Status AllocateBuffers();
  // free memory for internal buffers
  Status FreeBuffers();
  // lock memory for internal buffers
  void LockBuffers();
  // unlock memory for internal buffers
  Status UnlockBuffers();
};

VideoEncoder* createH261VideoEncoder();

} //namespace UMC

#endif /*_ENCODER_H261_H_*/

⌨️ 快捷键说明

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