Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP: Streaming how ??

0 views
Skip to first unread message

Geotz Winterfeldt

unread,
Dec 18, 1997, 3:00:00 AM12/18/97
to

Hey,

I am looking for samples explaining the streaming architecture.

How do I access a single frame (data) within a video stream and how do I

access the sound (data) for the same frame.

Example :

IAMMultiMediaStream *pAMStream;
HRESULT hr;

/* Creating the Multimedia stream and adding support for Sound and
Video.
*/
CoCreateInstance(CLSID_AMMultiMediaStream,NULL,CLSCTX_INPROC_SERVER,
IID_IAMMultiMediaStream, (void **)&pAMStream);

pAMStream->Initialize(STREAMTYPE_READ, 0, NULL);

pAMStream->AddMediaStream(NULL, &MSPID_PrimaryVideo, 0, NULL);
pAMStream->AddMediaStream(NULL, &MSPID_PrimaryAudio, 0, NULL);

/* Loading a file
*/
WCHAR wPath[MAX_PATH];
MultiByteToWideChar(CP_ACP,0,pszFileName,-1,wPath,sizeof(wPath)/sizeof(wPath[0]));

pAMStream->OpenFile(wPath, 0);

/* Get a pointer to the audio data
*/
hr = pAMStream->GetMediaStream(MSPID_PrimaryAudio, &pStream);

if(hr != 0){ AfxMessageBox("Can not get a pointer to the current Audio
data !"); }

hr = pAMStream->GetMediaStream(MSPID_PrimaryVideo, &pStream);

But now ??????????

How do I say: Give the format and jump to the sound of the third frame
and deliver the data
or deliver the data of the 20th video frame if existing. ???

There are all this nice Interfaces as IMediaSeeking, IMediaPosition, I
MediaSample
but they only seem to be usefull when I work with Graphs ....

Any pointers ...

Goetz

Bye the way is there somewhere a list of interfaces a class supports.

0 new messages