1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
| icvAVIRec.h
/*************************************************************
Volker Gimple, STEMMER IMAGING GmbH
--------------------------------------------------------------
Filename : icvAVIRec.h
Date : 30.05.02
Description :
Created by : Volker Gimple
Revision : 1.0
ToDo: -
*************************************************************/
#include <icvcimg.h>
#ifndef CVAVIREC_INCLUDED
#define CVAVIREC_INCLUDED
// Object type definitions
typedef void* CVBAVIREC;
// definition of errors
#define CVC_E_INVALIDIMAGE 17
#define CVC_E_ALREADY_INITIALIZED 300
#define CVC_E_NOT_ALL_SETTINGS_DEFINED 301
#define CVC_E_CANNOT_CREATE_COMPRESSOR 302
#define CVC_E_QUERYINTERFACE_FAILED 303
#define CVC_E_ADDFILTER_FAILED 304
#define CVC_E_PIN_ACCESS_FAILED 305
#define CVC_E_CONNECTION_FAILED 306
#define CVC_E_COMPRESSOR_HAS_NO_PROPERTY_PAGES 307
#define CVC_E_COMPRESSIONFILTER_NONEXISTENT 308
#define CVC_E_NOT_INITIALIZED 309
#define CVC_E_UNKNOWN_OLE_ERROR 310
#define CVC_E_OPERATION_NOT_POSSIBLE_NOW 311
#define CVC_E_OUTPUTFILE_IN_USE 312
#define CVC_E_AVI_FILE_EXISTS 313
#define CVC_E_INVALID_IN_THIS_MODE 314
// definition of acquisition modes
#define CVB_AVI_ACQ_NONE -1
#define CVB_AVI_ACQ_Automatic_SingleSnap 0
#define CVB_AVI_ACQ_Automatic_PingPong 1
#define CVB_AVI_ACQ_FrameByFrame 2
// definition of recorder states
#define CVB_RECORDER_STATE_NONE -1
#define CVB_RECORDER_STATE_Initialized 0
#define CVB_RECORDER_STATE_Running 1
#define CVB_RECORDER_STATE_Paused 2
// Recorder Creation and Destruction
// ---------------------------------
IMPORT(CVBAVIREC) CreateCVBAVIRec ( void ); // create an AVI recorder
IMPORT(CVBAVIREC) CreateCVBAVIRecEx ( IMG Image ); // create and initialize an AVI recorder
IMPORT(void) DestroyCVBAVIRec ( CVBAVIREC &Recorder ); // destroy a recorder
// State enquiry and setting
// -------------------------
IMPORT(BOOL) CVBAVIRecGetIsReadyToInitialize ( CVBAVIREC Recorder ); // returns TRUE if the recorder is ready to run
IMPORT(long) CVBAVIRecGetNumCompressorsFound ( CVBAVIREC Recorder ); // returns the number of DirectShow video compressors on the machine
IMPORT(ULONG) CVBAVIRecGetCompressorName ( CVBAVIREC Recorder, long Index, PCHAR strName ); // fills the name of the compressor with Index into strName
IMPORT(ULONG) CVBAVIRecSetCurrentCompressor ( CVBAVIREC Recorder, long Index ); // select the compressor to be used
IMPORT(long) CVBAVIRecGetCurrentCompressor ( CVBAVIREC Recorder ); // retrieve the currently selected video compressor
IMPORT(ULONG) CVBAVIRecSelectCompressorByDialog ( CVBAVIREC Recorder ); // displays a dialog for compressor selection
IMPORT(long) CVBAVIRecGetRunLevel ( CVBAVIREC Recorder ); // retrieves the current runlevel of the recorder
// Parameter setting and getting
// -----------------------------
IMPORT(IMG) CVBAVIRecGetImage ( CVBAVIREC Recorder ); // retrieve the currently set image for recording
IMPORT(ULONG) CVBAVIRecSetImage ( CVBAVIREC Recorder, IMG Image ); // set the image for recording
IMPORT(long) CVBAVIRecGetCurrentFrameTime ( CVBAVIREC Recorder ); // retrieve the frame time currently used by the recorder
IMPORT(long) CVBAVIRecGetDefaultFrameTime ( CVBAVIREC Recorder ); // retrieve the user defined default frame time
IMPORT(ULONG) CVBAVIRecSetDefaultFrameTime ( CVBAVIREC Recorder, long Time ); // set the default frame time to be used
IMPORT(long) CVBAVIRecGetLastFrameCompressionTime( CVBAVIREC Recorder );
IMPORT(long) CVBAVIRecGetMinFrameTime ( CVBAVIREC Recorder ); // retrieve the user defined minimum frame time
IMPORT(ULONG) CVBAVIRecSetMinFrameTime ( CVBAVIREC Recorder, long Time ); // set the minimum frame time to be used
IMPORT(long) CVBAVIRecGetMaxFrameTime ( CVBAVIREC Recorder ); // retrieve the user defined minimum frame time
IMPORT(ULONG) CVBAVIRecSetMaxFrameTime ( CVBAVIREC Recorder, long Time ); // set the minimum frame time to be used
IMPORT(BOOL) CVBAVIRecGetIgnoreQualityMessages ( CVBAVIREC Recorder ); // checks, whether the CVB source filter reacts to DShow quality feedback
IMPORT(ULONG) CVBAVIRecSetIgnoreQualityMessages ( CVBAVIREC Recorder, BOOL Set ); // specifies, whether the CVB source filter should react to DShow quality feedback
IMPORT(long) CVBAVIRecGetRedPlane ( CVBAVIREC Recorder ); // queries the currently set red colour plane
IMPORT(long) CVBAVIRecGetGreenPlane ( CVBAVIREC Recorder ); // queries the currently set green colour plane
IMPORT(long) CVBAVIRecGetBluePlane ( CVBAVIREC Recorder ); // queries the currently set blue colour plane
IMPORT(ULONG) CVBAVIRecSetRedPlane ( CVBAVIREC Recorder, long Plane ); // specify the red colour plane
IMPORT(ULONG) CVBAVIRecSetGreenPlane ( CVBAVIREC Recorder, long Plane ); // specify the green colour plane
IMPORT(ULONG) CVBAVIRecSetBluePlane ( CVBAVIREC Recorder, long Plane ); // specify the blue colour plane
IMPORT(BOOL) CVBAVIRecGetIsRealTimeStream ( CVBAVIREC Recorder ); // query if the stream is to be recorded as a realtime stream
IMPORT(ULONG) CVBAVIRecSetIsRealTimeStream ( CVBAVIREC Recorder, BOOL Set ); // specifies if the stream is to be recorded as a realtime stream
IMPORT(long) CVBAVIRecGetNumDroppedFrames ( CVBAVIREC Recorder ); // retrieve the number of dropped frames
IMPORT(ULONG) CVBAVIRecResetDroppedFramesCounter ( CVBAVIREC Recorder ); // reset the dropped frames counter to zero
IMPORT(long) CVBAVIRecGetNumTakenFrames ( CVBAVIREC Recorder ); // retrieve the number of taken frames
IMPORT(ULONG) CVBAVIRecResetTakenFramesCounter ( CVBAVIREC Recorder ); // reset the taken frames counter to zero
IMPORT(long) CVBAVIRecGetAVIFileNameLength ( CVBAVIREC Recorder ); // retrieve the length of the currently set AVI file name
IMPORT(long) CVBAVIRecGetAVIFileName ( CVBAVIREC Recorder, PCHAR strName ); // retrieve the currently set AVI file name
IMPORT(ULONG) CVBAVIRecSetAVIFileName ( CVBAVIREC Recorder, PCHAR strName, BOOL Overwrite ); // specify a new AVI file name
// AVI acquisition control
// -----------------------
IMPORT(long) CVBAVIRecGetAcquisitionMode ( CVBAVIREC Recorder ); // retrieve the current acquisition mode
IMPORT(ULONG) CVBAVIRecSetAcquisitionMode ( CVBAVIREC Recorder, long Mode ); // specify the acquisition mode to be used
IMPORT(ULONG) CVBAVIRecInitRecording ( CVBAVIREC Recorder ); // initialize the recorder for recording
IMPORT(BOOL) CVBAVIRecGetCompressorHasPropPages ( CVBAVIREC Recorder ); // query if the recorder has property pages
IMPORT(ULONG) CVBAVIRecShowCompressorPropPages ( CVBAVIREC Recorder ); // show the property pages the video compressor has
IMPORT(ULONG) CVBAVIRecStartRecording ( CVBAVIREC Recorder ); // start the recording of an avi file
// for future use (does nothing so far...)
//IMPORT(ULONG) CVBAVIRecPauseRecording ( CVBAVIREC Recorder ); // pause the recording of the current avi file
IMPORT(ULONG) CVBAVIRecStopRecording ( CVBAVIREC Recorder ); // stop the current recording
IMPORT(ULONG) CVBAVIRecCleanupRecording ( CVBAVIREC Recorder ); // clean up the recorder state, so that new setting of video compressors is possible
IMPORT(ULONG) CVBAVIRecAddFrame ( CVBAVIREC Recorder, BOOL IsLastFrame ); // add one frame in frame by frame mode
IMPORT(long) CVBAVIRecGetImageSnapedHandle ( CVBAVIREC Recorder );
IMPORT(ULONG) CVBAVIRecTestCompressionSpeed ( CVBAVIREC Recorder, long NumFrames, long &Time );
#endif |