Robert Oschler
Robert Oschler

Reputation: 14385

Quick way to get the assigned media format for DirectShow pin that does not support IAMStreamConfig?

When a pin connection problem arises in my Delphi 6 (with DSPACK) DirectShow application I like to get the media format currently assigned to the pins involved in the connection. I do this by querying the IAMStreamConfig interface if the pins supports it. I am finding that some pins do not. Is there another reliable way to quickly get the media format currently assigned to a pin that does not support IAMStreamConfig?

Upvotes: 2

Views: 546

Answers (1)

Roman Ryltsov
Roman Ryltsov

Reputation: 69734

  • IPin::ConnectionMediaType gets you connection media type, the type the pins have agreed on
  • IAMStreamConfig::GetFormat gets you media type of unconnected yet pin, the type is about to be 'preferred' for the supposed connection

Upvotes: 1

Related Questions