- I dont know which Mediatype the Elecard Decoder wants.
- Connecting e.g. a Video Renderer to the same Filter with Raw Output
set is working (I used the VCAM-Filter as base for testing)
- Setting Mpeg2 does not work.
For the wanted Output I set the following:
-----
Major: Video
SubTYpe: MPEG2_VIDEO
FormatType: MPEG2VIDEO
-----
I have the Values from an example Graphs Property Page of a filter which
can connect to the Elecard Decoder.
Maybe it could help to write a custom filter to put between the working
one and the Decoder to get the values I need for my filter.
But I do not know which values have to be checked.
Christoph
> Major: Video
> SubTYpe: MPEG2_VIDEO
> FormatType: MPEG2VIDEO
http://msdn2.microsoft.com/en-us/library/ms787321(VS.85).aspx
> Maybe it could help to write a custom filter to put
> between the working one and the Decoder to get the values
> I need for my filter. But I do not know which values have
> to be checked.
The *whole* MPEG2VIDEOINFO.
You can also just save a working graph to a GRF file in
GraphEdit, then use my sample GRF parser to dump its
contents, which include the connection media types (you will
need to add the code to dump the MPEG2VIDEOINFO fields).
Otherwise, you can play an MPEG-2 in MediaPlayerClassic and
look at the MPEG-2 video decoder's input pin properties,
which include a full dump of the media type instead of the
useless minidump shown in GraphEdit.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Here is the right question:
Hello,
I am desperately trying to find the right Settings for an audio output
pin which should have the following Presets:
Type Audio
Subtype PCM
FormatType WaveFormatEx
(I guess this is RAW PCM Audio)
2 Channels
48000 bps
16 bit, stereo
(In the next part i will try to post source code, but I dont know if
this will work, because i am trying to post this since hours)
Best Regards
Christoph
----
pmt->InitMediaType();
if(iPosition < 0) return E_INVALIDARG;
if(iPosition > 2) return VFW_S_NO_MORE_ITEMS;
WAVEFORMATEX audioHdr;
memset(&audioHdr,0,sizeof(WAVEFORMATEX));
audioHdr.wFormatTag=WAVE_FORMAT_PCM;
audioHdr.nChannels=2;
audioHdr.nSamplesPerSec=48000;
audioHdr.nBlockAlign=768;
audioHdr.wBitsPerSample=16;
audioHdr.cbSize=0;
pmt->SetType(&MEDIATYPE_Audio);
pmt->SetSubtype(&MEDIASUBTYPE_PCM);
pmt->SetFormatType(&FORMAT_WaveFormatEx);
pmt->SetTemporalCompression(FALSE);
pmt->SetSampleSize(0);//18432);// Should be 18432
pmt->SetFormat((BYTE*)&audioHdr,sizeof(audioHdr));
----
Sorry for this patchwork Posting, but the Server is blocking it if its
send in one part.
Best Regards
Christoph
WAVEFORMATEX audioHdr
memset(&audioHdr,0,sizeof(WAVEFORMATEX))
- Than the following properties of the audiohdr are set:
wFormatTag=WAVE_FORMAT_PCM
nChannels=2
nSamplesPerSec=48000
nBlockAlign=768
wBitsPerSample=16
cbSize=0
Now the Media Types are set:
SetType(&MEDIATYPE_Audio)
SetSubtype(&MEDIASUBTYPE_PCM)
SetFormatType(&FORMAT_WaveFormatEx)
SetTemporalCompression(FALSE)
SetSampleSize(0)
> Please Pardon me for the double Posting before, but my E-Mail
> Application drives me mad at the moment.
Answered in ../audio by Chris P.
Please do not multi-post.
See: http://tmhare.mvps.org/help.htm#mp
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution