summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-28 16:53:47 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-28 16:53:47 +0100
commitd1949261589719fefad3add8cade4d6a29e6e81c (patch)
tree9aa3f2d91f3a06f4d11410238b73fcfe348b1e76
parent9c065e76536c058a2d6c083879f7c9d2898f7780 (diff)
parent7e47ddb2c84ddaddfa859d49d336f92f8b6e53d3 (diff)
downloadxine-lib-d1949261589719fefad3add8cade4d6a29e6e81c.tar.gz
xine-lib-d1949261589719fefad3add8cade4d6a29e6e81c.tar.bz2
Merge from 1.2 main branch.
-rw-r--r--ChangeLog4
-rw-r--r--TODO1
-rw-r--r--include/xine.h.in1
-rw-r--r--src/input/input_http.c20
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c32
5 files changed, 40 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 28a795a3f..08cd301b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,9 @@ xine-lib (1.1.90) (Unreleased)
FreeType2 and the standard bitmap fonts for OSD.
* Replace internal libdts 0.0.2 with libdca 0.0.5, and contextually move it
to contrib/libdca to separate from xine's own code.
+ * Add another message code to allow for auth prompts. Previously, it was
+ not possible to distinguish between 401 Authentication Requried and 403
+ Forbidden.
xine-lib (1.1.7) (unreleased)
* Support libdca (new name for libdts) by shuffling around the dts.h file.
@@ -35,6 +38,7 @@ xine-lib (1.1.7) (unreleased)
* Allow XxMC to switch back to software decoding; don't deinterlace if it's
not needed for any given frame.
* Document dvba: MRLs (ATSC with full tuning info).
+ * Fix VCD playback (broken since 1.1.4).
xine-lib (1.1.6)
* Split the DirectFB plugin into X11 and non-X versions.
diff --git a/TODO b/TODO
index 1745fa97a..d7dc45ca8 100644
--- a/TODO
+++ b/TODO
@@ -19,6 +19,7 @@ For 1.2 series
- handle gracefully the runtime removal of the audio output device (being
it a physical removal for USB devices or a missing output on a client-server
design like PulseAudio, ESounD or Jack);
+- HTTPS.
known bugs
==========
diff --git a/include/xine.h.in b/include/xine.h.in
index facee6e31..8425cc17d 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -1932,6 +1932,7 @@ typedef struct {
#define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11 /* none */
#define XINE_MSG_PERMISSION_ERROR 12 /* (file name or mrl) */
#define XINE_MSG_FILE_EMPTY 13 /* file is empty */
+#define XINE_MSG_AUTHENTICATION_NEEDED 14 /* (mrl, likely http) */
/* opaque xine_event_queue_t */
typedef struct xine_event_queue_s xine_event_queue_t;
diff --git a/src/input/input_http.c b/src/input/input_http.c
index 6e8932700..12b7f3f35 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -93,16 +93,18 @@ typedef struct {
char preview[MAX_PREVIEW_SIZE];
off_t preview_size;
-
+
+ /* 2 spare bytes here */
+
+ /* NSV */
+ unsigned char is_nsv; /* bool */
+
/* ShoutCast */
- int shoutcast_mode;
+ unsigned char shoutcast_mode; /* bool */
int shoutcast_metaint;
off_t shoutcast_pos;
char *shoutcast_songtitle;
- /* NSV */
- int is_nsv;
-
/* scratch buffer for forward seeking */
char seek_buf[BUFSIZE];
@@ -829,7 +831,13 @@ static int http_plugin_open (input_plugin_t *this_gen ) {
_("input_http: http status not 2xx: >%d %s<\n"),
httpcode, httpstatus);
return -7;
- } else if (httpcode == 403 || httpcode == 401) {
+ } else if (httpcode == 401) {
+ _x_message(this->stream, XINE_MSG_AUTHENTICATION_NEEDED, this->mrl, NULL);
+ xine_log (this->stream->xine, XINE_LOG_MSG,
+ _("input_http: http status not 2xx: >%d %s<\n"),
+ httpcode, httpstatus);
+ return -8;
+ } else if (httpcode == 403) {
_x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, NULL);
xine_log (this->stream->xine, XINE_LOG_MSG,
_("input_http: http status not 2xx: >%d %s<\n"),
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index b234be6d1..0f1c9225e 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -160,6 +160,7 @@ struct vcd_input_plugin_tag {
region; false otherwise */
vcdplayer_t player ;
+ char *player_device;
};
vcd_input_plugin_t my_vcd;
@@ -348,7 +349,9 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
*/
return false;
}
-
+
+ free (my_vcd.player_device);
+ my_vcd.player_device = strdup (vcd_device);
p_vcdinfo = vcdplayer->vcd;
i_entries = vcdplayer->i_entries;
class->mrl_track_offset = -1;
@@ -447,9 +450,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device)
"offsets are track: %d, entry: %d, play: %d seg: %d\n",
class->mrl_track_offset, class->mrl_entry_offset,
class->mrl_play_offset, class->mrl_segment_offset);
-
- if (!was_open)
- vcdio_close(vcdplayer);
+
return true;
}
@@ -688,6 +689,13 @@ vcd_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo,
/* Should we change this to <= instead of !=? */
if (i_len != M2F2_SECTOR_SIZE) return NULL;
+ /* If VCD isn't open, we need to open it now. */
+ if (!p_vcdplayer->b_opened) {
+ if (!vcdio_open(p_vcdplayer, my_vcd.player_device)) {
+ return NULL;
+ }
+ }
+
if (vcd_handle_events()) goto read_block;
if (p_vcdplayer->i_still > 0) {
@@ -920,7 +928,8 @@ vcd_close(vcd_input_class_t *class)
{
xine_free_mrls(&(class->num_mrls), class->mrls);
FREE_AND_NULL(my_vcd.mrl);
- vcdio_close(&my_vcd.player);
+ if (my_vcd.player.b_opened)
+ vcdio_close(&my_vcd.player);
}
@@ -941,7 +950,8 @@ vcd_class_eject_media (input_class_t *this_gen)
ret = cdio_eject_media(&cdio);
if ((ret == 0) || (ret == 2)) {
- vcdio_close(&my_vcd.player);
+ if (my_vcd.player.b_opened)
+ vcdio_close(&my_vcd.player);
return 1;
} else return 0;
}
@@ -1408,12 +1418,8 @@ vcd_plugin_dispose(input_plugin_t *this_gen)
my_vcd.stream = NULL;
-#if 0
- vcd_input_plugin_t *t= (vcd_input_plugin_t *) this_gen;
- vcdplayer_t *this = t->v;
-
- if (NULL==this) return;
-#endif
+ if (my_vcd.player.b_opened)
+ vcdio_close(&my_vcd.player);
}
/* Pointer to vcdimager default log handler. Set by init_input_plugin
@@ -1972,6 +1978,8 @@ _("For tracking down bugs in the VCD plugin. Mask values are:\n"
my_vcd.player.play_item.num = VCDINFO_INVALID_ENTRY;
my_vcd.player.play_item.type = VCDINFO_ITEM_TYPE_ENTRY;
+ my_vcd.player_device = NULL;
+
return class;
}