none
Setting the color space converter filter

    Question

  • In the MSDN, it says that the color space converter converts from one RGB color type to another RGB type. But there´s nothing explain how to set the mediatyp. I just now how to set the mediatype at the incoming but how can I set the mediatyp at the output for example if I want MEDIASUBTYPE_RGB32?
    Monday, October 13, 2008 10:47 AM

Answers

  • Media types are chosen using default connection algorithm. Briefly: output pin attempts to connect using its own media types, then it tries meida types input pin might suggest for the connection, or otherwise intelligent connect might insert intermediate filters.

    If you want to override, use IGraphBuilder::
    ConnectDirect to connect pins on your media type, and not the auto-agreed media type. This is how you can do it but most likely you don't really need this and you are going a wrong way.

    Any reason why would you need exactly RGB32? If this is a continuation of previous topics where you need to insert it to be able to properly render on 2+ renderers with a tee then you need to set RGB32 on Sample Grabber and Color Space Converter (CSC) will be then forced to use this media type and you don't need to mess with forcing CSC's output pin media type explicitly.

    Monday, October 13, 2008 10:55 AM

All replies

  • Media types are chosen using default connection algorithm. Briefly: output pin attempts to connect using its own media types, then it tries meida types input pin might suggest for the connection, or otherwise intelligent connect might insert intermediate filters.

    If you want to override, use IGraphBuilder::
    ConnectDirect to connect pins on your media type, and not the auto-agreed media type. This is how you can do it but most likely you don't really need this and you are going a wrong way.

    Any reason why would you need exactly RGB32? If this is a continuation of previous topics where you need to insert it to be able to properly render on 2+ renderers with a tee then you need to set RGB32 on Sample Grabber and Color Space Converter (CSC) will be then forced to use this media type and you don't need to mess with forcing CSC's output pin media type explicitly.

    Monday, October 13, 2008 10:55 AM
  • The RGB32 was just an example.

    Thank you!
    Monday, October 13, 2008 11:06 AM