0

I'm trying to encode a video from an IGraphBuilder, for this I would require a HBitmap is it possible for me to do this?

P.S. I know that IGraphBuilder already has a RenderFile function, however this is too slow for my use and I would also prefer to render in H264

kiwijus
  • 1,217
  • 1
  • 20
  • 40

1 Answers1

1

IGraphBuilder controls the pipeline, it does not have, own and even have a faintest notion of bitmaps or their handles.

The typical approach is to insert a Sample Grabber filter into the pipeline and grab video frames off there (there is a plenty of sample code around there on doing this). Still you have to provide more detail about your particular task to get reasonable advice.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Thanks for the info! Is there any overhead when using a sample grabber (for real time use). Basically what I'm aiming to do is add two videos (one from a webcam) as a filter to the igraphbuilder then render it out as a video file. – kiwijus Jan 22 '12 at 16:02
  • Sample Grabber itself has a minimal overhead, however as soon as you start your `filtering` you will add your own overhead, plus if you are going to require specific video format such as RGB, it might also add implicit conversion with its own additional overhead. – Roman R. Jan 22 '12 at 16:51
  • That's good! I'll have a look at some samples and have a go at doing this! Thanks for the help! – kiwijus Jan 22 '12 at 17:22