locked
How to load jpg file using "Generate Still Video" filter? RRS feed

  • Question

  • Hi ,

    How to load a file using generate Still Video filter {7DF62B50-6843-11D2-9EEB-006008039E37}.

    Please see my below code

    const CLSID CLSID_GenerateStillVideo = {0x7DF62B50, 0x6843, 0x11D2, 0x9E, 0xEB, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37};
     // Create Reader Source filter  CLSID_GenerateStillVideo
     hr = CoCreateInstance(CLSID_GenerateStillVideo, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&_sourceF);
     if (FAILED(hr)) {
    
      return hr;
     }
     // Add Reader Source filter to Graph
     hr = _pGraph->AddFilter(_sourceF, L"Generate Still Video");
     if (FAILED(hr)) {
       return hr;
     }
     
     // Load File into Reader Source filter
     hr = _sourceF->QueryInterface(IID_IFileSourceFilter, (void**)&_sourceManager);
     if (FAILED(hr)) {
      return hr;
     }
     //printf("Load file for Reader Source filter\n");
     hr = _sourceManager->Load(name, NULL);
     if (FAILED(hr)) {
      return hr;
     }
    
    

    hr value from_sourceManager->Load(name, NULL) is returning error?

    please help me in this regard?
    how to load a jpg file to the graph?

     


    Audio/Video Implementation
    Tuesday, July 14, 2009 2:00 PM

Answers

  • 1.  What is the HRESULT that is returned?

    2.  What is the value of "name?"  (it should be the full path of the file)

    My dshow site is http://tmhare.mvps.org.  Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    Tuesday, July 14, 2009 2:37 PM

All replies

  • 1.  What is the HRESULT that is returned?

    2.  What is the value of "name?"  (it should be the full path of the file)

    My dshow site is http://tmhare.mvps.org.  Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    Tuesday, July 14, 2009 2:37 PM
  • this got fixed,earlier name i am passing is wrong


    Audio/Video Implementation
    Tuesday, July 14, 2009 3:26 PM