view src/common/nesvideos-piece.h @ 147:279e9ee6fccb

can now determine the number of pokemon in the party.
author Robert McIntyre <rlm@mit.edu>
date Mon, 19 Mar 2012 22:42:36 -0500
parents f9f4f1b99eed
children
line wrap: on
line source
1 #ifndef NESVPIECEhh
2 #define NESVPIECEhh
4 #define NESVIDEOS_LOGGING 1
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 /* 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 NESVideoLoggingVideo
27 (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 audio
33 * 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 video
35 * frames, or anything in between. Just that all audio data must be written exactly once,
36 * and in order. */
37 extern void NESVideoLoggingAudio
38 (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 __cplusplus
45 }
46 #endif
48 #endif