diff options
-rw-r--r-- | include/xine.h.in | 16 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 10 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 57 |
3 files changed, 63 insertions, 20 deletions
diff --git a/include/xine.h.in b/include/xine.h.in index f9a7b5c8a..089e14c16 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,10 +17,14 @@ * 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.4 2002/09/05 20:59:14 guenter Exp $ + * $Id: xine.h.in,v 1.5 2002/09/05 23:20:20 guenter Exp $ * * public xine-lib (libxine) interface and documentation * + * _important_note_: as a rule of thumb, never free() any pointers + * returned by the xine engine + * (unless stated otherwise) + * */ #ifndef HAVE_XINE_H @@ -165,12 +169,6 @@ int xine_get_param (xine_t *self, int param); int xine_get_audio_lang (xine_t *self, int channel, char *str); int xine_get_spu_lang (xine_t *self, int channel, char *str); -/* - * check if the stream is seekable (at the moment). - * this state may change during playback - */ -int xine_is_stream_seekable (xine_t *self); - /* * get position / length information * @@ -278,6 +276,7 @@ int xine_register_report_codec_cb(xine_t *self, #define XINE_PARAM_AUDIO_CHANNEL_LOGICAL 3 #define XINE_PARAM_SPU_CHANNEL 4 #define XINE_PARAM_VIDEO_CHANNEL 5 +#define XINE_PARAM_AUDIO_VOLUME 6 /* stream format detection strategies */ @@ -328,6 +327,7 @@ int xine_register_report_codec_cb(xine_t *self, #define XINE_STREAM_INFO_AUDIO_CHANNELS 7 #define XINE_STREAM_INFO_AUDIO_BITS 8 #define XINE_STREAM_INFO_AUDIO_SAMPLERATE 9 +#define XINE_STREAM_INFO_HAS_CHAPTERS 10 /* * video stuff @@ -814,7 +814,7 @@ typedef struct { char *message; char *button0, *button1, *button2; int num_buttons; - int resposne; + int response; } xine_ui_message_event_t; /* diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index f3768099e..69435755f 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.150 2002/09/05 12:51:18 guenter Exp $ + * $Id: xine.c,v 1.151 2002/09/05 23:20:21 guenter Exp $ * * top-level xine functions * @@ -1035,14 +1035,6 @@ int xine_get_spu_channel (xine_t *this) { return this->spu_channel_user; } -int xine_is_stream_seekable (xine_t *this) { - - if (this->cur_input_plugin) - return this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_SEEKABLE; - - return -1; -} - osd_renderer_t *xine_get_osd_renderer (xine_t *this) { return this->osd_renderer; diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index a0c594c07..695697511 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.3 2002/09/05 20:19:50 guenter Exp $ + * $Id: xine_interface.c,v 1.4 2002/09/05 23:20:21 guenter Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -314,6 +314,10 @@ void xine_set_param (xine_t *this, int param, int value) { this->video_channel = value; pthread_mutex_unlock (&this->xine_lock); break; + + case XINE_PARAM_AUDIO_VOLUME: + break; /* FIXME: implement */ + } } @@ -335,6 +339,9 @@ int xine_get_param (xine_t *this, int param) { case XINE_PARAM_VIDEO_CHANNEL: return this->video_channel; + case XINE_PARAM_AUDIO_VOLUME: + return -1; /* FIXME: implement */ + default: printf ("xine_interface: unknown param %d\n", param); abort (); @@ -343,7 +350,51 @@ int xine_get_param (xine_t *this, int param) { return 0; } -uint32_t xine_get_stream_info (xine_t *self, int info) { +uint32_t xine_get_stream_info (xine_t *this, int info) { printf ("xine_interface: xine_get_stream_info: not implemented\n"); - abort(); + + 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_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 */ + + 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", + info); + } + return 0; } + |