summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-10-22 17:10:20 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-10-22 17:10:20 +0000
commit281d2f5ebe47b9b0cad4c5167f63d38a47a5f64f (patch)
treebc8cf179b1f7eebdc11b8bf3e66fba58dd36c22d /src
parent6431c857a1de186f1f73238cb42a7120db27e11a (diff)
downloadxine-lib-281d2f5ebe47b9b0cad4c5167f63d38a47a5f64f.tar.gz
xine-lib-281d2f5ebe47b9b0cad4c5167f63d38a47a5f64f.tar.bz2
added xine_is_stream_seekable function, minor code cleanups
CVS patchset: 858 CVS date: 2001/10/22 17:10:20
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/load_plugins.c123
-rw-r--r--src/xine-engine/xine.c8
-rw-r--r--src/xine-engine/xine_internal.h8
3 files changed, 78 insertions, 61 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index d533bd01d..73598c9af 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.45 2001/10/20 02:01:51 guenter Exp $
+ * $Id: load_plugins.c,v 1.46 2001/10/22 17:10:20 guenter Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -362,31 +362,33 @@ void load_decoder_plugins (xine_t *this,
str, dlerror());
} else {
- void *(*initplug) (int, config_values_t *);
int plugin_prio;
/*
* does this plugin provide an spu decoder plugin?
*/
-
- if((initplug = dlsym(plugin, "init_spu_decoder_plugin")) != NULL) {
-
- spu_decoder_t *sdp;
- int streamtype;
-
- sdp = (spu_decoder_t *) initplug(4, this);
- if (sdp) {
- sdp->metronom = this->metronom;
-
- for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
- if ((plugin_prio =
- decide_spu_insert(sdp, streamtype, spu_prio[streamtype]))) {
- this->spu_decoder_plugins[streamtype] = sdp;
- spu_prio[streamtype] = plugin_prio;
- }
+ {
+ void *(*initplug) (int, xine_t *);
+
+ if((initplug = dlsym(plugin, "init_spu_decoder_plugin")) != NULL) {
- printf("spu decoder plugin found : %s\n",
- sdp->get_identifier());
+ spu_decoder_t *sdp;
+ int streamtype;
+
+ sdp = (spu_decoder_t *) initplug(4, this);
+ if (sdp) {
+ sdp->metronom = this->metronom;
+
+ for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
+ if ((plugin_prio =
+ decide_spu_insert(sdp, streamtype, spu_prio[streamtype]))) {
+ this->spu_decoder_plugins[streamtype] = sdp;
+ spu_prio[streamtype] = plugin_prio;
+ }
+
+ printf("spu decoder plugin found : %s\n",
+ sdp->get_identifier());
+ }
}
}
@@ -394,51 +396,54 @@ void load_decoder_plugins (xine_t *this,
* does this plugin provide an video decoder plugin?
*/
- if((initplug = dlsym(plugin, "init_video_decoder_plugin")) != NULL) {
-
- video_decoder_t *vdp;
- int streamtype;
+ {
+ void *(*initplug) (int, config_values_t *);
+ if((initplug = dlsym(plugin, "init_video_decoder_plugin")) != NULL) {
- vdp = (video_decoder_t *) initplug(iface_version, config);
- if (vdp) {
- vdp->metronom = this->metronom;
-
- for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
- if ((plugin_prio =
- decide_video_insert(vdp, streamtype, video_prio[streamtype]))) {
- this->video_decoder_plugins[streamtype] = vdp;
- video_prio[streamtype] = plugin_prio;
- }
-
- printf("video decoder plugin found : %s\n",
- vdp->get_identifier());
- }
- }
-
- /*
- * does this plugin provide an audio decoder plugin?
- */
-
- if((initplug = dlsym(plugin, "init_audio_decoder_plugin")) != NULL) {
-
- audio_decoder_t *adp;
- int streamtype;
+ video_decoder_t *vdp;
+ int streamtype;
- adp = (audio_decoder_t *) initplug(iface_version, config);
- if (adp) {
+ vdp = (video_decoder_t *) initplug(iface_version, config);
+ if (vdp) {
+ vdp->metronom = this->metronom;
+
+ for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
+ if ((plugin_prio =
+ decide_video_insert(vdp, streamtype, video_prio[streamtype]))) {
+ this->video_decoder_plugins[streamtype] = vdp;
+ video_prio[streamtype] = plugin_prio;
+ }
+
+ printf("video decoder plugin found : %s\n",
+ vdp->get_identifier());
+ }
+ }
- for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
- if ((plugin_prio =
- decide_audio_insert(adp, streamtype, audio_prio[streamtype]))) {
- this->audio_decoder_plugins[streamtype] = adp;
- audio_prio[streamtype] = plugin_prio;
- }
+ /*
+ * does this plugin provide an audio decoder plugin?
+ */
+
+ if((initplug = dlsym(plugin, "init_audio_decoder_plugin")) != NULL) {
- printf("audio decoder plugin found : %s\n",
- adp->get_identifier());
+ audio_decoder_t *adp;
+ int streamtype;
+
+ adp = (audio_decoder_t *) initplug(iface_version, config);
+ if (adp) {
+
+ for (streamtype = 0; streamtype<DECODER_PLUGIN_MAX; streamtype++)
+ if ((plugin_prio =
+ decide_audio_insert(adp, streamtype, audio_prio[streamtype]))) {
+ this->audio_decoder_plugins[streamtype] = adp;
+ audio_prio[streamtype] = plugin_prio;
+ }
+
+ printf("audio decoder plugin found : %s\n",
+ adp->get_identifier());
+ }
}
+
}
-
}
}
}
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 694729a66..40164625b 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.71 2001/10/20 22:18:59 miguelfreitas Exp $
+ * $Id: xine.c,v 1.72 2001/10/22 17:10:21 guenter Exp $
*
* top-level xine functions
*
@@ -671,3 +671,9 @@ void xine_get_audio_lang (xine_t *this, char *str) {
}
+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 0;
+}
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 8582793b1..9985d521e 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.51 2001/10/20 02:01:51 guenter Exp $
+ * $Id: xine_internal.h,v 1.52 2001/10/22 17:10:21 guenter Exp $
*
*/
@@ -318,6 +318,12 @@ void xine_select_spu_channel (xine_t *this, int channel);
void xine_get_spu_lang (xine_t *this, char *str);
/*
+ * check if the stream is seekable (at the moment)
+ */
+
+int xine_is_stream_seekable (xine_t *this);
+
+/*
* exit xine
*/
void xine_exit (xine_t *this);