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

📄 umc_aac_decoder_int.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) 2002-2006 Intel Corporation. All Rights Reserved.
//
*/

#ifndef __UMC_AAC_DECODER_INT_H__
#define __UMC_AAC_DECODER_INT_H__

#include "ippdefs.h"
#include "umc_audio_codec.h"
#include "umc_memory_allocator.h"
#include "umc_dynamic_cast.h"

#include "aaccmn_const.h"
#include "audio_codec_params.h"
#include "aac_status.h"

struct _AACDec;

namespace UMC {

  // profile and level definitions for aac
  // values for profile and level fields in BaseCodecParams
#define AAC_PROFILE_MAIN  1
#define AAC_PROFILE_LC    2
#define AAC_PROFILE_SSR   3
#define AAC_PROFILE_LTP   4
#define AAC_PROFILE_SBR   0x100

#define AAC_LEVEL_MAIN    0

  class   AACDecoderInt:public AudioCodec {
    DYNAMIC_CAST_DECL(AACDecoderInt, AudioCodec);

  public:
    enum DecodeMode {
      DM_UNDEF_STREAM = 0,
      DM_RAW_STREAM,
      DM_ADTS_STREAM
    };

    AACDecoderInt();
    ~AACDecoderInt(void);

    Status  Init(BaseCodecParams * init);
    Status  GetFrame(MediaData * in, MediaData * out);
    Status  Close();
    Status  Reset();

    Status  GetInfo(BaseCodecParams * info);
    Status  SetParams(BaseCodecParams * params);
    Status  GetDuration(Ipp32f *p_duration);

  protected:
    Status StatusAAC_2_UMC(AACStatus st);
    Status MemLock();
    Status MemUnlock();

    struct _AACDec *state;
    cAudioCodecParams params;

    Ipp64f m_pts_prev;
    Ipp32s initSubtype;
    Ipp32u adts_sw;
    MemID  stateMemId;

    struct {
      AudioStreamType    m_init_stream_type;
      size_t           m_init_config_data_size;
      DecodeMode         m_decode_mode;
      Ipp32s             m_sampling_frequency_index;

      Ipp32u             m_channel_config;
      Ipp32s             m_frame_number;
      AudioObjectType    m_audio_object_type;
      AudioStreamSubType m_stream_subtype;
    } m_info;
  };
};      // namespace UMC

#endif // __UMC_AAC_DECODER_INT_H__

⌨️ 快捷键说明

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