From fa9d7c47d4c2653b601ac877cf3556d70fe24cfe Mon Sep 17 00:00:00 2001 From: phintuka Date: Fri, 10 Dec 2010 10:47:25 +0000 Subject: Renamed current_title --> current_title_idx --- xine/BluRay/input_bluray.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/xine/BluRay/input_bluray.c b/xine/BluRay/input_bluray.c index cc9946a6..ffce1b4a 100644 --- a/xine/BluRay/input_bluray.c +++ b/xine/BluRay/input_bluray.c @@ -116,7 +116,7 @@ typedef struct { BLURAY *bdh; int num_titles; - int current_title; + int current_title_idx; BLURAY_TITLE_INFO *title_info; int current_clip; int error; @@ -211,16 +211,16 @@ static void update_title_info(bluray_input_plugin_t *this) { if (this->title_info) bd_free_title_info(this->title_info); - this->title_info = bd_get_title_info(this->bdh, this->current_title); + this->title_info = bd_get_title_info(this->bdh, this->current_title_idx); if (!this->title_info) { - LOGMSG("bd_get_title_info(%d) failed\n", this->current_title); + LOGMSG("bd_get_title_info(%d) failed\n", this->current_title_idx); return; } #ifdef LOG int ms = this->title_info->duration / INT64_C(90000); lprintf("Opened title %d. Length %"PRId64" bytes / %02d:%02d:%02d.%03d\n", - this->current_title, bd_get_title_size(this->bdh), + this->current_title_idx, bd_get_title_size(this->bdh), ms / 3600000, (ms % 3600000 / 60000), (ms % 60000) / 1000, ms % 1000); #endif @@ -235,10 +235,10 @@ static void update_title_info(bluray_input_plugin_t *this) }; if (this->disc_name && this->disc_name[0]) udata.str_len = snprintf(udata.str, sizeof(udata.str), "%s, Title %d/%d", - this->disc_name, this->current_title + 1, this->num_titles); + this->disc_name, this->current_title_idx + 1, this->num_titles); else udata.str_len = snprintf(udata.str, sizeof(udata.str), "Title %d/%d", - this->current_title + 1, this->num_titles); + this->current_title_idx + 1, this->num_titles); xine_event_send(this->stream, &uevent); _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, udata.str); @@ -264,7 +264,7 @@ static void update_title_info(bluray_input_plugin_t *this) /* set stream info */ _x_stream_info_set(this->stream, XINE_STREAM_INFO_DVD_TITLE_COUNT, this->num_titles); - _x_stream_info_set(this->stream, XINE_STREAM_INFO_DVD_TITLE_NUMBER, this->current_title + 1); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_DVD_TITLE_NUMBER, this->current_title_idx + 1); update_stream_info(this); } @@ -276,7 +276,7 @@ static int open_title (bluray_input_plugin_t *this, int title) return 0; } - this->current_title = title; + this->current_title_idx = title; update_title_info(this); @@ -322,7 +322,7 @@ static void handle_libbluray_event(bluray_input_plugin_t *this, BD_EVENT ev) case BD_EVENT_PLAYLIST: lprintf("BD_EVENT_PLAYLIST %d\n", ev.param); - this->current_title = bd_get_current_title(this->bdh); + this->current_title_idx = bd_get_current_title(this->bdh); update_title_info(this); break; @@ -414,13 +414,13 @@ static void handle_events(bluray_input_plugin_t *this) case XINE_EVENT_INPUT_LEFT: lprintf("XINE_EVENT_INPUT_LEFT: next title\n"); - open_title(this, MAX(0, this->current_title - 1)); + open_title(this, MAX(0, this->current_title_idx - 1)); stream_reset(this); break; case XINE_EVENT_INPUT_RIGHT: lprintf("XINE_EVENT_INPUT_RIGHT: previous title\n"); - open_title(this, MIN(this->num_titles, this->current_title + 1)); + open_title(this, MIN(this->num_titles, this->current_title_idx + 1)); stream_reset(this); break; } @@ -450,8 +450,8 @@ static void handle_events(bluray_input_plugin_t *this) lprintf("XINE_EVENT_INPUT_NEXT: next chapter\n"); if (chapter >= this->title_info->chapter_count) { - if (this->current_title < this->num_titles - 1) { - open_title(this, this->current_title + 1); + if (this->current_title_idx < this->num_titles - 1) { + open_title(this, this->current_title_idx + 1); stream_reset(this); } } else { @@ -467,8 +467,8 @@ static void handle_events(bluray_input_plugin_t *this) lprintf("XINE_EVENT_INPUT_PREVIOUS: previous chapter\n"); - if (chapter < 0 && this->current_title > 0) { - open_title(this, this->current_title - 1); + if (chapter < 0 && this->current_title_idx > 0) { + open_title(this, this->current_title_idx - 1); stream_reset(this); } else { chapter = MAX(0, chapter); @@ -922,7 +922,7 @@ static int bluray_plugin_open (input_plugin_t *this_gen) LOGMSG("bd_play() failed\n"); return -1; } - this->current_title = -1; + this->current_title_idx = -1; } else if (open_title(this, title) <= 0 && open_title(this, 0) <= 0) -- cgit v1.2.3