using libfg library

This is a discussion on using libfg library within the C Programming forums, part of the General Programming Boards category; Hello, I downloaded the libfg library which is a high-level library for interfacing with video4linux and capturing frames from video ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    using libfg library

    Hello, I downloaded the libfg library which is a high-level library for interfacing with video4linux and capturing frames from video devices. Are the statements "FRAMEGRABBER* fg = NULL" and "FRAME* fr = NULL" declaring pointers?? I am confused why the asterisk is not on the opposite side. Furthermore, is FRAMEGRABBER a function name, and fg a variable?

    Code:
    #define TV_ABC 64.250f   
        
    void test()   
    {   
      FRAMEGRABBER* fg = NULL;   
      FRAME* fr = NULL;   
        
      // Open the default device   
        
      fg = fg_open( NULL );   
        
      // Capture from our VCR   
        
      fg_set_source( fg, FG_SOURCE_COMPOSITE );   
        
      // Take a snap   
        
      fr = fg_grab( fg );   
      frame_save( fr, vcr.pgm );   
        
      // Now get ABC TV   
        
      fg_set_source( fg, FG_SOURCE_TV );   
      fg_set_tuner( fg, TV_ABC );   
        
      // Take a snap   
        
      fg_grab_frame( fg, frame );   
      frame_save( fr, ABC.pgm );   
        
      frame_release( fr );   
      fg_close( fg );   
    }

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,582
    Quote Originally Posted by samz07
    Are the statements "FRAMEGRABBER* fg = NULL" and "FRAME* fr = NULL" declaring pointers?? I am confused why the asterisk is not on the opposite side.
    Yes, and read: Is ``int* p;'' right or is ``int *p;'' right?

    Quote Originally Posted by samz07
    Furthermore, is FRAMEGRABBER a function name, and fg a variable?
    With the given information I would say that FRAMEGRABBER is a type name and fg is a variable name.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's an import library?
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 06-19-2009, 05:00 PM
  2. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 06:04 AM
  3. Makefile for a library
    By sirmoreno in forum Linux Programming
    Replies: 5
    Last Post: 06-04-2006, 04:52 AM
  4. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM
  5. better c string functions
    By samps005 in forum C Programming
    Replies: 8
    Last Post: 11-04-2003, 12:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21