Home | History | Annotate | Download | only in aacdec
      1 /*
      2  * Copyright (C) 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 #pragma once
     17 #include "aacdecoder_lib.h"
     18 
     19 typedef enum
     20 {
     21     DRC_PRES_MODE_WRAP_DESIRED_TARGET         = 0x0000,
     22     DRC_PRES_MODE_WRAP_DESIRED_ATT_FACTOR     = 0x0001,
     23     DRC_PRES_MODE_WRAP_DESIRED_BOOST_FACTOR   = 0x0002,
     24     DRC_PRES_MODE_WRAP_DESIRED_HEAVY          = 0x0003,
     25     DRC_PRES_MODE_WRAP_ENCODER_TARGET         = 0x0004
     26 } DRC_PRES_MODE_WRAP_PARAM;
     27 
     28 
     29 class CDrcPresModeWrapper {
     30 public:
     31     CDrcPresModeWrapper();
     32     ~CDrcPresModeWrapper();
     33     void setDecoderHandle(const HANDLE_AACDECODER handle);
     34     void setParam(const DRC_PRES_MODE_WRAP_PARAM param, const int value);
     35     void submitStreamData(CStreamInfo*);
     36     void update();
     37 
     38 protected:
     39     HANDLE_AACDECODER mHandleDecoder;
     40     int mDesTarget;
     41     int mDesAttFactor;
     42     int mDesBoostFactor;
     43     int mDesHeavy;
     44 
     45     int mEncoderTarget;
     46 
     47     int mLastTarget;
     48     int mLastAttFactor;
     49     int mLastBoostFactor;
     50     int mLastHeavy;
     51 
     52     SCHAR mStreamPRL;
     53     SCHAR mStreamDRCPresMode;
     54     INT mStreamNrAACChan;
     55     INT mStreamNrOutChan;
     56 
     57     bool mIsDownmix;
     58     bool mIsMonoDownmix;
     59     bool mIsStereoDownmix;
     60 
     61     bool mDataUpdate;
     62 };
     63