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

📄 umc_speech_mediadata.cpp

📁 audio-video-codecs.rar语音编解码器
💻 CPP
字号:
/*//////////////////////////////////////////////////////////////////////////////
//
//                  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.
//
*/
#include "umc_structures.h"
#include "umc_speech_mediadata.h"

namespace UMC
{

   SpeechMediaData::SpeechMediaData(Ipp32u length) : MediaData(length)
   {
      m_bitrate = 0;
      m_frametype = 0;
      m_nbytes = 0;
   }

   Status SpeechMediaData::SetBitrate(Ipp32s bitrate)
   {
      m_bitrate     = bitrate;
      return UMC_OK;
   }

   Status SpeechMediaData::SetFrameType(Ipp32s frametype)
   {
      m_frametype     = frametype;
      return UMC_OK;
   }

   Status SpeechMediaData::SetNBytes(Ipp32s nbytes)
   {
      m_nbytes     = nbytes;
      return UMC_OK;
   }

   Status SpeechMediaData::MoveDataTo(MediaData* dst)
   {
      Status umcRes = UMC_OK;

      umcRes = MediaData::MoveDataTo(dst);

      if(UMC_OK == umcRes) {
         SpeechMediaData *src = DynamicCast<SpeechMediaData, MediaData>(this);
         SpeechMediaData *dstSpeechMediaData = DynamicCast<SpeechMediaData, MediaData>(dst);

         if(dstSpeechMediaData && src) {
            dstSpeechMediaData->SetFrameType(src->GetFrameType());
            dstSpeechMediaData->SetBitrate(src->GetBitrate());
            dstSpeechMediaData->SetNBytes(src->GetNBytes());
         }
      }

      return umcRes;
   }
}// namespace UMC

⌨️ 快捷键说明

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