summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xine.h.in28
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/xine.c12
-rw-r--r--src/xine-engine/xine_interface.c41
-rw-r--r--src/xine-engine/xine_internal.h8
5 files changed, 60 insertions, 32 deletions
diff --git a/include/xine.h.in b/include/xine.h.in
index 48feb1b17..81f55fd34 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.12 2002/09/11 17:41:07 guenter Exp $
+ * $Id: xine.h.in,v 1.13 2002/09/13 18:25:22 guenter Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -135,12 +135,13 @@ int xine_trick_mode (xine_p self, int mode, int value);
/*
* get information about the stream such as
- * video width/height, codecs, audio format, ...
+ * video width/height, codecs, audio format, title, author...
*
* constants see below
*/
-uint32_t xine_get_stream_info (xine_p self, int info);
+uint32_t xine_get_stream_info (xine_p self, int info);
+const char *xine_get_meta_info (xine_p self, int info);
/*
* stop playback
@@ -300,6 +301,9 @@ int xine_register_report_codec_cb(xine_p self,
#define XINE_PARAM_VIDEO_CHANNEL 5
#define XINE_PARAM_AUDIO_VOLUME 6
#define XINE_PARAM_AUDIO_MUTE 7
+#define XINE_PARAM_AUDIO_COMPR_LEVEL 8
+#define XINE_PARAM_AUDIO_AMP_LEVEL 9
+#define XINE_PARAM_AUDIO_REPORT_LEVEL 10
/* stream format detection strategies */
@@ -352,6 +356,15 @@ int xine_register_report_codec_cb(xine_p self,
#define XINE_STREAM_INFO_AUDIO_SAMPLERATE 9
#define XINE_STREAM_INFO_HAS_CHAPTERS 10
+/* xine_get_meta_info */
+
+#define XINE_META_INFO_TITLE 0
+#define XINE_META_INFO_COMMENT 1
+#define XINE_META_INFO_ARTIST 2
+#define XINE_META_INFO_GENRE 3
+#define XINE_META_INFO_ALBUM 4
+#define XINE_META_INFO_YEAR 5
+
/*
* video stuff
*/
@@ -785,6 +798,7 @@ void xine_reset_config (xine_p self);
#define XINE_EVENT_OUTPUT_NO_VIDEO 43
#define XINE_EVENT_UI_MESSAGE 44 /* message (dialog) for the ui to display */
+#define XINE_EVENT_AUDIO_LEVEL 45 /* report current audio level (l/r) */
/*
* generic event type.
@@ -881,6 +895,14 @@ typedef struct {
uint32_t scr;
} xine_closed_caption_event_t;
+/*
+ * audio level for left/right channel
+ */
+typedef struct {
+ xine_event_t event;
+ int left, right; /* 0..255 */
+} xine_audio_level_event_t;
+
/* event listener callback */
typedef void (*xine_event_listener_cb_t) (void *user_data,
xine_event_t *event);
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 702f1cfa9..3ecbfc7c9 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.h,v 1.68 2002/09/01 21:14:12 tmmm Exp $
+ * $Id: buffer.h,v 1.69 2002/09/13 18:25:23 guenter Exp $
*
*
* contents:
@@ -75,6 +75,7 @@ extern "C" {
#define BUF_CONTROL_SPU_CHANNEL 0x01060000
#define BUF_CONTROL_NEWPTS 0x01070000
#define BUF_CONTROL_RESET_DECODER 0x01080000
+#define BUF_CONTROL_HEADERS_DONE 0x01090000
/* video buffer types: (please keep in sync with buffer_types.c) */
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index ea58bfc7a..bc873030a 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.156 2002/09/11 17:41:08 guenter Exp $
+ * $Id: xine.c,v 1.157 2002/09/13 18:25:23 guenter Exp $
*
* top-level xine functions
*
@@ -415,6 +415,16 @@ int xine_open_internal (xine_t *this, const char *mrl) {
if (this->status == XINE_STATUS_STOP ) {
plugin_node_t *node;
+ int i;
+
+ /*
+ * reset metainfo
+ */
+
+ for (i=0; i<XINE_STREAM_INFO_MAX; i++) {
+ this->stream_info[i] = 0;
+ this->meta_info [i] = NULL;
+ }
/*
* find input plugin
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 66e141dbe..0b2532141 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_interface.c,v 1.10 2002/09/11 17:41:08 guenter Exp $
+ * $Id: xine_interface.c,v 1.11 2002/09/13 18:25:23 guenter Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -384,50 +384,39 @@ int xine_get_param (xine_p this, int param) {
}
uint32_t xine_get_stream_info (xine_p this, int info) {
- printf ("xine_interface: xine_get_stream_info: not implemented\n");
switch (info) {
- case XINE_STREAM_INFO_WIDTH:
- return 0; /* FIXME */
-
- case XINE_STREAM_INFO_HEIGHT:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_SEEKABLE:
if (this->cur_input_plugin)
return this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_SEEKABLE;
return 0;
+ case XINE_STREAM_INFO_HAS_CHAPTERS:
+ if (this->cur_input_plugin)
+ return this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_CHAPTERS;
+ return 0;
+
+ case XINE_STREAM_INFO_WIDTH:
+ case XINE_STREAM_INFO_HEIGHT:
case XINE_STREAM_INFO_VIDEO_FOURCC:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_VIDEO_CHANNELS:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_VIDEO_STREAMS:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_AUDIO_FOURCC:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_AUDIO_CHANNELS:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_AUDIO_BITS:
- return 0; /* FIXME */
-
case XINE_STREAM_INFO_AUDIO_SAMPLERATE:
- return 0; /* FIXME */
+ return this->stream_info[info];
- case XINE_STREAM_INFO_HAS_CHAPTERS:
- if (this->cur_input_plugin)
- return this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_CHAPTERS;
- return 0;
default:
- printf ("xine_interface: error, unknown info (%d) requested\n",
+ printf ("xine_interface: error, unknown stream info (%d) requested\n",
info);
}
return 0;
}
+const char *xine_get_meta_info (xine_p this, int info) {
+
+ return this->meta_info[info];
+}
+
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 189a04191..cfa9d684a 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_internal.h,v 1.98 2002/09/11 17:41:08 guenter Exp $
+ * $Id: xine_internal.h,v 1.99 2002/09/13 18:25:23 guenter Exp $
*
*/
@@ -136,6 +136,8 @@ struct audio_decoder_s {
#define XINE_LOG_PLUGIN 2
#define XINE_LOG_NUM 3 /* # of log buffers defined */
+#define XINE_STREAM_INFO_MAX 99
+
/*
* the big xine struct, holding everything together
*/
@@ -240,6 +242,10 @@ struct xine_s {
int playing_logo;
int curtime_needed_for_osd;
pthread_mutex_t osd_lock;
+
+ /* stream meta information */
+ int stream_info[XINE_STREAM_INFO_MAX];
+ char *meta_info [XINE_STREAM_INFO_MAX];
};
/*