summaryrefslogtreecommitdiff
path: root/src/demuxers/id3.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/id3.h')
-rw-r--r--src/demuxers/id3.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/demuxers/id3.h b/src/demuxers/id3.h
index 2d8970ea7..9d08f6817 100644
--- a/src/demuxers/id3.h
+++ b/src/demuxers/id3.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2003 the xine project
+ * Copyright (C) 2000-2007 the xine project
*
* This file is part of xine, a free video player.
*
@@ -21,7 +21,7 @@
*
* Supported versions: v1, v1.1, v2.2, v2.3, v2.4
*
- * $Id: id3.h,v 1.4 2005/09/15 18:45:15 tmattern Exp $
+ * $Id: id3.h,v 1.6 2007/03/03 01:41:16 dgp85 Exp $
*/
#ifndef ID3_H
@@ -38,6 +38,7 @@
#define ID3V24_TAG FOURCC_TAG('I', 'D', '3', 4) /* id3 v2.4 header tag */
#define ID3V24_FOOTER_TAG FOURCC_TAG('3', 'D', 'I', 0) /* id3 v2.4 footer tag */
+
/*
* ID3 v2.2
*/
@@ -164,4 +165,24 @@ int id3v24_parse_tag(input_plugin_t *input,
xine_stream_t *stream,
int8_t *mp3_frame_header);
+/* Generic function that switch between the three above */
+int id3v2_parse_tag(input_plugin_t *input,
+ xine_stream_t *stream,
+ int8_t *mp3_frame_header);
+
+static inline int id3v2_istag(uint8_t *ptr) {
+ return
+ (ptr[0] == 'I') &&
+ (ptr[1] == 'D') &&
+ (ptr[2] == '3');
+}
+
+static inline uint32_t id3v2_tagsize(uint8_t *ptr) {
+ return
+ ((uint32_t)ptr[0] << 21) +
+ ((uint32_t)ptr[1] << 14) +
+ ((uint32_t)ptr[2] << 7) +
+ (uint32_t)ptr[3];
+}
+
#endif /* ID3_H */