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

📄 umc_mp4_spl.cpp

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 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) 2004-2005 Intel Corporation. All Rights Reserved.//*/#include "umc_mp4_spl.h"#include "umc_mp4_spl_int.h"#include "umc_malloc.h"namespace UMC{MP4Splitter::~MP4Splitter(){    Close();}Status MP4Splitter::Init(SplitterParams& init){    SplitterMP4 *p_spl1;    p_spl1 = new SplitterMP4;    if ( p_spl1 ) {        Status hr = p_spl1->Init(init);        p_spl = p_spl1;        return hr;    } else {        return UMC_ALLOC;    }}Status MP4Splitter::Close(){    if ( p_spl ) {        p_spl->Close();        delete p_spl;        p_spl = NULL;    } else {        return UMC_NOT_INITIALIZED;    }    return UMC_OK;}Status MP4Splitter::Stop(){    return Close();}Status MP4Splitter::GetNextVideoData (MediaData* data, vm_var32 track_idx){    if ( p_spl ) {        if ( p_spl->m_splitter_flags_real == VIDEO_SPLITTER || p_spl->m_splitter_flags_real == AV_SPLITTER ) {            return p_spl->GetNextVideoData(data, track_idx);        } else {            return UMC_BAD_STREAM;        }    } else {        return UMC_NOT_INITIALIZED;    }}Status MP4Splitter::GetNextAudioData (MediaData* data, vm_var32 track_idx){    if ( p_spl ) {        if ( p_spl->m_splitter_flags_real == AUDIO_SPLITTER || p_spl->m_splitter_flags_real == AV_SPLITTER ) {            return p_spl->GetNextAudioData(data, track_idx);        } else {            return UMC_BAD_STREAM;        }    } else {        return UMC_NOT_INITIALIZED;    }}Status MP4Splitter::SetPosition (double pos){    if ( p_spl ) {        return p_spl->SetPosition(pos);    } else {        return UMC_NOT_INITIALIZED;    }}sInfo_sample MP4Splitter::GetSamplePositionAudio(vm_var32 track_idx, vm_var32 nsample){    if ( p_spl ) {        return p_spl->GetSamplePositionAudio(track_idx, nsample);    } else {        sInfo_sample temp;        temp.position = -1;        temp.size = -1;        return temp;    }}sInfo_sample MP4Splitter::GetSamplePositionVideo(vm_var32 track_idx, vm_var32 nsample){    if ( p_spl ) {        return p_spl->GetSamplePositionVideo(track_idx, nsample);    } else {        sInfo_sample temp;        temp.position = -1;        temp.size = -1;        return temp;    }}Status MP4Splitter::GetPosition (double& pos){    if ( p_spl ) {        return p_spl->GetPosition(pos);    } else {        return UMC_NOT_INITIALIZED;    }}Status MP4Splitter::GetInfo (SplitterInfo* info){    if ( p_spl ) {        return p_spl->GetInfo(info);    } else {        return UMC_NOT_INITIALIZED;    }}}    // namespace UMC

⌨️ 快捷键说明

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