Results 1 to 4 of 4

Thread: Set a list for setDeviceFrameFilters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2005
    Posts
    18

    Set a list for setDeviceFrameFilters

    I wrote a frame filter as described by the chapter "Writing a Frame Filter: Binarization" in the user's guide.
    This code work fine:

    Code:
    class MyFilter1 : public DShowLib::FrameFilterImpl<MyFilter1>
    {
    public:
    	MyFilter1 ();
    
    ... etc ...	
    };
    
    ...
    Grabber.setDeviceFrameFilters (&MyFilter1);
    ...
    Now I add a second filter, the class is called MyFilter2.
    How can I do the filters' list?

    Code:
    tFrameFilterList filterList;
    filterList.push_back ( ... MyFilter1 ??? );
    filterList.push_back ( ... MyFilter2 ??? );
    Grabber.setDeviceFrameFilters (filterList);
    Best regards.
    Paolo

    (SDK 3.3)

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: Set a list for setDeviceFrameFilters

    Hi Paolo

    Yes, it looks good so far.
    Code:
    DShowLib::tFrameFilterList flist = pGrabber->getDeviceFrameFilters();
    pGrabber->stopLive();
    flist.push_back( Filter1.get());
    flist.push_back( Filter2.get());
    flist.push_back( Filter3.get());
    pGrabber->setDeviceFrameFilters(flist);
    for( unsigned int i = 0; i < flist.size(); i++ )
    {
         if( flist.at(i) == m_iFilter.get())
         flist.at(i)->AddRef();
    }
    
    pGrabber->startLive();
    That should do the job.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Feb 2005
    Posts
    18

    Re: Set a list for setDeviceFrameFilters

    I had tried a code similar to yours.
    Unfortunately, the problem is the error message:

    Code:
     ... error C2039: 'get': is not a member of 'Filter1'
    
    at line:
    
    flist.push_back( Filter1.get());
    Edit: the code work (between stopLive and startLive):

    Code:
    DShowLib::tFrameFilterList flist = m_pGrabber.getDeviceFrameFilters ();
    flist.push_back (&MyFilter1);
    flist.push_back (&MyFilter1);
    m_pGrabber.setDeviceFrameFilters (flist);
    Last edited by Goodidea; December 13, 2017 at 19:52:26.

  4. #4
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: Set a list for setDeviceFrameFilters

    Hello

    good to read, it is working now.
    Best regards
    Stefan
    IC Imaging Control Support

Similar Threads

  1. List of supported USB webcam
    By Camelot in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: June 28, 2004, 08:26:40
  2. video Format List
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: August 12, 2002, 10:58:13
  3. Is available a list of supported capture cards ?
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: February 14, 2002, 19:41:54
  4. Hardware compatibility List
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: January 3, 2002, 17:31:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •