コード例 #1
0
/* ----------------------------- MNI Header -----------------------------------
@NAME       : RewindMPEG
@INPUT      : MPEGfile - the input stream where the MPEG's coming from
              Image    - image descriptor (just passed to OpenMPEG ())
@OUTPUT     : (none)
@RETURNS    : (void)
@DESCRIPTION: Resets things so that the caller can start reading the MPEG
              stream from the start again.  Note that the caller does NOT
	      need to call OpenMPEG() again -- after a call to RewindMPEG(),
	      the next call to GetMPEGFrame() will return the first frame
	      of the MPEG.
@METHOD     :
@GLOBALS    : EOF_flag, curBits, bitOffset, bufLength, bitBuffer, totNumFrames
@CALLS      :
@CREATED    : 94/7/20, Greg Ward
@MODIFIED   :
@COMMENTS   : The global variables declared in this function should
              not normally be used by the front end to the MPEG
              decoder.  However, I've chosen to bend the rules for
              just this one function.  N.B.: EOF_flag comes from
              globals.c; curBits, bitOffset, bufLength, and bitBuffer
              from util.c; and totNumFrames is defined in this file.
---------------------------------------------------------------------------- */
Boolean RewindMPEG (FILE *MPEGfile, ImageDesc *Image) {
    CloseMPEG ();
    rewind (MPEGfile);
    bitBuffer = NULL;
    totNumFrames = 0;

    return (OpenMPEG (MPEGfile, Image));
}
コード例 #2
0
ファイル: mpegfile.c プロジェクト: MBrauna/Biometria
/* destructor */
static void
malib_mpegfile_delete (MalibMpegFile* mpegfile)
{
  MalibFrame* frame_info;

  g_return_if_fail (mpegfile);

  CloseMPEG ();
  fclose (mpegfile->fp);
  free (mpegfile->pixels);

  malib_source_delete ((MalibSource*)mpegfile);
}
コード例 #3
0
/* mpegClose()
 *
 * Closes the MPEG library
 *
 * preconditions: mi is a ptr to an mpeginfo returned by mpegOpen()
 */
void mpegClose(mpeginfo *mi)
{
  CloseMPEG();
}