Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I seeking with Microsoft MPEG-2 Splitter?

Status
Not open for further replies.

rkrsw

Programmer
Jun 30, 2003
1
DE
This Code not funktional ...

UuidFromString( (unsigned char *)"c553f2c0-1529-11d0-b4d1-00805f6cbbea", &Uuid);
JIF(CoCreateInstance(Uuid, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, (void **)&pFileSrc));
JIF(pGB->AddFilter(pFileSrc, T2W("File Source Filter")));
JIF(pFileSrc->QueryInterface(IID_IFileSourceFilter, (void **) &pSrc));
JIF(pSrc->Load(T2W(szFile), NULL));
Sleep(100);
UuidFromString( (unsigned char *)"731B8592-4001-46D4-B1A5-33EC792B4501", &Uuid);
JIF(CoCreateInstance(CLSID_MMSPLITTER, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, (void **)&pSplitter));
JIF(pGB->AddFilter(pSplitter, T2W("Elecard MPEG2 Demultiplexer")));
JIF(pFileSrc->FindPin(L"Output", &pTSOut));
JIF(pSplitter->FindPin(L"Input", &pTSIn));
JIF(pGB->Connect(pTSOut,pTSIn));
JIF(pSplitter->FindPin(L"Video", &pVideoOut));
JIF(pVideoOut->QueryInterface(IID_IMediaSeeking, (void **) &pVideoSeeking));
LONGLONG Earliest;
LONGLONG Latest;
pVideoSeeking->GetAvailable(&Earliest, &Latest);
Earliest = Latest/2; // 1/2 of Begin
Latest = Latest/4*3; // 3/4 of Begin
JIF(pVideoSeeking->SetPositions(&Earliest, AM_SEEKING_AbsolutePositioning, &Latest, AM_SEEKING_AbsolutePositioning));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top