If you don't have trouble, you can use renderfile to play images, stop, then use Samplegrabber to grasp, so you can get pictures of the first frame.
The general software player is like this. After opening a media file, first pause the Filter Graph so that the first frame of this media file is naturally displayed.
IF (NO> 120) exit (0);
Sprintf (file_name, "image% 03d.ppm", no );
Save_ppm (file_name, _pixbuf);
Do a Save_ppm function, when NO = 1 is the first picture
Upstairs, use VFW programming. AVI format ...
Pavifile Pfile; // Pointer TO A Buffer That Receives The New Iavifile Interface Pointer.
Avifileinfo PFI;
Pavistream PAVI;
Pgetframe pgf;
Long Length, Start;
// Initializes the avifile library, as avifileexit ().
// Call avifileinit () Before using any other Avifile functions
Avifileinit ();
Avifileopen (& Pfile, M_avifile, of_read | of_share_deny_none, null);
// Obtains Information About An Avi File
AvifileInfo (Pfile, & Pfi, SizeOf (AvifileInfo);
AvifilegetStream (Pfile, & Pavi, StreamTypevideo, 0);
Length = avistreamlength; pavi;
START = AvistreamStart (PAVI);
AvistreamInfo Si;
AvistreamInfo (PAVI, & Si, SIZEOF (SI));
PGF = AvistreamGetframeOpen (PAVI, NULL);
// get first BMP
LpbitmapInfoHeader BMP1;
BMP1 = (lpbitmapinfohead) AvistreamGetFrame (PGF, 0);