Discussion:
Unable to enumerate any media types on my filter's pins
(too old to reply)
Rednahc
2010-03-10 20:52:01 UTC
Permalink
I am in the process of developing a H.264 video encoder filter. I have added
the following registry entries in filter project's .reg file:

[HKEY_CLASSES_ROOT\Filter\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}]
@="H264 Video Encoder Filter"

[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}]
@="H264 Video Encoder Filter"
"Merit"=dword:00800900

[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\InprocServer32]
@="H264VideoEncoder.dll"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Input]
"Direction"=dword:00000000
"IsRendered"=dword:00000000
"AllowedZero"=dword:00000000
"AllowedMany"=dword:00000000
"ConnectsToPin"="Output"

;YUY
[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Input\Types\{73646976-0000-0010-8000-00AA00389B71}\{32595559-0000-0010-8000-00AA00389B71}]
;UYV
[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Input\Types\{73646976-0000-0010-8000-00AA00389B71}\{59565955-0000-0010-8000-00AA00389B71}]


[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Output]
"Direction"=dword:00000001
"IsRendered"=dword:00000000
"AllowedZero"=dword:00000000
"AllowedMany"=dword:00000000
"ConnectsToPin"="Input"

;h26
[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Output\Types\{73646976-0000-0010-8000-00AA00389B71}\{34363268-0000-0010-8000-00aa00389b71}]
;H26
[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Output\Types\{73646976-0000-0010-8000-00AA00389B71}\{34363248-0000-0010-8000-00aa00389b71}]
;VSS
[HKEY_CLASSES_ROOT\CLSID\{B2E82896-5BD7-4299-B65D-8F95A011A2E7}\Pins\Output\Types\{73646976-0000-0010-8000-00AA00389B71}\{48535356-0000-0010-8000-00aa00389b71}]

In a test application, I create an instance of this filter and when I try to
enumerate the pins and the supported media types, I see the following issues.

1. QueryPinInfo returns the name "XForm In" on the input pin and "Xform Out"
on the output pin instead of "Input" and "Output".

2. Enumeration for supported media types on the pins fail without returning
even a single AM_MEDIA_TYPE structure.

Pleae help!
Alessandro Angeli
2010-03-10 21:49:04 UTC
Permalink
From: "Rednahc"
Post by Rednahc
I am in the process of developing a H.264 video encoder
filter. I have added the following registry entries in
The registration info should *not* be added directly to the
registry but through IFilterMapper2::RegisterFilter() or
AMovieDllRegisterServer2().
Post by Rednahc
1. QueryPinInfo returns the name "XForm In" on the input
pin and "Xform Out" on the output pin instead of "Input"
and "Output".
The filter returns what's specified in the code, not what's
in the registry. It's up to you to make the 2 sets of
informations match (including the media types). The set in
the registry is only used by IntelligentConnect to decide
which filters to try, but then it's up to actual filter code
to make final decisions.
Post by Rednahc
2. Enumeration for supported media types on the pins fail
without returning even a single AM_MEDIA_TYPE structure.
Did you add the filter to a graph? Filters are not designed
to work outside a graph (even though sometimes certain
methods do).
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
The March Hare [MVP]
2010-03-10 22:07:05 UTC
Permalink
Post by Rednahc
I am in the process of developing a H.264 video encoder filter. I have added
Multi-posted here:

http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/e61105a0-c5c8-4fdc-b5c0-9288f17573b7

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
Loading...