- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much. I will try it later.
david Zhou
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page