Mercurial > vba-linux
view src/common/nesvideos-piece.h @ 7:c0a590a394c3
ignore generated files
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:50:33 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 #ifndef NESVPIECEhh2 #define NESVPIECEhh4 #define NESVIDEOS_LOGGING 16 #ifdef __cplusplus7 extern "C" {8 #endif10 /* Is video logging enabled? 0=no, 1=yes, 2=active. Default value: 0 */11 extern int LoggingEnabled;13 /* Get and set the video recording command (shell command) */14 extern const char* NESVideoGetVideoCmd();15 extern void NESVideoSetVideoCmd(const char *cmd);17 /* Tells to use these functions for obtaining/releasing FILE pointers for writing - if not specified, popen/pclose are used. */18 extern void NESVideoSetFileFuncs( FILE* openFunc(const char *,const char *), int closeFunc(FILE*) );20 /* Tells to call these functions per frame with amounts (seconds and frames) of video and audio progress */21 extern void NESVideoEnableDebugging( void videoMessageFunc(const char *msg), void audioMessageFunc(const char *msg) );23 /* Save 1 frame of video. (Assumed to be 16-bit RGB) */24 /* FPS is scaled by 24 bits (*0x1000000) */25 /* Does not do anything if LoggingEnabled<2. */26 extern void NESVideoLoggingVideo27 (const void*data, unsigned width, unsigned height,28 unsigned fps_scaled);30 /* Save N bytes of audio. bytes_per_second is required on the first call. */31 /* Does not do anything if LoggingEnabled<2. */32 /* The interval of calling this function is not important, as long as all the audio33 * data is eventually written without too big delay (5 seconds is too big)34 * This function may be called multiple times per video frame, or once per a few video35 * frames, or anything in between. Just that all audio data must be written exactly once,36 * and in order. */37 extern void NESVideoLoggingAudio38 (const void*data,39 unsigned rate, unsigned bits, unsigned chans,40 unsigned nsamples);41 /* nsamples*chans*(bits/8) = bytes in *data. */42 /* rate*chans*(bits/8) = bytes per second. */44 #ifdef __cplusplus45 }46 #endif48 #endif