From: <li...@yo...> - 2007-05-28 15:55:41
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1180367726 -3600 # Node ID ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 # Parent f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 # Parent 707eca8b095ee1ea63e7f8ac6a534e9331d57cb8 Merge from 1.2-newbuild. diff -r ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 -r f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 ChangeLog --- a/ChangeLog Mon May 28 16:55:26 2007 +0100 +++ b/ChangeLog Thu May 24 13:05:17 2007 -0400 @@ -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 -r ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 -r f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 TODO --- a/TODO Mon May 28 16:55:26 2007 +0100 +++ b/TODO Thu May 24 13:05:17 2007 -0400 @@ -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 -r ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 -r f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 include/xine.h.in --- a/include/xine.h.in Mon May 28 16:55:26 2007 +0100 +++ b/include/xine.h.in Thu May 24 13:05:17 2007 -0400 @@ -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 -r ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 -r f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 src/input/input_http.c --- a/src/input/input_http.c Mon May 28 16:55:26 2007 +0100 +++ b/src/input/input_http.c Thu May 24 13:05:17 2007 -0400 @@ -93,15 +93,17 @@ 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 */ @@ -829,7 +831,13 @@ static int http_plugin_open (input_plugi _("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 -r ecff4bb7b4fc830ba7ab2cb3bdfdd43b060bc881 -r f07dd3c4be45b7a4db8449f749c8f51f032fb5c3 src/input/vcd/xineplug_inp_vcd.c --- a/src/input/vcd/xineplug_inp_vcd.c Mon May 28 16:55:26 2007 +0100 +++ b/src/input/vcd/xineplug_inp_vcd.c Thu May 24 13:05:17 2007 -0400 @@ -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 *cl */ 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 *cl "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 *t /* 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 *th 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_ 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 plu 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; } |