diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/buffer_types.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index c7b6ae860..b0e01db31 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -33,6 +33,8 @@ #include <stdlib.h> #include <inttypes.h> #include <xine/buffer.h> +#include <xine/xineutils.h> +#include <xine/xine_internal.h> #include "bswap.h" typedef struct video_db_s { @@ -1209,6 +1211,43 @@ int i; return ""; } + +static void code_to_text (char ascii[5], uint32_t code) +{ + int i; + for (i = 0; i < 4; ++i) + { + int byte = code & 0xFF; + ascii[i] = (byte < ' ') ? ' ' : (byte >= 0x7F) ? '.' : (char) byte; + code >>= 8; + } +} + +void _x_report_video_fourcc (xine_t *xine, const char *module, uint32_t code) +{ + if (code) + { + char ascii[5]; + code_to_text (ascii, code); + xprintf (xine, XINE_VERBOSITY_LOG, + _("%s: unknown video FourCC code %#x \"%s\"\n"), + module, code, ascii); + } +} + +void _x_report_audio_format_tag (xine_t *xine, const char *module, uint32_t code) +{ + if (code) + { + char ascii[5]; + code_to_text (ascii, code); + xprintf (xine, XINE_VERBOSITY_LOG, + _("%s: unknown audio format tag code %#x \"%s\"\n"), + module, code, ascii); + } +} + + void _x_bmiheader_le2me( xine_bmiheader *bih ) { /* OBS: fourcc must be read using machine endianness * so don't play with biCompression here! |