Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Capture image from still pin using media session technique in media foundation

$
0
0

Hi,

I am beginner for media foundation.I'm using media session topology technique to show preview from USB Camera device.

I built the topology to show preview and capture video,both are working successfully

I am facing problem in saving image from image stream(still pin). I'm trying this following way.

  1. Shut down the topology and session.
  2. Created new topology and session.
  3. Activated the media source.
  4. Deselected the video stream(capture pin) and selected the image stream(still pin).Added source node to topology.
  5. Added sample grabber callback sink output node(Save a frame in a file)
  6. Set the topology
  7. Session raised MF_TOPOSTATUS_READY event. Session started to play.
  8. After play started,Media session event is giving HRESULT:0X80070057(E_INVALIDARG).

I am able to get and set the still pin resolution and format.

Why i cant build the topology to grab a frame. Why this hresult is occurring for me? Am i building the topology correctly or missing something?

I referred sample code from internet,most of them are used to take photo from video stream,not from the image stream.

Please guide me,how to build the topology to capture image from still pin?

Provide me a sample code.It's more helpful for me to solve this issue.

Thanks in advance.

Regards,

Ambika





Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>