diff --git a/libavcodec/h264.c b/libavcodec/h264.c
-index 3660597..bf4e072 100644
+index 848d6a2..5a12fdb 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
-@@ -2163,6 +2163,7 @@ static void flush_dpb(AVCodecContext *avctx)
+@@ -2164,6 +2164,7 @@ static void flush_dpb(AVCodecContext *avctx)
flush_change(h);
ff_mpeg_flush(avctx);
}
static int init_poc(H264Context *h)
-@@ -3981,9 +3982,18 @@ again:
+@@ -3992,9 +3993,18 @@ again:
if ((err = decode_slice_header(hx, h)))
break;
if (h->current_slice == 1) {
if (!(s->flags2 & CODEC_FLAG2_CHUNKS))
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
-index 8596121..23daee3 100644
+index 898ebf7..42aaa6f 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -568,6 +568,13 @@ typedef struct H264Context {
+++ /dev/null
-diff --git a/libswscale/utils.c b/libswscale/utils.c
-index f0a2b46..61506c6 100644
---- a/libswscale/utils.c
-+++ b/libswscale/utils.c
-@@ -531,7 +531,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos,
- // FIXME try to align filterPos if possible
-
- // fix borders
-- if (is_horizontal) {
-+ // This "horizontal" only check causes a subsequent assert when
-+ // upscaling.
-+ /*if (is_horizontal)*/ {
- for (i = 0; i < dstW; i++) {
- int j;
- if ((*filterPos)[i] < 0) {
+++ /dev/null
-diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
-index d1a3dc1..31c79c9 100644
---- a/libavcodec/mlp_parser.c
-+++ b/libavcodec/mlp_parser.c
-@@ -126,7 +126,7 @@ static uint64_t truehd_layout(int chanmap)
-
- int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
- {
-- int ratebits;
-+ int ratebits, channel_arrangement;
- uint16_t checksum;
-
- assert(get_bits_count(gb) == 0);
-@@ -157,7 +157,9 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
-
- skip_bits(gb, 11);
-
-- mh->channels_mlp = get_bits(gb, 5);
-+ channel_arrangement = get_bits(gb, 5);
-+ mh->channels_mlp = mlp_channels[channel_arrangement];
-+ mh->channel_layout_mlp = mlp_layout[channel_arrangement];
- } else if (mh->stream_type == 0xba) {
- mh->group1_bits = 24; // TODO: Is this information actually conveyed anywhere?
- mh->group2_bits = 0;
-@@ -168,11 +170,15 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
-
- skip_bits(gb, 8);
-
-- mh->channels_thd_stream1 = get_bits(gb, 5);
-+ channel_arrangement = get_bits(gb, 5);
-+ mh->channels_thd_stream1 = truehd_channels(channel_arrangement);
-+ mh->channel_layout_thd_stream1 = truehd_layout(channel_arrangement);
-
- skip_bits(gb, 2);
-
-- mh->channels_thd_stream2 = get_bits(gb, 13);
-+ channel_arrangement = get_bits(gb, 13);
-+ mh->channels_thd_stream2 = truehd_channels(channel_arrangement);
-+ mh->channel_layout_thd_stream2 = truehd_layout(channel_arrangement);
- } else
- return AVERROR_INVALIDDATA;
-
-@@ -316,16 +322,16 @@ static int mlp_parse(AVCodecParserContext *s,
-
- if (mh.stream_type == 0xbb) {
- /* MLP stream */
-- avctx->channels = mlp_channels[mh.channels_mlp];
-- avctx->channel_layout = mlp_layout[mh.channels_mlp];
-+ avctx->channels = mh.channels_mlp;
-+ avctx->channel_layout = mh.channel_layout_mlp;
- } else { /* mh.stream_type == 0xba */
- /* TrueHD stream */
- if (mh.channels_thd_stream2) {
-- avctx->channels = truehd_channels(mh.channels_thd_stream2);
-- avctx->channel_layout = truehd_layout(mh.channels_thd_stream2);
-+ avctx->channels = mh.channels_thd_stream2;
-+ avctx->channel_layout = mh.channel_layout_thd_stream2;
- } else {
-- avctx->channels = truehd_channels(mh.channels_thd_stream1);
-- avctx->channel_layout = truehd_layout(mh.channels_thd_stream1);
-+ avctx->channels = mh.channels_thd_stream1;
-+ avctx->channel_layout = mh.channel_layout_thd_stream1;
- }
- }
-
-diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
-index 35bb312..e874426 100644
---- a/libavcodec/mlp_parser.h
-+++ b/libavcodec/mlp_parser.h
-@@ -31,25 +31,28 @@
-
- typedef struct MLPHeaderInfo
- {
-- int stream_type; ///< 0xBB for MLP, 0xBA for TrueHD
-+ int stream_type; ///< 0xBB for MLP, 0xBA for TrueHD
-
-- int group1_bits; ///< The bit depth of the first substream
-- int group2_bits; ///< Bit depth of the second substream (MLP only)
-+ int group1_bits; ///< The bit depth of the first substream
-+ int group2_bits; ///< Bit depth of the second substream (MLP only)
-
-- int group1_samplerate; ///< Sample rate of first substream
-- int group2_samplerate; ///< Sample rate of second substream (MLP only)
-+ int group1_samplerate; ///< Sample rate of first substream
-+ int group2_samplerate; ///< Sample rate of second substream (MLP only)
-
-- int channels_mlp; ///< Channel arrangement for MLP streams
-- int channels_thd_stream1; ///< Channel arrangement for substream 1 of TrueHD streams (5.1)
-- int channels_thd_stream2; ///< Channel arrangement for substream 2 of TrueHD streams (7.1)
-+ int channels_mlp; ///< Channel count for MLP streams
-+ int channels_thd_stream1; ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")
-+ int channels_thd_stream2; ///< Channel count for substream 2 of TrueHD streams ("8-channel presentation")
-+ uint64_t channel_layout_mlp; ///< Channel layout for MLP streams
-+ uint64_t channel_layout_thd_stream1; ///< Channel layout for substream 1 of TrueHD streams ("6-channel presentation")
-+ uint64_t channel_layout_thd_stream2; ///< Channel layout for substream 2 of TrueHD streams ("8-channel presentation")
-
-- int access_unit_size; ///< Number of samples per coded frame
-- int access_unit_size_pow2; ///< Next power of two above number of samples per frame
-+ int access_unit_size; ///< Number of samples per coded frame
-+ int access_unit_size_pow2; ///< Next power of two above number of samples per frame
-
-- int is_vbr; ///< Stream is VBR instead of CBR
-- int peak_bitrate; ///< Peak bitrate for VBR, actual bitrate (==peak) for CBR
-+ int is_vbr; ///< Stream is VBR instead of CBR
-+ int peak_bitrate; ///< Peak bitrate for VBR, actual bitrate (==peak) for CBR
-
-- int num_substreams; ///< Number of substreams within stream
-+ int num_substreams; ///< Number of substreams within stream
- } MLPHeaderInfo;
-
-
-diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
-index 3852f6e..f8c647a 100644
---- a/libavcodec/mlpdec.c
-+++ b/libavcodec/mlpdec.c
-@@ -28,6 +28,7 @@
-
- #include "avcodec.h"
- #include "libavutil/intreadwrite.h"
-+#include "libavutil/channel_layout.h"
- #include "get_bits.h"
- #include "internal.h"
- #include "libavutil/crc.h"
-@@ -56,6 +57,8 @@ typedef struct SubStream {
- uint8_t max_matrix_channel;
- /// For each channel output by the matrix, the output channel to map it to
- uint8_t ch_assign[MAX_CHANNELS];
-+ /// The channel layout for this substream
-+ uint64_t ch_layout;
-
- /// Channel coding parameters for channels in the substream
- ChannelParams channel_params[MAX_CHANNELS];
-@@ -146,6 +149,36 @@ typedef struct MLPDecodeContext {
- MLPDSPContext dsp;
- } MLPDecodeContext;
-
-+static const uint64_t thd_channel_order[] = {
-+ AV_CH_FRONT_LEFT, AV_CH_FRONT_RIGHT, // LR
-+ AV_CH_FRONT_CENTER, // C
-+ AV_CH_LOW_FREQUENCY, // LFE
-+ AV_CH_SIDE_LEFT, AV_CH_SIDE_RIGHT, // LRs
-+ AV_CH_TOP_FRONT_LEFT, AV_CH_TOP_FRONT_RIGHT, // LRvh
-+ AV_CH_FRONT_LEFT_OF_CENTER, AV_CH_FRONT_RIGHT_OF_CENTER, // LRc
-+ AV_CH_BACK_LEFT, AV_CH_BACK_RIGHT, // LRrs
-+ AV_CH_BACK_CENTER, // Cs
-+ AV_CH_TOP_CENTER, // Ts
-+ AV_CH_SURROUND_DIRECT_LEFT, AV_CH_SURROUND_DIRECT_RIGHT, // LRsd
-+ AV_CH_WIDE_LEFT, AV_CH_WIDE_RIGHT, // LRw
-+ AV_CH_TOP_FRONT_CENTER, // Cvh
-+ AV_CH_LOW_FREQUENCY_2, // LFE2
-+};
-+
-+static uint64_t thd_channel_layout_extract_channel(uint64_t channel_layout,
-+ int index)
-+{
-+ int i;
-+
-+ if (av_get_channel_layout_nb_channels(channel_layout) <= index)
-+ return 0;
-+
-+ for (i = 0; i < FF_ARRAY_ELEMS(thd_channel_order); i++)
-+ if (channel_layout & thd_channel_order[i] && !index--)
-+ return thd_channel_order[i];
-+ return 0;
-+}
-+
- static VLC huff_vlc[3];
-
- /** Initialize static data, constant between all invocations of the codec. */
-@@ -325,6 +358,24 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
- for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
- m->substream[substr].restart_seen = 0;
-
-+ /* Set the layout for each substream. When there's more than one, the first
-+ * substream is Stereo. Subsequent substreams' layouts are indicated in the
-+ * major sync. */
-+ if (m->avctx->codec_id == AV_CODEC_ID_MLP) {
-+ if ((substr = (mh.num_substreams > 1)))
-+ m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO;
-+ m->substream[substr].ch_layout = mh.channel_layout_mlp;
-+ } else {
-+ if ((substr = (mh.num_substreams > 1)))
-+ m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO;
-+ if (mh.num_substreams > 2)
-+ if (mh.channel_layout_thd_stream2)
-+ m->substream[2].ch_layout = mh.channel_layout_thd_stream2;
-+ else
-+ m->substream[2].ch_layout = mh.channel_layout_thd_stream1;
-+ m->substream[substr].ch_layout = mh.channel_layout_thd_stream1;
-+ }
-+
- return 0;
- }
-
-@@ -426,6 +477,12 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
-
- for (ch = 0; ch <= s->max_matrix_channel; ch++) {
- int ch_assign = get_bits(gbp, 6);
-+ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD) {
-+ uint64_t channel = thd_channel_layout_extract_channel(s->ch_layout,
-+ ch_assign);
-+ ch_assign = av_get_channel_layout_channel_index(s->ch_layout,
-+ channel);
-+ }
- if (ch_assign > s->max_matrix_channel) {
- av_log_ask_for_sample(m->avctx,
- "Assignment of matrix channel %d to invalid output channel %d.\n",
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
-index 3852f6e..86aecf7 100644
+index 0eaf2e3..ef1812d 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
-@@ -394,14 +394,24 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
+@@ -445,14 +445,24 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
return AVERROR_INVALIDDATA;
}
}
s->noise_shift = get_bits(gbp, 4);
-@@ -463,8 +473,10 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
- cp->huff_lsbs = 24;
- }
-
-- if (substr == m->max_decoded_substream)
-- m->avctx->channels = s->max_matrix_channel + 1;
-+ if (substr == m->max_decoded_substream) {
-+ m->avctx->channels = s->max_matrix_channel + 1;
-+ m->avctx->channel_layout = s->ch_layout;
-+ }
-
- return 0;
- }
diff --git a/configure b/configure
-index e87a326..5ccfc0f 100755
+index aa31ea0..773e6bf 100755
--- a/configure
+++ b/configure
-@@ -3156,7 +3156,7 @@ EOF
+@@ -3167,7 +3167,7 @@ EOF
check_cc <<EOF || die "endian test failed"
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
diff --git a/configure b/configure
-index e87a326..422a7a5 100755
+index aa31ea0..a7f5380 100755
--- a/configure
+++ b/configure
-@@ -2878,6 +2878,7 @@ case $target_os in
+@@ -2889,6 +2889,7 @@ case $target_os in
AVSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
enabled x86_64 && objformat="macho64"
enabled_any pic shared ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
;;
-@@ -3080,7 +3081,7 @@ esc(){
+@@ -3091,7 +3092,7 @@ esc(){
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
$(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,YASM BZIP2 ZLIB))
$(eval $(call import.CONTRIB.defs,FFMPEG))
-FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v9.1.tar.bz2
+FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v9.2.tar.bz2
FFMPEG.CONFIGURE.deps =
FFMPEG.CONFIGURE.env =
$(eval $(call import.MODULE.defs,X264,x264,YASM PTHREADW32))
$(eval $(call import.CONTRIB.defs,X264))
-X264.FETCH.url = http://download.handbrake.fr/handbrake/contrib/x264-r2245-bc13772.tar.gz
+X264.FETCH.url = http://download.handbrake.fr/handbrake/contrib/x264-r2273-b3065e6.tar.gz
X264.EXTRACT.tarbase = x264
X264.CONFIGURE.deps =
}
else
{
- status_str = g_strdup_printf ("Scanning title %d of %d...",
+ if (status.scan.preview_cur == 0)
+ status_str = g_strdup_printf("Scanning title %d of %d...",
status.scan.title_cur, status.scan.title_count );
+ else
+ status_str = g_strdup_printf(
+ "Scanning title %d of %d preview %d...",
+ status.scan.title_cur, status.scan.title_count,
+ status.scan.preview_cur);
+
}
gtk_label_set_text (label, status_str);
g_free(status_str);
if (status.scan.title_count > 0)
{
- gtk_progress_bar_set_fraction (scan_prog,
- (gdouble)status.scan.title_cur / status.scan.title_count);
+ gtk_progress_bar_set_fraction (scan_prog, status.scan.progress);
}
}
else if (status.scan.state & GHB_STATE_SCANDONE)
// when computing progress
hb_status.scan.title_count = 1;
hb_status.scan.title_cur = 0;
+ hb_status.scan.preview_count = 1;
+ hb_status.scan.preview_cur = 0;
+ hb_status.scan.progress = 0;
}
void
hb_status.scan.state |= GHB_STATE_SCANNING;
hb_status.scan.title_count = p.title_count;
hb_status.scan.title_cur = p.title_cur;
+ hb_status.scan.preview_count = p.preview_count;
+ hb_status.scan.preview_cur = p.preview_cur;
+ hb_status.scan.progress = p.progress;
} break;
#undef p
hb_status.queue.state |= GHB_STATE_SCANNING;
hb_status.queue.title_count = p.title_count;
hb_status.queue.title_cur = p.title_cur;
+ hb_status.queue.preview_count = p.preview_count;
+ hb_status.queue.preview_cur = p.preview_cur;
+ hb_status.queue.progress = p.progress;
} break;
#undef p
// SCANNING
gint title_count;
gint title_cur;
+ gint preview_count;
+ gint preview_cur;
// WORKING
gint unique_id;
g_idle_add((GSourceFunc)ghb_reload_queue, ud);
// Start timer for monitoring libhb status, 500ms
- g_timeout_add(500, ghb_timer_cb, (gpointer)ud);
+ g_timeout_add(200, ghb_timer_cb, (gpointer)ud);
// Add dvd devices to File menu
ghb_volname_cache_init();
struct
{
/* HB_STATE_SCANNING */
+ float progress;
+ int preview_cur;
+ int preview_count;
int title_cur;
int title_count;
} scanning;
static int DecodePreviews( hb_scan_t *, hb_title_t * title );
static void LookForAudio( hb_title_t * title, hb_buffer_t * b );
static int AllAudioOK( hb_title_t * title );
+static void UpdateState1(hb_scan_t *scan, int title);
+static void UpdateState2(hb_scan_t *scan, int title);
+static void UpdateState3(hb_scan_t *scan, int preview);
static const char *aspect_to_string( double aspect )
{
data->path = strdup( path );
data->title_index = title_index;
data->title_set = title_set;
-
+
data->preview_count = preview_count;
data->store_previews = store_previews;
data->min_title_duration = min_duration;
/* Scan all titles */
for( i = 0; i < hb_bd_title_count( data->bd ); i++ )
{
+ UpdateState1(data, i + 1);
hb_list_add( data->title_set->list_title,
hb_bd_title_scan( data->bd,
i + 1, data->min_title_duration ) );
/* Scan all titles */
for( i = 0; i < hb_dvd_title_count( data->dvd ); i++ )
{
+ UpdateState1(data, i + 1);
hb_list_add( data->title_set->list_title,
hb_dvd_title_scan( data->dvd,
i + 1, data->min_title_duration ) );
{
hb_title_t * title;
+ UpdateState1(data, i + 1);
title = hb_batch_title_scan( data->batch, i + 1 );
if ( title != NULL )
{
}
else
{
- hb_title_t * title = hb_title_init( data->path, 0 );
+ data->title_index = 1;
+ hb_title_t * title = hb_title_init( data->path, data->title_index );
if ( (data->stream = hb_stream_open( data->path, title, 1 ) ) != NULL )
{
title = hb_stream_title_scan( data->stream, title );
for( i = 0; i < hb_list_count( data->title_set->list_title ); )
{
int j;
- hb_state_t state;
hb_audio_t * audio;
if ( *data->die )
}
title = hb_list_item( data->title_set->list_title, i );
-#define p state.param.scanning
- /* Update the UI */
- state.state = HB_STATE_SCANNING;
- p.title_cur = title->index;
- p.title_count = data->dvd ? hb_dvd_title_count( data->dvd ) :
- data->bd ? hb_bd_title_count( data->bd ) :
- data->batch ? hb_batch_title_count( data->batch ) :
- hb_list_count(data->title_set->list_title);
- hb_set_state( data->h, &state );
-#undef p
+ UpdateState2(data, i + 1);
/* Decode previews */
/* this will also detect more AC3 / DTS information */
{
int j;
+ UpdateState3(data, i + 1);
+
if ( *data->die )
{
free( info_list );
hb_buffer_close( &vid_buf );
}
}
+ UpdateState3(data, i);
+
vid_decoder->close( vid_decoder );
free( vid_decoder );
}
return 1;
}
+
+static void UpdateState1(hb_scan_t *scan, int title)
+{
+ hb_state_t state;
+
+#define p state.param.scanning
+ /* Update the UI */
+ state.state = HB_STATE_SCANNING;
+ p.title_cur = title;
+ p.title_count = scan->dvd ? hb_dvd_title_count( scan->dvd ) :
+ scan->bd ? hb_bd_title_count( scan->bd ) :
+ scan->batch ? hb_batch_title_count( scan->batch ) :
+ hb_list_count(scan->title_set->list_title);
+ p.preview_cur = 0;
+ p.preview_count = 1;
+ p.progress = 0.5 * ((float)p.title_cur + ((float)p.preview_cur / p.preview_count)) / p.title_count;
+#undef p
+
+ hb_set_state(scan->h, &state);
+}
+
+static void UpdateState2(hb_scan_t *scan, int title)
+{
+ hb_state_t state;
+
+#define p state.param.scanning
+ /* Update the UI */
+ state.state = HB_STATE_SCANNING;
+ p.title_cur = title;
+ p.title_count = hb_list_count( scan->title_set->list_title );
+ p.preview_cur = 1;
+ p.preview_count = scan->preview_count;
+ if (scan->title_index)
+ p.progress = (float)p.title_cur / p.title_count;
+ else
+ p.progress = 0.5 + 0.5 * (float)p.title_cur / p.title_count;
+#undef p
+
+ hb_set_state(scan->h, &state);
+}
+
+static void UpdateState3(hb_scan_t *scan, int preview)
+{
+ hb_state_t state;
+
+ hb_get_state2(scan->h, &state);
+#define p state.param.scanning
+ p.preview_cur = preview;
+ p.preview_count = scan->preview_count;
+ if (scan->title_index)
+ p.progress = ((float)p.title_cur - 1 + ((float)p.preview_cur / p.preview_count)) / p.title_count;
+ else
+ p.progress = 0.5 + 0.5 * ((float)p.title_cur - 1 + ((float)p.preview_cur / p.preview_count)) / p.title_count;
+#undef p
+
+ hb_set_state(scan->h, &state);
+}
#define p s.param.scanning
case HB_STATE_SCANNING:
{
- [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
- NSLocalizedString( @"Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ if( p.preview_cur )
+ {
+ [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
+ NSLocalizedString( @"Scanning title %d of %d, preview %d…", @"" ),
+ p.title_cur, p.title_count,
+ p.preview_cur]];
+ }
+ else
+ {
+ [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
+ NSLocalizedString( @"Scanning title %d of %d…", @"" ),
+ p.title_cur, p.title_count]];
+ }
[fScanIndicator setHidden: NO];
[fScanHorizontalLine setHidden: YES];
- [fScanIndicator setDoubleValue: 100.0 * ((double)( p.title_cur - 1 ) / p.title_count)];
+ [fScanIndicator setDoubleValue: 100.0 * p.progress];
break;
}
#undef p
#define p s.param.scanning
case HB_STATE_SCANNING:
{
- [fStatusField setStringValue: [NSString stringWithFormat:
- NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ NSString *scan_status;
+ if( p.preview_cur )
+ {
+ scan_status = [NSString stringWithFormat:
+ NSLocalizedString( @"Queue Scanning title %d of %d, preview %d…", @"" ),
+ p.title_cur, p.title_count, p.preview_cur];
+ }
+ else
+ {
+ scan_status = [NSString stringWithFormat:
+ NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
+ p.title_cur, p.title_count];
+ }
+ [fStatusField setStringValue: scan_status];
- /* Set the status string in fQueueController as well */
- [fQueueController setQueueStatusString: [NSString stringWithFormat:
- NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: scan_status];
break;
}
#undef p
/* Update text field */
pass_desc = @"";
- //string = [NSMutableString stringWithFormat: NSLocalizedString( @"Searching for start point: pass %d %@ of %d, %.2f %%", @"" ), p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
+ //string = [NSMutableString stringWithFormat:
+ // NSLocalizedString( @"Searching for start point: pass %d %@ of %d, %.2f %%", @"" ),
+ // p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
/* For now, do not announce "pass x of x for the search phase */
- string = [NSMutableString stringWithFormat: NSLocalizedString( @"Searching for start point… : %.2f %%", @"" ), 100.0 * p.progress];
+ string = [NSMutableString stringWithFormat:
+ NSLocalizedString( @"Searching for start point… : %.2f %%", @"" ),
+ 100.0 * p.progress];
- if( p.seconds > -1 )
+ if( p.seconds > -1 )
{
[string appendFormat:
- NSLocalizedString( @" (ETA %02dh%02dm%02ds)", @"" ), p.hours, p.minutes, p.seconds];
+ NSLocalizedString( @" (ETA %02dh%02dm%02ds)", @"" ),
+ p.hours, p.minutes, p.seconds];
}
[fStatusField setStringValue: string];
if ([pass_desc length])
{
- string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: %@ \nPass %d %@ of %d, %.2f %%", @"" ), currentQueueEncodeNameString, p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
+ string = [NSMutableString stringWithFormat:
+ NSLocalizedString( @"Encoding: %@ \nPass %d %@ of %d, %.2f %%", @"" ),
+ currentQueueEncodeNameString,
+ p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
}
else
{
- string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: %@ \nPass %d of %d, %.2f %%", @"" ), currentQueueEncodeNameString, p.job_cur, p.job_count, 100.0 * p.progress];
+ string = [NSMutableString stringWithFormat:
+ NSLocalizedString( @"Encoding: %@ \nPass %d of %d, %.2f %%", @"" ),
+ currentQueueEncodeNameString,
+ p.job_cur, p.job_count, 100.0 * p.progress];
}
- if( p.seconds > -1 )
+ if( p.seconds > -1 )
{
if ( p.rate_cur > 0.0 )
{
if (status == NSAlertDefaultReturn)
{
/* User chose to go download vlc (as they rightfully should) so we send them to the vlc site */
- [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://download.videolan.org/libdvdcss/last/macosx/"]];
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://download.videolan.org/libdvdcss/1.2.12/macosx/"]];
}
else if (status == NSAlertAlternateReturn)
{
#define p s.param.scanning
case HB_STATE_SCANNING:
/* Show what title is currently being scanned */
- fprintf( stderr, "Scanning title %d", p.title_cur );
- if( !titleindex || titlescan )
- fprintf( stderr, " of %d", p.title_count );
- fprintf( stderr, "...\n" );
+ if (p.preview_cur)
+ {
+ fprintf(stdout, "\rScanning title %d of %d, preview %d, %.2f %%",
+ p.title_cur, p.title_count, p.preview_cur, 100 * p.progress);
+ }
+ else
+ {
+ fprintf(stdout, "\rScanning title %d of %d, %.2f %%",
+ p.title_cur, p.title_count, 100 * p.progress);
+ }
+ fflush(stdout);
break;
#undef p