views:

40

answers:

0

hi,

I'm trying to accomplish relativly simple task:

  • capture screenshot every N sec to bitmaps array in memmory

  • encode bitmaps video to Windows Media Video 9 Screen Encoder format , and put it in another place in memory

by now i did the first part , but second is little trickier. i did this:

  • initialize COM for DMO with CoInitialize()

  • CoCreateInstance() of DMO encoder

  • did MediaObject->SetInputType() went S_OK

  • now as i understand i have to set MediaObject->SetOutputType() and at this point i fail. with DMO_E_TYPE_NOT_ACCEPTED

MediaObject->GetOutputType() returns required structure (it has only one supported type ) but it won't take it in SetOutputType(), maybe because of VIDEOINFOHEADER sturcture i fed it with , i don't know. can you help me?