diff options
| author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-04 18:16:37 +0000 |
|---|---|---|
| committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-04 18:16:37 +0000 |
| commit | 1258f00aaa71c16800717caf628f69f2e8e6f4ca (patch) | |
| tree | cfc9e8095c8a24b463dbcdf195962183861413d2 /src/xine-engine | |
| parent | 9ce813b22bb06b78c97c5c249e8feeb2ec1441bd (diff) | |
| download | xine-lib-1258f00aaa71c16800717caf628f69f2e8e6f4ca.tar.gz xine-lib-1258f00aaa71c16800717caf628f69f2e8e6f4ca.tar.bz2 | |
Report the identifiers of unrecognised video & audio codecs.
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! |
