Mercurial > libavcodec.hg
comparison avcodec.h @ 1855:bafde44145f9 libavcodec
av_log() patch by (Michel Bardiaux <mbardiaux at peaktime dot be>)
| author | michael |
|---|---|
| date | Wed, 03 Mar 2004 15:41:21 +0000 |
| parents | 73ee15c391bf |
| children | ed6eb3e304cc |
comparison
equal
deleted
inserted
replaced
| 1854:73ee15c391bf | 1855:bafde44145f9 |
|---|---|
| 568 } AVFrame; | 568 } AVFrame; |
| 569 | 569 |
| 570 #define DEFAULT_FRAME_RATE_BASE 1001000 | 570 #define DEFAULT_FRAME_RATE_BASE 1001000 |
| 571 | 571 |
| 572 /** | 572 /** |
| 573 * Used by av_log | |
| 574 */ | |
| 575 typedef struct AVCLASS AVClass; | |
| 576 struct AVCLASS { | |
| 577 const char* class_name; | |
| 578 const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext | |
| 579 or AVFormatContext, which begin with an AVClass. | |
| 580 Needed because av_log is in libavcodec and has no visibility | |
| 581 of AVIn/OutputFormat */ | |
| 582 }; | |
| 583 | |
| 584 /** | |
| 573 * main external api structure. | 585 * main external api structure. |
| 574 */ | 586 */ |
| 575 typedef struct AVCodecContext { | 587 typedef struct AVCodecContext { |
| 588 /** | |
| 589 * Info on struct for av_log | |
| 590 * - set by avcodec_alloc_context | |
| 591 */ | |
| 592 AVClass class; | |
| 576 /** | 593 /** |
| 577 * the average bitrate. | 594 * the average bitrate. |
| 578 * - encoding: set by user. unused for constant quantizer encoding | 595 * - encoding: set by user. unused for constant quantizer encoding |
| 579 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream | 596 * - decoding: set by lavc. 0 or some bitrate if this info is available in the stream |
| 580 */ | 597 */ |
| 2093 | 2110 |
| 2094 #define AV_LOG_ERROR 0 | 2111 #define AV_LOG_ERROR 0 |
| 2095 #define AV_LOG_INFO 1 | 2112 #define AV_LOG_INFO 1 |
| 2096 #define AV_LOG_DEBUG 2 | 2113 #define AV_LOG_DEBUG 2 |
| 2097 | 2114 |
| 2098 extern void av_log(AVCodecContext*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); | 2115 extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); |
| 2099 extern void av_vlog(AVCodecContext*, int level, const char *fmt, va_list); | 2116 extern void av_vlog(void*, int level, const char *fmt, va_list); |
| 2100 extern int av_log_get_level(void); | 2117 extern int av_log_get_level(void); |
| 2101 extern void av_log_set_level(int); | 2118 extern void av_log_set_level(int); |
| 2102 extern void av_log_set_callback(void (*)(AVCodecContext*, int, const char*, va_list)); | 2119 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list)); |
| 2103 | |
| 2104 #undef AV_LOG_TRAP_PRINTF | |
| 2105 #ifdef AV_LOG_TRAP_PRINTF | |
| 2106 #define printf DO NOT USE | |
| 2107 #define fprintf DO NOT USE | |
| 2108 #undef stderr | |
| 2109 #define stderr DO NOT USE | |
| 2110 #endif | |
| 2111 | 2120 |
| 2112 #ifdef __cplusplus | 2121 #ifdef __cplusplus |
| 2113 } | 2122 } |
| 2114 #endif | 2123 #endif |
| 2115 | 2124 |
