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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to playback live mpeg2 stream? 1

Status
Not open for further replies.

DirectShow

Programmer
Jan 23, 2002
6
0
0
CN
I have one "push" filter(based on the ball example) to receive the multicast stream from network. I connected it to the Microsoft's mpeg-2 demultiplexer and config the demux as transport mode. When start running, the video windows was created, but no active picture any more.
I guess it's cause from that the demux was not feeded valid data. Does someone meet this problem and give me some help?

Thanks
BruceAn
 
I am interested in doing a similar thing. I might be able to help. But I haven't figured out how to use a push stream to receive streaming media. Can you direct me to the ball example or show me the code that you wrote .for the push filter.
 
maybe you could check the PID mapping of the output pin you've created on the demux filter. Another cause of trouble could be the format of datas on this pin (Elementary stream ??)

 
I meet this question too.
It's because that the Microsoft's mpeg-2 demultiplexer
did not support the live stream.
you can use the Elecard Mpeg2 decoder and demultiplexer.
I use it and my application is working well now.

you can download it from
 
Dear Aresding
Thank you for you help and advice.

I want to playback the live transport_stream multicasted on the network. At first, I made a source_filter which support IFileSourceFilter interface, it can work with Elecard's demux and decoder, but the stream_feeding was not perfect. So I want to make a push_mode source filter.

Did you means that in your application the Elecard's demultiplexer can work in push mode? And connected with a live_pushmode_sourcefilter?

Will you give some details about it?
 
Elecard has two Demultiplexers - one works in pull mode with Async Source and Elecard's SyncToAsync Filters, and another in push mode and can be used with something like bouncing_ball_based_MPEG_TS_push_filter.
In order to use PushMode Demultiplexer you must connect it to your source, then play graph for a couple seconds (and send real data to Demuxer), Demuxer will find all streams in TS and will create correct output pins for them, then stop graph and render needed output pins on the Demuxer, and start play again.
 
If I'm not wrong,The elecard's filters is worked in push mode.but they can used in pull mode too.
 
Dear Posdnya an Aresding:

According to yours advices, I tryed to connect my bouncing_ball_based_push__source_filter with Elecard's demultiplexer. And the push_soucce _filter support the MediaType as MEDIATYPE_Stream & MEDIASUBTYPE_NULL.

But the connection was failed, cause the Elecard_demultiplexer's input_pin didn't provide the IID_IMemInputPin interface.

Did I use the wrong demultiplexer or provide wrong MediaType? And where can i download the Elecard's push_mode_demultiplexer?

Thank Your!
Bruce An 2002/3/28
 
How did you get the pin?
I use codes as follow:
IPin *pInputPin;
pElecardFilter->FindPin(L"Input",&pInputPin);
if (FAILED(hr)) {
MessageBox(NULL,"FindPin error","",MB_OK);
return hr;
}

pSourceFilter->Connect(pInputPin,&MediaType);

and it worked fine;
 
Dear Aresding:
The following is my testing code. When connect the pins, it still return error as 0x80004002. I think the error is return by Elecad_demultiplexer's inputPin, because it didn't support the IMemInputPin interface, Do you think so? Are you sure your source filter is a push mode filter?

Thanks
Bruce An. mailto: brucean@szonline.net

// create the push_mode_source_filter
hr = CoCreateInstance(CLSID_BouncingBall,
NULL,
CLSCTX_INPROC_SERVER,
IID_IBaseFilter,
reinterpret_cast<void**>(&pBouncintBall));
hr = pGB->AddFilter(pBouncintBall, L&quot;Bouncing Ball&quot;);

IPin* pSourceOutputPin;
pBouncintBall->FindPin(L&quot;1&quot;, &pSourceOutputPin);

// Create the demux filter
hr = CoCreateInstance(CLSID_ElecardDemultiplexer,
NULL,
CLSCTX_INPROC_SERVER,
IID_IBaseFilter,
reinterpret_cast<void**>(&pMpeg2Splitter));
pGB->AddFilter(pMpeg2Splitter, L&quot;Mpeg-2 demultiplexer&quot;);

IPin *pInputPin;
hr = pMpeg2Splitter->FindPin(L&quot;Input&quot;,&pInputPin);

CMediaType mt;
mt.SetType(&MEDIATYPE_Stream);
mt.SetSubtype(&MEDIASUBTYPE_NULL);
mt.SetTemporalCompression(TRUE);
mt.SetSampleSize(4096);
hr = pSourceOutputPin->Connect(pInputPin,&mt);
 
Dear Aresding:

Thank you for your help and kindness.

I have finished my job with MicroSoft's mpeg-2 demultiplxer.

Best Regards
Bruce An
 
Elecard finished demo application, which demonstrate live mpeg2 playback.
You may download it from Moonlight UDP Streaming Application
It consists of server and client parts, and can work in unicast/multicast mode.
Source code is available with Elecard MPEG2 Video Decoder SDK
 
Hi.,
I am new to directshow.
The RenderFile() function returns a (0x80040216) error message for the following method:
hr = graph->RenderFile (filename,NULL);

It works fine if I hard code the path like
hr = graph->RenderFile (L&quot;c:\\vmsencoding1\\movies\\stage\\10404.mpg&quot;, 0);

I tried to declare filename as LPOLESTR ,LPCWSTR ,wchar_t*,
_TCHAR* and tried various castings too withourt any development.

Awaiting for a reply as this is a bit Urgent.
srini
 
Can some one tell me why the links on elecard site always busy i am trying to download netasync_01.zip and it is always busy i haqve been tring for about 2 days
 
Hi DirectShow,
Please send me your solution of MS mpeg-2 demultiplexer. Thanks.

junsc@163.net
 
posdnya, can you tell me where can i get source code of
Elecard's MPEG2 Decoder, i find anyplace in this site, but failed.
 
Davidzwh,
you can't find source code of Elecard MPEG2 Decoder, because Elecard do not publish or sell it. It is licensed only in binary form
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top