Changeset View
Changeset View
Standalone View
Standalone View
source/blender/avi/intern/avi.c
| Show All 36 Lines | |||||
| #include <stdarg.h> | #include <stdarg.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <ctype.h> | #include <ctype.h> | ||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| #include "BLI_winstuff.h" | #include "BLI_winstuff.h" | ||||
| #endif | #endif | ||||
| #include "CLG_log.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_fileops.h" | #include "BLI_fileops.h" | ||||
| #include "AVI_avi.h" | #include "AVI_avi.h" | ||||
| #include "avi_intern.h" | #include "avi_intern.h" | ||||
| #include "avi_endian.h" | #include "avi_endian.h" | ||||
| static CLG_LogRef LOG = {"avi.main"}; | |||||
| static int AVI_DEBUG = 0; | static int AVI_DEBUG = 0; | ||||
| static char DEBUG_FCC[4]; | static char DEBUG_FCC[4]; | ||||
| #define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0 | #define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0 | ||||
| /* local functions */ | /* local functions */ | ||||
| char *fcc_to_char(unsigned int fcc); | char *fcc_to_char(unsigned int fcc); | ||||
| char *tcc_to_char(unsigned int tcc); | char *tcc_to_char(unsigned int tcc); | ||||
| ▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | if ((int) in_error < 0) | ||||
| error = -in_error; | error = -in_error; | ||||
| else | else | ||||
| error = in_error; | error = in_error; | ||||
| switch (error) { | switch (error) { | ||||
| case AVI_ERROR_NONE: | case AVI_ERROR_NONE: | ||||
| break; | break; | ||||
| case AVI_ERROR_COMPRESSION: | case AVI_ERROR_COMPRESSION: | ||||
| printf("AVI ERROR: compressed in an unsupported format\n"); | CLOG_ERROR(&LOG, "compressed in an unsupported format"); | ||||
| break; | break; | ||||
| case AVI_ERROR_OPEN: | case AVI_ERROR_OPEN: | ||||
| printf("AVI ERROR: could not open file\n"); | CLOG_ERROR(&LOG, "could not open file"); | ||||
| break; | break; | ||||
| case AVI_ERROR_READING: | case AVI_ERROR_READING: | ||||
| printf("AVI ERROR: could not read from file\n"); | CLOG_ERROR(&LOG, "could not read from file"); | ||||
| break; | break; | ||||
| case AVI_ERROR_WRITING: | case AVI_ERROR_WRITING: | ||||
| printf("AVI ERROR: could not write to file\n"); | CLOG_ERROR(&LOG, "could not write to file"); | ||||
| break; | break; | ||||
| case AVI_ERROR_FORMAT: | case AVI_ERROR_FORMAT: | ||||
| printf("AVI ERROR: file is in an illegal or unrecognized format\n"); | CLOG_ERROR(&LOG, "file is in an illegal or unrecognized format"); | ||||
| break; | break; | ||||
| case AVI_ERROR_ALLOC: | case AVI_ERROR_ALLOC: | ||||
| printf("AVI ERROR: error encountered while allocating memory\n"); | CLOG_ERROR(&LOG, "error encountered while allocating memory"); | ||||
| break; | break; | ||||
| case AVI_ERROR_OPTION: | case AVI_ERROR_OPTION: | ||||
| printf("AVI ERROR: program made illegal request\n"); | CLOG_ERROR(&LOG, "program made illegal request"); | ||||
| break; | break; | ||||
| case AVI_ERROR_FOUND: | case AVI_ERROR_FOUND: | ||||
| printf("AVI ERROR: movie did not contain expected item\n"); | CLOG_ERROR(&LOG, "movie did not contain expected item"); | ||||
| break; | break; | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| return in_error; | return in_error; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 857 Lines • Show Last 20 Lines | |||||