Community
cancel
Showing results for 
Search instead for 
Did you mean: 
dzhou_tac
Beginner
150 Views

How to Reinitialize DataReader, Splitter,and Decoder

Jump to solution
Hi,

How to reinitialize dataReader, Splitter, and Decoder?
All these objects contain Init founction. But I found the Init() routine needs Params that is used to create these objects. I am looking for something just to rewind data pointer to the begining of the data file.

Thanks,
david.tac
0 Kudos
1 Solution
Ying_H_Intel
Employee
150 Views
Quoting - dzhou.tac
Hi,

How to reinitialize dataReader, Splitter, and Decoder?
All these objects contain Init founction. But I found the Init() routine needs Params that is used to create these objects. I am looking for something just to rewind data pointer to the begining of the data file.

Thanks,
david.tac

Hi david,

as I understand, if you just need rewind data pointer to begining of the data file, then you don't need to reinitalize the splittter, decoder, dataReader,

Just call reset(), whichshould besupposedfor such purpose,
for example,

DataReader.Rese

Description

The method resets all internal parameters to start reading from the beginning. This method does not deallocate internal resources unlike the Close method.

decoder.Reset();

The method sets codec to initial state. You can apply Reset in the case of random access
or to process the same kind of data again without complete reinitialization of the codec.

The splitter seems haven't reset() function, but splitter->SetTimePosition(0) andsplitter-> GetNextData(UMC::MediaData* data, Ipp32u nTrack)may work. If not, you may reinitial it, for example,
if (reinitial)
{
Splitter->Close();
delete mySplitter;
mySplitter = new UMC::H264Splitter();

UMC::SplitterParams mSplParams;
mSplParams.m_pDataReader = mDataReader;
umcSts = mySplitter->Init(mSplParams);
if(umcSts != UMC::UMC_OK)
{
delete mDataReader;
delete mySplitter;
}
}
umcSts = mVC1Splitter->GetNextData(&mMediaData,0);

Regards,
Ying

View solution in original post

2 Replies
Ying_H_Intel
Employee
151 Views
Quoting - dzhou.tac
Hi,

How to reinitialize dataReader, Splitter, and Decoder?
All these objects contain Init founction. But I found the Init() routine needs Params that is used to create these objects. I am looking for something just to rewind data pointer to the begining of the data file.

Thanks,
david.tac

Hi david,

as I understand, if you just need rewind data pointer to begining of the data file, then you don't need to reinitalize the splittter, decoder, dataReader,

Just call reset(), whichshould besupposedfor such purpose,
for example,

DataReader.Rese

Description

The method resets all internal parameters to start reading from the beginning. This method does not deallocate internal resources unlike the Close method.

decoder.Reset();

The method sets codec to initial state. You can apply Reset in the case of random access
or to process the same kind of data again without complete reinitialization of the codec.

The splitter seems haven't reset() function, but splitter->SetTimePosition(0) andsplitter-> GetNextData(UMC::MediaData* data, Ipp32u nTrack)may work. If not, you may reinitial it, for example,
if (reinitial)
{
Splitter->Close();
delete mySplitter;
mySplitter = new UMC::H264Splitter();

UMC::SplitterParams mSplParams;
mSplParams.m_pDataReader = mDataReader;
umcSts = mySplitter->Init(mSplParams);
if(umcSts != UMC::UMC_OK)
{
delete mDataReader;
delete mySplitter;
}
}
umcSts = mVC1Splitter->GetNextData(&mMediaData,0);

Regards,
Ying

View solution in original post

dzhou_tac
Beginner
150 Views
Hi Ying H

Thank you very much. I will try it later.

david Zhou
Reply