diff options
author | sr55 <[email protected]> | 2013-01-06 11:28:38 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-01-06 11:28:38 +0000 |
commit | d7e6753cd7b8972ceeafcfe1b932e095a48a3f59 (patch) | |
tree | 35475b3ccc0c617133c55b7f1c6868aab840b735 | |
parent | 403d4abe29055f9d910d10ed28509a684805f835 (diff) |
Merging Trunk into the OpenCL branch. This includes an updated version of libav. 0.9 beta 3
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5155 b64f7644-9d1e-0410-96f1-a4d463321fa5
74 files changed, 2981 insertions, 1133 deletions
diff --git a/contrib/ffmpeg/A01-swscale-assert.patch b/contrib/ffmpeg/A01-swscale-assert.patch index 8136a35b2..e0b6aad6b 100644 --- a/contrib/ffmpeg/A01-swscale-assert.patch +++ b/contrib/ffmpeg/A01-swscale-assert.patch @@ -1,8 +1,8 @@ diff --git a/libswscale/utils.c b/libswscale/utils.c -index d8fee58..b96a771 100644 +index e5e4d60..062ae01 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c -@@ -508,7 +508,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, +@@ -531,7 +531,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, // FIXME try to align filterPos if possible // fix borders diff --git a/contrib/ffmpeg/A02-channel-layout-order.patch b/contrib/ffmpeg/A02-channel-layout-order.patch index 2326e7d3e..ce57af038 100644 --- a/contrib/ffmpeg/A02-channel-layout-order.patch +++ b/contrib/ffmpeg/A02-channel-layout-order.patch @@ -1,20 +1,20 @@ diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c -index 91efaf3..e6c5c8e 100644 +index 3852f6e..c7217c8 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c -@@ -30,6 +30,7 @@ - #include "dsputil.h" +@@ -28,6 +28,7 @@ + + #include "avcodec.h" #include "libavutil/intreadwrite.h" ++#include "libavutil/channel_layout.h" #include "get_bits.h" -+#include "libavutil/audioconvert.h" + #include "internal.h" #include "libavutil/crc.h" - #include "parser.h" - #include "mlp_parser.h" -@@ -434,6 +435,28 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, +@@ -435,6 +436,28 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->ch_assign[ch_assign] = ch; } -+ if (m->avctx->codec_id == CODEC_ID_TRUEHD) { ++ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD) { + switch (m->avctx->channel_layout) { + case AV_CH_LAYOUT_6POINT1: + case (AV_CH_LAYOUT_6POINT1|AV_CH_TOP_CENTER): diff --git a/contrib/ffmpeg/A03-h264-recovery-point.patch b/contrib/ffmpeg/A03-h264-recovery-point.patch index d018dd6b1..bbd25ab46 100644 --- a/contrib/ffmpeg/A03-h264-recovery-point.patch +++ b/contrib/ffmpeg/A03-h264-recovery-point.patch @@ -1,16 +1,16 @@ diff --git a/libavcodec/h264.c b/libavcodec/h264.c -index 6ed251e..a3242ce 100644 +index 1a0b341..98a0350 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c -@@ -2627,6 +2627,7 @@ static void flush_dpb(AVCodecContext *avctx) - h->s.first_field = 0; - ff_h264_reset_sei(h); +@@ -2163,6 +2163,7 @@ static void flush_dpb(AVCodecContext *avctx) + + flush_change(h); ff_mpeg_flush(avctx); + h->recovery_frame= -1; } static int init_poc(H264Context *h) -@@ -4289,9 +4290,18 @@ again: +@@ -3976,9 +3977,18 @@ again: if ((err = decode_slice_header(hx, h))) break; @@ -32,10 +32,10 @@ index 6ed251e..a3242ce 100644 if (h->current_slice == 1) { if (!(s->flags2 & CODEC_FLAG2_CHUNKS)) diff --git a/libavcodec/h264.h b/libavcodec/h264.h -index 570ce2f..454b755 100644 +index 8596121..23daee3 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h -@@ -569,6 +569,13 @@ typedef struct H264Context { +@@ -568,6 +568,13 @@ typedef struct H264Context { * frames. */ int sei_recovery_frame_cnt; diff --git a/contrib/ffmpeg/A04-pgs-pts.patch b/contrib/ffmpeg/A04-pgs-pts.patch deleted file mode 100644 index fe6a6dc93..000000000 --- a/contrib/ffmpeg/A04-pgs-pts.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h -index 102df3a..aa40c78 100644 ---- a/libavcodec/avcodec.h -+++ b/libavcodec/avcodec.h -@@ -3093,6 +3093,7 @@ typedef struct AVSubtitle { - unsigned num_rects; - AVSubtitleRect **rects; - int64_t pts; ///< Same as packet pts, in AV_TIME_BASE -+ uint8_t forced; - } AVSubtitle; - - /** -diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c -index 3335412..3f14a2d 100644 ---- a/libavcodec/pgssubdec.c -+++ b/libavcodec/pgssubdec.c -@@ -45,6 +45,8 @@ typedef struct PGSSubPresentation { - int y; - int id_number; - int object_number; -+ uint8_t composition_flag; -+ int64_t pts; - } PGSSubPresentation; - - typedef struct PGSSubPicture { -@@ -271,7 +273,8 @@ static void parse_palette_segment(AVCodecContext *avctx, - * @todo TODO: Implement forcing of subtitles - */ - static void parse_presentation_segment(AVCodecContext *avctx, -- const uint8_t *buf, int buf_size) -+ const uint8_t *buf, int buf_size, -+ int64_t pts) - { - PGSSubContext *ctx = avctx->priv_data; - -@@ -280,6 +283,8 @@ static void parse_presentation_segment(AVCodecContext *avctx, - int w = bytestream_get_be16(&buf); - int h = bytestream_get_be16(&buf); - -+ ctx->presentation.pts = pts; -+ - av_dlog(avctx, "Video Dimensions %dx%d\n", - w, h); - if (av_image_check_size(w, h, 0, avctx) >= 0) -@@ -299,16 +304,17 @@ static void parse_presentation_segment(AVCodecContext *avctx, - buf += 3; - - ctx->presentation.object_number = bytestream_get_byte(&buf); -+ ctx->presentation.composition_flag = 0; - if (!ctx->presentation.object_number) - return; - - /* -- * Skip 4 bytes of unknown: -+ * Skip 3 bytes of unknown: - * object_id_ref (2 bytes), - * window_id_ref, -- * composition_flag (0x80 - object cropped, 0x40 - object forced) - */ -- buf += 4; -+ buf += 3; -+ ctx->presentation.composition_flag = bytestream_get_byte(&buf); - - x = bytestream_get_be16(&buf); - y = bytestream_get_be16(&buf); -@@ -356,6 +362,9 @@ static int display_end_segment(AVCodecContext *avctx, void *data, - */ - - memset(sub, 0, sizeof(*sub)); -+ sub->pts = ctx->presentation.pts; -+ sub->forced = (ctx->presentation.composition_flag & 0x40) != 0; -+ - // Blank if last object_number was 0. - // Note that this may be wrong for more complex subtitles. - if (!ctx->presentation.object_number) -@@ -441,7 +450,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, - parse_picture_segment(avctx, buf, segment_length); - break; - case PRESENTATION_SEGMENT: -- parse_presentation_segment(avctx, buf, segment_length); -+ parse_presentation_segment(avctx, buf, segment_length, avpkt->pts); - break; - case WINDOW_SEGMENT: - /* diff --git a/contrib/ffmpeg/A04-snow-use-videodspcontext.patch b/contrib/ffmpeg/A04-snow-use-videodspcontext.patch new file mode 100644 index 000000000..fc9a120b9 --- /dev/null +++ b/contrib/ffmpeg/A04-snow-use-videodspcontext.patch @@ -0,0 +1,33 @@ +diff --git a/libavcodec/snow.c b/libavcodec/snow.c +index b9dab45..153e5b2 100644 +--- a/libavcodec/snow.c ++++ b/libavcodec/snow.c +@@ -349,7 +349,7 @@ void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, + src += sx + sy*stride; + if( (unsigned)sx >= w - b_w - (HTAPS_MAX-2) + || (unsigned)sy >= h - b_h - (HTAPS_MAX-2)){ +- s->dsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h); ++ s->vdsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h); + src= tmp + MB_SIZE; + } + // assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h); +@@ -402,6 +402,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ + s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe + + ff_dsputil_init(&s->dsp, avctx); ++ ff_videodsp_init(&s->vdsp, 8); + ff_dwt_init(&s->dwt); + + #define mcf(dx,dy)\ +diff --git a/libavcodec/snow.h b/libavcodec/snow.h +index abf3309..b988115 100644 +--- a/libavcodec/snow.h ++++ b/libavcodec/snow.h +@@ -108,6 +108,7 @@ typedef struct SnowContext{ + AVCodecContext *avctx; + RangeCoder c; + DSPContext dsp; ++ VideoDSPContext vdsp; + DWTContext dwt; + AVFrame new_picture; + AVFrame input_picture; ///< new_picture with the internal linesizes diff --git a/contrib/ffmpeg/A05-dca-resync.patch b/contrib/ffmpeg/A05-dca-resync.patch new file mode 100644 index 000000000..3e32c7a74 --- /dev/null +++ b/contrib/ffmpeg/A05-dca-resync.patch @@ -0,0 +1,71 @@ +From 021a7700ff839b295b5776d4552563de1a448df6 Mon Sep 17 00:00:00 2001 +From: John Stebbins <[email protected]> +Date: Sat, 5 Jan 2013 16:57:06 -0800 +Subject: [PATCH] dca_parser: Handle changes in dca frame size + +A change in framesize caused a perpetual loss of synchronization. +So read (and use) the frame size from the frame header instead of +setting it only once. +--- + libavcodec/dca_parser.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c +index ab235cf..75e9321 100644 +--- a/libavcodec/dca_parser.c ++++ b/libavcodec/dca_parser.c +@@ -62,10 +62,12 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, + if (IS_MARKER(state, i, buf, buf_size)) { + if (pc1->lastmarker && state == pc1->lastmarker) { + start_found = 1; ++ i++; + break; + } else if (!pc1->lastmarker) { + start_found = 1; + pc1->lastmarker = state; ++ i++; + break; + } + } +@@ -80,9 +82,6 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, + if (state == pc1->lastmarker && IS_MARKER(state, i, buf, buf_size)) { + if(pc1->framesize > pc1->size) + continue; +- if(!pc1->framesize){ +- pc1->framesize = pc1->hd_pos ? pc1->hd_pos : pc1->size; +- } + pc->frame_start_found = 0; + pc->state = -1; + pc1->size = 0; +@@ -139,7 +138,7 @@ int ff_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, + } + + static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration, +- int *sample_rate) ++ int *sample_rate, int *framesize) + { + GetBitContext gb; + uint8_t hdr[12 + FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; +@@ -159,6 +158,10 @@ static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration, + return AVERROR_INVALIDDATA; + *duration = 256 * (sample_blocks / 8); + ++ *framesize = get_bits(&gb, 14) + 1; ++ if (*framesize < 95) ++ return AVERROR_INVALIDDATA; ++ + skip_bits(&gb, 20); + sr_code = get_bits(&gb, 4); + *sample_rate = avpriv_dca_sample_rates[sr_code]; +@@ -190,7 +193,7 @@ static int dca_parse(AVCodecParserContext * s, + } + + /* read the duration and sample rate from the frame header */ +- if (!dca_parse_params(buf, buf_size, &duration, &sample_rate)) { ++ if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) { + s->duration = duration; + avctx->sample_rate = sample_rate; + } else +-- +1.7.10.4 + diff --git a/contrib/ffmpeg/A05-mix-normalization.patch b/contrib/ffmpeg/A05-mix-normalization.patch deleted file mode 100644 index 06fb2754c..000000000 --- a/contrib/ffmpeg/A05-mix-normalization.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c -index 2c2a356..25f9f98 100644 ---- a/libavresample/audio_mix.c -+++ b/libavresample/audio_mix.c -@@ -327,7 +327,9 @@ int ff_audio_mix_init(AVAudioResampleContext *avr) - avr->out_channel_layout, - avr->center_mix_level, - avr->surround_mix_level, -- avr->lfe_mix_level, 1, matrix_dbl, -+ avr->lfe_mix_level, -+ avr->normalize_mix_level, -+ matrix_dbl, - avr->in_channels, - avr->matrix_encoding); - if (ret < 0) { -diff --git a/libavresample/internal.h b/libavresample/internal.h -index 7b7648f..006b6fd 100644 ---- a/libavresample/internal.h -+++ b/libavresample/internal.h -@@ -45,6 +45,7 @@ struct AVAudioResampleContext { - double center_mix_level; /**< center mix level */ - double surround_mix_level; /**< surround mix level */ - double lfe_mix_level; /**< lfe mix level */ -+ int normalize_mix_level; /**< enable mix level normalization */ - int force_resampling; /**< force resampling */ - int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ - int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ -diff --git a/libavresample/options.c b/libavresample/options.c -index 02e1f86..e7e0c27 100644 ---- a/libavresample/options.c -+++ b/libavresample/options.c -@@ -47,6 +47,7 @@ static const AVOption options[] = { - { "center_mix_level", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "surround_mix_level", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "lfe_mix_level", "LFE Mix Level", OFFSET(lfe_mix_level), AV_OPT_TYPE_DOUBLE, { 0.0 }, -32.0, 32.0, PARAM }, -+ { "normalize_mix_level", "Normalize Mix Level", OFFSET(normalize_mix_level), AV_OPT_TYPE_INT, { 1 }, 0, 1, PARAM }, - { "force_resampling", "Force Resampling", OFFSET(force_resampling), AV_OPT_TYPE_INT, { 0 }, 0, 1, PARAM }, - { "filter_size", "Resampling Filter Size", OFFSET(filter_size), AV_OPT_TYPE_INT, { 16 }, 0, 32, /* ??? */ PARAM }, - { "phase_shift", "Resampling Phase Shift", OFFSET(phase_shift), AV_OPT_TYPE_INT, { 10 }, 0, 30, /* ??? */ PARAM }, diff --git a/contrib/ffmpeg/A06-fmac-scalar-asm.patch b/contrib/ffmpeg/A06-fmac-scalar-asm.patch deleted file mode 100644 index b0ca0f084..000000000 --- a/contrib/ffmpeg/A06-fmac-scalar-asm.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm -index c4e0c66..d379d8f 100644 ---- a/libavutil/x86/float_dsp.asm -+++ b/libavutil/x86/float_dsp.asm -@@ -60,12 +60,12 @@ cglobal vector_fmac_scalar, 3,3,3, dst, src, len - %else - cglobal vector_fmac_scalar, 4,4,3, dst, src, mul, len - %endif --%if WIN64 -- SWAP 0, 2 --%endif - %if ARCH_X86_32 - VBROADCASTSS m0, mulm - %else -+%if WIN64 -+ mova xmm0, xmm2 -+%endif - shufps xmm0, xmm0, 0 - %if cpuflag(avx) - vinsertf128 m0, m0, xmm0, 1 diff --git a/contrib/ffmpeg/P01-solaris.patch b/contrib/ffmpeg/P01-solaris.patch index 8266d0914..b97907941 100644 --- a/contrib/ffmpeg/P01-solaris.patch +++ b/contrib/ffmpeg/P01-solaris.patch @@ -1,18 +1,8 @@ diff --git a/configure b/configure -index 07baa2f..4597a0d 100755 +index 5355300..5ac7bc0 100755 --- a/configure +++ b/configure -@@ -54,6 +54,9 @@ if test "$E1" != 0 || test "$E2" = 0; then - exit 1 - fi - -+# Solaris must use the xpg4 version of grep -+PATH=/usr/xpg4/bin:$PATH -+ - show_help(){ - cat <<EOF - Usage: configure [options] -@@ -2688,7 +2691,7 @@ EOF +@@ -3146,7 +3146,7 @@ EOF check_cc <<EOF || die "endian test failed" unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; EOF diff --git a/contrib/ffmpeg/P02-darwin-pic.patch b/contrib/ffmpeg/P02-darwin-pic.patch index e9d8dfc00..576c23e79 100644 --- a/contrib/ffmpeg/P02-darwin-pic.patch +++ b/contrib/ffmpeg/P02-darwin-pic.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index 07baa2f..8a2a581 100755 +index 5355300..7ae7148 100755 --- a/configure +++ b/configure -@@ -2494,6 +2494,7 @@ case $target_os in +@@ -2868,6 +2868,7 @@ case $target_os in AVSERVERLDFLAGS=-Wl,-bind_at_load objformat="macho" enabled x86_64 && objformat="macho64" @@ -10,7 +10,7 @@ index 07baa2f..8a2a581 100755 enabled_any pic shared || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } ;; -@@ -2614,7 +2615,7 @@ esc(){ +@@ -3070,7 +3071,7 @@ esc(){ echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate @@ -18,4 +18,4 @@ index 07baa2f..8a2a581 100755 +#check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic set_default $PATHS_LIST - + set_default nm diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 26365ecba..0340f6c44 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -1,13 +1,14 @@ $(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-v0.8-2551-gc83f44d.tar.bz2 +FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v9_beta3.tar.bz2 FFMPEG.CONFIGURE.deps = FFMPEG.CONFIGURE.env = FFMPEG.CONFIGURE.host = FFMPEG.CONFIGURE.extra = \ + --enable-gpl \ --disable-doc \ --disable-bsfs \ --disable-avconv \ @@ -19,13 +20,12 @@ FFMPEG.CONFIGURE.extra = \ --disable-network \ --disable-vaapi \ --enable-dxva2 \ - --enable-encoder=flac \ - --enable-encoder=ac3 \ --enable-encoder=aac \ - --enable-encoder=mpeg4 \ + --enable-encoder=ac3 \ + --enable-encoder=flac \ --enable-encoder=mpeg2video \ + --enable-encoder=mpeg4 \ --enable-encoder=snow \ - --enable-gpl \ --enable-zlib \ --enable-bzlib \ --cc="$(FFMPEG.GCC.gcc)" \ @@ -87,8 +87,13 @@ ifeq (darwin-i386,$(BUILD.system)-$(BUILD.machine)) endif endif -## MPC8 Doesn't compile on SPARC +## For POSIX.1-2001 ifeq (solaris,$(BUILD.system)) + FFMPEG.CONFIGURE.extra += --extra-libs=/usr/lib/values-xpg6.o +endif + +## MPC8 Doesn't compile on SPARC +ifeq (solaris-sparc,$(BUILD.system)-$(BUILD.machine)) FFMPEG.CONFIGURE.extra += --disable-demuxer=mpc8 endif diff --git a/gtk/src/appcast.c b/gtk/src/appcast.c index 95966eacb..b89530d71 100644 --- a/gtk/src/appcast.c +++ b/gtk/src/appcast.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * appcast.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * appcast.c is free software. * diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 53a0c29cb..8c4707266 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * audiohandler.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * audiohandler.c is free software. * @@ -122,7 +122,6 @@ int ghb_get_copy_mask(GValue *settings) int ghb_select_fallback( GValue *settings, int mux, int acodec ) { - gint mask; gint fallback = 0; switch ( acodec ) @@ -139,30 +138,9 @@ int ghb_select_fallback( GValue *settings, int mux, int acodec ) default: { fallback = ghb_settings_combo_int(settings, "AudioEncoderFallback"); + return hb_autopassthru_get_encoder(acodec, 0, fallback, mux); } } - if ( mux == HB_MUX_MP4 ) - { - mask = HB_ACODEC_LAME | - HB_ACODEC_FFAAC | - HB_ACODEC_FAAC | - HB_ACODEC_AC3; - } - if ( mux == HB_MUX_MKV ) - { - mask = - HB_ACODEC_FAAC | - HB_ACODEC_LAME | - HB_ACODEC_VORBIS | - HB_ACODEC_AC3 | - HB_ACODEC_FFAAC | - HB_ACODEC_FFFLAC; - } - if (!(fallback & mask )) - { - fallback = HB_ACODEC_LAME; - } - return fallback; } void diff --git a/gtk/src/audiohandler.h b/gtk/src/audiohandler.h index 7fde7381e..aaaddc89d 100644 --- a/gtk/src/audiohandler.h +++ b/gtk/src/audiohandler.h @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * audiohandler.h - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * audiohandler.h is free software. * diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index a3c8947e8..0f99948b9 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * callbacks.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * callbacks.c is free software. * @@ -1780,6 +1780,12 @@ vquality_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_clear_presets_selection(ud); ghb_live_reset(ud); + double vquality = ghb_settings_get_double(ud->settings, "VideoQualitySlider"); + if (vquality < 1.0) + { + ghb_ui_update(ud, "h264Profile", ghb_string_value("auto")); + } + gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder"); gdouble step; if (vcodec == HB_VCODEC_X264) @@ -3869,6 +3875,7 @@ vqual_granularity_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits, &inverted); GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider"); gtk_range_set_increments (GTK_RANGE(qp), step, page); + gtk_scale_set_digits(GTK_SCALE(qp), digits); } G_MODULE_EXPORT void diff --git a/gtk/src/callbacks.h b/gtk/src/callbacks.h index 8b201e237..b4a9654ee 100644 --- a/gtk/src/callbacks.h +++ b/gtk/src/callbacks.h @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * callbacks.h - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * callbacks.h is free software. * diff --git a/gtk/src/ghb-dvd.c b/gtk/src/ghb-dvd.c index 297aadb7a..d92373798 100644 --- a/gtk/src/ghb-dvd.c +++ b/gtk/src/ghb-dvd.c @@ -2,7 +2,7 @@ * ghb-dvd.c * * Sat Apr 19 11:12:53 2008 - * Copyright 2008-2011 John Stebbins + * Copyright 2008-2013 John Stebbins * <john at stebbins dot name> ****************************************************************************/ diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index c7e78383e..09b3b2ac0 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -7931,8 +7931,8 @@ The classic deinterlace filter is applied to all frames. Frames that are not int <property name="skip_pager_hint">True</property> <property name="program_name">HandBrake</property> <property name="version">0.9.2</property> - <property name="copyright" translatable="yes">Copyright © 2008 - 2011 John Stebbins -Copyright © 2004 - 2011, HandBrake Devs</property> + <property name="copyright" translatable="yes">Copyright © 2008 - 2013 John Stebbins +Copyright © 2004 - 2013, HandBrake Devs</property> <property name="comments" translatable="yes">HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.</property> <property name="website">http://handbrake.fr</property> <property name="website_label" translatable="yes">http://handbrake.fr</property> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 560435c49..5ab946f9b 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2,7 +2,7 @@ * hb-backend.c * * Fri Mar 28 10:38:44 2008 - * Copyright 2008-2011 John Stebbins + * Copyright 2008-2013 John Stebbins * <john at stebbins dot name> ****************************************************************************/ @@ -1666,6 +1666,10 @@ ghb_get_best_mix(hb_audio_config_t *aconfig, gint acodec, gint mix) { gint layout; layout = aconfig ? aconfig->in.channel_layout : AV_CH_LAYOUT_5POINT1; + + if (mix == HB_AMIXDOWN_NONE) + mix = hb_audio_mixdowns[hb_audio_mixdowns_count-1].amixdown; + return hb_get_best_mixdown( acodec, layout, mix ); } @@ -2106,6 +2110,15 @@ x264_profile_opts_set(GtkBuilder *builder, const gchar *name) for (ii = 0; ii < count; ii++) { + // HandBrake doesn't support high10 (10 bit encoding) + // or high422 (YUV422) + if (!strcasecmp("high10", profiles[ii]) || + !strcasecmp("high422", profiles[ii]) || + !strcasecmp("high444", profiles[ii])) + { + continue; + } + gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, profiles[ii], @@ -4640,6 +4653,7 @@ ghb_validate_vquality(GValue *settings) return FALSE; } g_free(message); + ghb_settings_set_string(settings, "h264Profile", "auto"); } else if (vquality < min || vquality > max) { diff --git a/gtk/src/icon_tools.c b/gtk/src/icon_tools.c index 66ce20226..763c0f8a0 100644 --- a/gtk/src/icon_tools.c +++ b/gtk/src/icon_tools.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * icon_tools.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * icon_tools.c is free software. * diff --git a/gtk/src/main.c b/gtk/src/main.c index 6a85e607f..3936da982 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * main.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * main.c is free software. * diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 216015f3c..d76d5d280 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * presets.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * presets.c is free software. * @@ -2014,48 +2014,78 @@ ghb_remove_queue_file() typedef struct { - gchar *mac_val; - gchar *lin_val; + const gchar *mac_val; + const gchar *lin_val; } value_map_t; -static value_map_t vcodec_xlat[] = +static value_map_t vcodec_xlat_compat[] = { - {"MPEG-2 (FFmpeg)", "ffmpeg2"}, - {"MPEG-4 (FFmpeg)", "ffmpeg4"}, {"MPEG-4 (FFmpeg)", "ffmpeg"}, {"MPEG-4 (XviD)", "ffmpeg4"}, - {"H.264 (x264)", "x264"}, - {"VP3 (Theora)", "theora"}, {NULL,NULL} }; -static value_map_t acodec_xlat[] = +static value_map_t *vcodec_xlat; + +static value_map_t acodec_xlat_compat[] = { - {"AAC (ffmpeg)", "ffaac"}, - {"AAC (faac)", "faac"}, {"AAC (CoreAudio)", "faac"}, {"HE-AAC (CoreAudio)", "faac"}, - {"AC3 (ffmpeg)", "ffac3"}, {"AC3 (ffmpeg)", "ac3"}, - {"AC3", "ac3"}, // Backwards compatibility with mac ui - {"MP3 Passthru", "copy:mp3"}, + {"AC3", "ac3"}, {"MP3 Passthru", "mp3pass"}, - {"AAC Passthru", "copy:aac"}, {"AAC Passthru", "aacpass"}, - {"AC3 Passthru", "copy:ac3"}, {"AC3 Passthru", "ac3pass"}, - {"DTS Passthru", "copy:dts"}, {"DTS Passthru", "dtspass"}, - {"DTS-HD Passthru", "copy:dtshd"}, {"DTS-HD Passthru", "dtshdpass"}, - {"Auto Passthru", "copy"}, {"Auto Passthru", "auto"}, - {"MP3 (lame)", "lame"}, - {"FLAC (ffmpeg)", "ffflac"}, - {"Vorbis (vorbis)", "vorbis"}, {NULL,NULL} }; +static value_map_t *acodec_xlat; + +static value_map_t * create_encoder_xlat_tbl(value_map_t *compat, hb_encoder_t *enc, int size) +{ + value_map_t *out; + int cc, ii; + + for (cc = 0; compat[cc].mac_val != NULL; cc++); + + out = calloc(cc + size + 1, sizeof(value_map_t)); + + for (ii = 0; ii < size; ii++) + { + out[ii].mac_val = enc[ii].human_readable_name; + out[ii].lin_val = enc[ii].short_name; + } + + for (ii = 0; ii < cc; ii++) + out[ii+size] = compat[ii]; + + return out; +} + +static value_map_t * create_mix_xlat_tbl(value_map_t *compat, hb_mixdown_t * mix, int size) +{ + value_map_t *out; + int cc, ii; + + for (cc = 0; compat[cc].mac_val != NULL; cc++); + + out = calloc(cc + size + 1, sizeof(value_map_t)); + + for (ii = 0; ii < size; ii++) + { + out[ii].mac_val = mix[ii].human_readable_name; + out[ii].lin_val = mix[ii].short_name; + } + + for (ii = 0; ii < cc; ii++) + out[ii+size] = compat[ii]; + + return out; +} + value_map_t container_xlat[] = { {"MP4 file", "mp4"}, @@ -3273,23 +3303,10 @@ update_standard_presets(signal_user_data_t *ud) void ghb_presets_load(signal_user_data_t *ud) { - int ii, jj; - - // Create audio mixdown translation table - mix_xlat = malloc(sizeof(value_map_t) * - (hb_audio_mixdowns_count + - sizeof(mix_xlat_compat) / sizeof(value_map_t))); - for (ii = 0; ii < hb_audio_mixdowns_count; ii++) - { - mix_xlat[ii].mac_val = hb_audio_mixdowns[ii].human_readable_name; - mix_xlat[ii].lin_val = hb_audio_mixdowns[ii].short_name; - } - for (jj = 0; mix_xlat_compat[jj].mac_val != NULL; jj++, ii++) - { - mix_xlat[ii] = mix_xlat_compat[jj]; - } - mix_xlat[ii].mac_val = NULL; - mix_xlat[ii].lin_val = NULL; + // Create translation tables from libhb tables + mix_xlat = create_mix_xlat_tbl(mix_xlat_compat, hb_audio_mixdowns, hb_audio_mixdowns_count); + acodec_xlat = create_encoder_xlat_tbl(acodec_xlat_compat, hb_audio_encoders, hb_audio_encoders_count); + vcodec_xlat = create_encoder_xlat_tbl(vcodec_xlat_compat, hb_video_encoders, hb_video_encoders_count); presetsPlist = load_plist("presets"); if (presetsPlist == NULL) diff --git a/gtk/src/preview.c b/gtk/src/preview.c index 03d680a4f..d8cfd64bf 100644 --- a/gtk/src/preview.c +++ b/gtk/src/preview.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * preview.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * preview.c is free software. * diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 1c0c430bd..d8d1e18a6 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * callbacks.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * callbacks.c is free software. * diff --git a/gtk/src/queuehandler.h b/gtk/src/queuehandler.h index 734968109..6a261677e 100644 --- a/gtk/src/queuehandler.h +++ b/gtk/src/queuehandler.h @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * queuehandler.h - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * queuehandler.h is free software. * diff --git a/gtk/src/resources.c b/gtk/src/resources.c index 283d8d772..d29375989 100644 --- a/gtk/src/resources.c +++ b/gtk/src/resources.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * resources.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * resources.c is free software. * diff --git a/gtk/src/settings.c b/gtk/src/settings.c index e883fae1b..de4e3e818 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * settings.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * settings.c is free software. * diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index 896a642e1..5a6ca8864 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * subtitlehandler.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * subtitlehandler.c is free software. * diff --git a/gtk/src/subtitlehandler.h b/gtk/src/subtitlehandler.h index 146c12e36..b63b169c6 100644 --- a/gtk/src/subtitlehandler.h +++ b/gtk/src/subtitlehandler.h @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * subtitlehandler.h - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * audiohandler.h is free software. * diff --git a/gtk/src/values.c b/gtk/src/values.c index b128db049..149d371a8 100644 --- a/gtk/src/values.c +++ b/gtk/src/values.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * presets.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * presets.c is free software. * diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c index 1056d9820..c97bca218 100644 --- a/gtk/src/x264handler.c +++ b/gtk/src/x264handler.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * x264handler.c - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * x264handler.c is free software. * diff --git a/gtk/src/x264handler.h b/gtk/src/x264handler.h index 2e72ce4ba..d29f16290 100644 --- a/gtk/src/x264handler.h +++ b/gtk/src/x264handler.h @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * x264handler.h - * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins> + * Copyright (C) John Stebbins 2008-2013 <stebbins@stebbins> * * x264handler.h is free software. * diff --git a/libhb/audio_remap.c b/libhb/audio_remap.c index d0374a0a0..2ca935fbb 100644 --- a/libhb/audio_remap.c +++ b/libhb/audio_remap.c @@ -11,7 +11,7 @@ #include "hbffmpeg.h" #include "audio_remap.h" -// source: libavutil/audioconvert.h +// source: libavutil/channel_layout.h hb_chan_map_t hb_libav_chan_map = { { diff --git a/libhb/audio_resample.c b/libhb/audio_resample.c index cc9b50d8b..a1cfb1d24 100644 --- a/libhb/audio_resample.c +++ b/libhb/audio_resample.c @@ -231,8 +231,8 @@ hb_buffer_t* hb_audio_resample(hb_audio_resample_t *resample, out = hb_buffer_init(out_size); out_samples = avresample_convert(resample->avresample, - (void**)&out->data, out_linesize, nsamples, - (void**)samples, in_linesize, nsamples); + &out->data, out_linesize, nsamples, + samples, in_linesize, nsamples); if (out_samples <= 0) { diff --git a/libhb/audio_resample.h b/libhb/audio_resample.h index 62a536d61..c1903eac0 100644 --- a/libhb/audio_resample.h +++ b/libhb/audio_resample.h @@ -19,7 +19,7 @@ #include <math.h> #include <stdint.h> -#include "libavutil/audioconvert.h" +#include "libavutil/channel_layout.h" #include "libavresample/avresample.h" /* Default mix level for center and surround channels */ diff --git a/libhb/bd.c b/libhb/bd.c index 268cdaab0..85c22a060 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -213,6 +213,9 @@ static int bd_audio_equal( BLURAY_CLIP_INFO *a, BLURAY_CLIP_INFO *b ) if ( a->audio_stream_count != b->audio_stream_count ) return 0; + if ( a->audio_stream_count == 0 ) + return 0; + for ( ii = 0; ii < a->audio_stream_count; ii++ ) { BLURAY_STREAM_INFO * s = &a->audio_streams[ii]; @@ -352,12 +355,12 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) case BLURAY_STREAM_TYPE_VIDEO_VC1: title->video_codec = WORK_DECAVCODECV; - title->video_codec_param = CODEC_ID_VC1; + title->video_codec_param = AV_CODEC_ID_VC1; break; case BLURAY_STREAM_TYPE_VIDEO_H264: title->video_codec = WORK_DECAVCODECV; - title->video_codec_param = CODEC_ID_H264; + title->video_codec_param = AV_CODEC_ID_H264; title->flags |= HBTF_NO_IDR; break; @@ -409,62 +412,63 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) } // Add all the audios found in the above clip. - for ( ii = 0; ii < ti->clips[audio_clip_index].audio_stream_count; ii++ ) + for (ii = 0; ii < ti->clips[audio_clip_index].audio_stream_count; ii++) { BLURAY_STREAM_INFO * bdaudio; bdaudio = &ti->clips[audio_clip_index].audio_streams[ii]; - switch( bdaudio->coding_type ) + switch (bdaudio->coding_type) { case BLURAY_STREAM_TYPE_AUDIO_TRUHD: // Add 2 audio tracks. One for TrueHD and one for AC-3 - add_audio(ii, title->list_audio, bdaudio, - HB_SUBSTREAM_BD_AC3, HB_ACODEC_AC3, 0); - add_audio(ii, title->list_audio, bdaudio, - HB_SUBSTREAM_BD_TRUEHD, HB_ACODEC_FFMPEG, CODEC_ID_TRUEHD); + add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_AC3, + HB_ACODEC_AC3, 0); + add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_TRUEHD, + HB_ACODEC_FFMPEG, AV_CODEC_ID_TRUEHD); break; case BLURAY_STREAM_TYPE_AUDIO_DTS: - add_audio(ii, title->list_audio, bdaudio, 0, HB_ACODEC_DCA, - CODEC_ID_DTS); + add_audio(ii, title->list_audio, bdaudio, 0, + HB_ACODEC_DCA, AV_CODEC_ID_DTS); break; case BLURAY_STREAM_TYPE_AUDIO_MPEG2: case BLURAY_STREAM_TYPE_AUDIO_MPEG1: - add_audio(ii, title->list_audio, bdaudio, 0, - HB_ACODEC_FFMPEG, CODEC_ID_MP2); + add_audio(ii, title->list_audio, bdaudio, 0, + HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2); break; case BLURAY_STREAM_TYPE_AUDIO_AC3PLUS: - add_audio(ii, title->list_audio, bdaudio, 0, - HB_ACODEC_FFMPEG, CODEC_ID_EAC3); + add_audio(ii, title->list_audio, bdaudio, 0, + HB_ACODEC_FFMPEG, AV_CODEC_ID_EAC3); break; case BLURAY_STREAM_TYPE_AUDIO_LPCM: - add_audio(ii, title->list_audio, bdaudio, 0, - HB_ACODEC_FFMPEG, CODEC_ID_PCM_BLURAY); + add_audio(ii, title->list_audio, bdaudio, 0, + HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY); break; case BLURAY_STREAM_TYPE_AUDIO_AC3: - add_audio(ii, title->list_audio, bdaudio, 0, HB_ACODEC_AC3, 0); + add_audio(ii, title->list_audio, bdaudio, 0, + HB_ACODEC_AC3, 0); break; case BLURAY_STREAM_TYPE_AUDIO_DTSHD_MASTER: case BLURAY_STREAM_TYPE_AUDIO_DTSHD: // Add 2 audio tracks. One for DTS-HD and one for DTS - add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_DTS, - HB_ACODEC_DCA, CODEC_ID_DTS); + add_audio(ii, title->list_audio, bdaudio, HB_SUBSTREAM_BD_DTS, + HB_ACODEC_DCA, AV_CODEC_ID_DTS); // DTS-HD is special. The substreams must be concatinated // DTS-core followed by DTS-hd-extensions. Setting // a substream id of 0 says use all substreams. add_audio(ii, title->list_audio, bdaudio, 0, - HB_ACODEC_DCA_HD, CODEC_ID_DTS); + HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS); break; default: - hb_log( "scan: unknown audio pid 0x%x codec 0x%x", - bdaudio->pid, bdaudio->coding_type ); + hb_log("scan: unknown audio pid 0x%x codec 0x%x", bdaudio->pid, + bdaudio->coding_type); break; } } diff --git a/libhb/common.c b/libhb/common.c index 1b7233008..7a655cce2 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -108,6 +108,7 @@ hb_encoder_t hb_video_encoders[] = }; int hb_video_encoders_count = sizeof(hb_video_encoders) / sizeof(hb_encoder_t); +// note: the first encoder in the list must be AAC hb_encoder_t hb_audio_encoders[] = { #ifdef __APPLE__ @@ -125,6 +126,7 @@ hb_encoder_t hb_audio_encoders[] = { "MP3 Passthru", "copy:mp3", HB_ACODEC_MP3_PASS, HB_MUX_MP4|HB_MUX_MKV }, { "Vorbis (vorbis)", "vorbis", HB_ACODEC_VORBIS, HB_MUX_MKV }, { "FLAC (ffmpeg)", "ffflac", HB_ACODEC_FFFLAC, HB_MUX_MKV }, + { "FLAC (24-bit)", "ffflac24", HB_ACODEC_FFFLAC24, HB_MUX_MKV }, { "Auto Passthru", "copy", HB_ACODEC_AUTO_PASS, HB_MUX_MP4|HB_MUX_MKV }, }; int hb_audio_encoders_count = sizeof(hb_audio_encoders) / sizeof(hb_encoder_t); @@ -161,8 +163,9 @@ int hb_mixdown_has_codec_support(int mixdown, uint32_t codec) switch (codec) { - case HB_ACODEC_FFFLAC: case HB_ACODEC_VORBIS: + case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: return (mixdown <= HB_AMIXDOWN_7POINT1); case HB_ACODEC_LAME: @@ -375,7 +378,8 @@ void hb_autopassthru_apply_settings( hb_job_t * job ) void hb_autopassthru_print_settings( hb_job_t * job ) { int i, codec_len; - char *mask = NULL, *tmp, *fallback = NULL; + char *mask = NULL, *tmp; + const char *fallback = NULL; for( i = 0; i < hb_audio_encoders_count; i++ ) { if( ( hb_audio_encoders[i].encoder & HB_ACODEC_PASS_FLAG ) && @@ -429,13 +433,7 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int { // fallback not possible with current muxer // use the default audio encoder instead -#ifndef __APPLE__ - if( muxer == HB_MUX_MKV ) - // Lame is the default for MKV - fallback = HB_ACODEC_LAME; - else -#endif // Core Audio or faac - fallback = hb_audio_encoders[0].encoder; + fallback = hb_get_default_audio_encoder(muxer); break; } } @@ -454,6 +452,17 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int return out_codec; } +int hb_get_default_audio_encoder(int muxer) +{ +#ifndef __APPLE__ + if (muxer == HB_MUX_MKV) + { + return HB_ACODEC_LAME; + } +#endif + return hb_audio_encoders[0].encoder; +} + // Given an input bitrate, find closest match in the set of allowed bitrates int hb_find_closest_audio_bitrate(int bitrate) { @@ -597,6 +606,7 @@ void hb_get_audio_bitrate_limits(uint32_t codec, int samplerate, int mixdown, { // Bitrates don't apply to "lossless" audio case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: *low = *high = -1; return; @@ -715,6 +725,7 @@ int hb_get_default_audio_bitrate(uint32_t codec, int samplerate, int mixdown) switch (codec) { case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: return -1; // 96, 224, 640 Kbps @@ -825,6 +836,7 @@ void hb_get_audio_compression_limits(uint32_t codec, float *low, float *high, switch (codec) { case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: *direction = 0; *granularity = 1; *high = 12; @@ -863,6 +875,7 @@ float hb_get_default_audio_compression(uint32_t codec) switch (codec) { case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: return 5.; case HB_ACODEC_LAME: @@ -900,6 +913,7 @@ int hb_get_default_mixdown(uint32_t codec, uint64_t layout) { // the FLAC encoder defaults to the best mixdown up to 7.1 case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: mixdown = HB_AMIXDOWN_7POINT1; break; // the AC3 encoder defaults to the best mixdown up to 5.1 diff --git a/libhb/common.h b/libhb/common.h index f3b8cb311..3d5f38f15 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -104,7 +104,7 @@ typedef struct hb_gui_s hb_gui_t; #define PRIVATE const #endif #include "audio_remap.h" -#include "libavutil/audioconvert.h" +#include "libavutil/channel_layout.h" hb_list_t * hb_list_init(); int hb_list_count( const hb_list_t * ); @@ -183,24 +183,24 @@ void hb_chapter_set_title(hb_chapter_t *chapter, const char *title); struct hb_rate_s { - char * string; - int rate; + const char *string; + int rate; }; struct hb_mixdown_s { - char * human_readable_name; - char * internal_name; - char * short_name; - int amixdown; + const char *human_readable_name; + const char *internal_name; + const char *short_name; + int amixdown; }; struct hb_encoder_s { - char * human_readable_name; // note: used in presets - char * short_name; // note: used in CLI - int encoder; // HB_*CODEC_* define - int muxers; // supported muxers + const char *human_readable_name; // note: used in presets + const char *short_name; // note: used in CLI + int encoder; // HB_*CODEC_* define + int muxers; // supported muxers }; struct hb_subtitle_config_s @@ -246,32 +246,37 @@ int hb_get_video_encoders_count(); hb_encoder_t* hb_get_audio_encoders(); int hb_get_audio_encoders_count(); -int hb_mixdown_is_supported(int mixdown, uint32_t codec, uint64_t layout); -int hb_mixdown_has_codec_support(int mixdown, uint32_t codec); -int hb_mixdown_has_remix_support(int mixdown, uint64_t layout); -int hb_mixdown_get_discrete_channel_count(int amixdown); -int hb_mixdown_get_low_freq_channel_count(int amixdown); -int hb_mixdown_get_mixdown_from_short_name(const char *short_name); +int hb_mixdown_is_supported(int mixdown, uint32_t codec, uint64_t layout); +int hb_mixdown_has_codec_support(int mixdown, uint32_t codec); +int hb_mixdown_has_remix_support(int mixdown, uint64_t layout); +int hb_mixdown_get_discrete_channel_count(int amixdown); +int hb_mixdown_get_low_freq_channel_count(int amixdown); +int hb_mixdown_get_mixdown_from_short_name(const char *short_name); const char* hb_mixdown_get_short_name_from_mixdown(int amixdown); -int hb_mixdown_get_mixdown_from_short_name( const char * short_name ); -const char * hb_mixdown_get_short_name_from_mixdown( int amixdown ); -void hb_autopassthru_apply_settings( hb_job_t * job ); -void hb_autopassthru_print_settings( hb_job_t * job ); -int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int muxer ); +void hb_autopassthru_apply_settings(hb_job_t *job); +void hb_autopassthru_print_settings(hb_job_t *job); +int hb_autopassthru_get_encoder(int in_codec, int copy_mask, int fallback, int muxer); + +int hb_get_default_audio_encoder(int muxer); + int hb_get_best_mixdown(uint32_t codec, uint64_t layout, int mixdown); int hb_get_default_mixdown(uint32_t codec, uint64_t layout); + int hb_get_best_samplerate(uint32_t codec, int samplerate, int *sr_shift); -int hb_find_closest_audio_bitrate(int bitrate); + +int hb_find_closest_audio_bitrate(int bitrate); void hb_get_audio_bitrate_limits(uint32_t codec, int samplerate, int mixdown, int *low, int *high); -int hb_get_best_audio_bitrate( uint32_t codec, int bitrate, int samplerate, int mixdown); -int hb_get_default_audio_bitrate( uint32_t codec, int samplerate, int mixdown ); -void hb_get_audio_quality_limits(uint32_t codec, float *low, float *high, float *granularity, int *direction); -float hb_get_best_audio_quality( uint32_t codec, float quality); -float hb_get_default_audio_quality( uint32_t codec ); -void hb_get_audio_compression_limits(uint32_t codec, float *low, float *high, float *granularity, int *direction); -float hb_get_best_audio_compression( uint32_t codec, float compression); -float hb_get_default_audio_compression( uint32_t codec ); +int hb_get_best_audio_bitrate(uint32_t codec, int bitrate, int samplerate, int mixdown); +int hb_get_default_audio_bitrate(uint32_t codec, int samplerate, int mixdown); + +void hb_get_audio_quality_limits(uint32_t codec, float *low, float *high, float *granularity, int *direction); +float hb_get_best_audio_quality(uint32_t codec, float quality); +float hb_get_default_audio_quality(uint32_t codec); + +void hb_get_audio_compression_limits(uint32_t codec, float *low, float *high, float *granularity, int *direction); +float hb_get_best_audio_compression(uint32_t codec, float compression); +float hb_get_default_audio_compression(uint32_t codec); struct hb_title_set_s { @@ -464,7 +469,7 @@ struct hb_job_s /* Audio starts here */ /* Audio Codecs */ -#define HB_ACODEC_MASK 0x001FFF00 +#define HB_ACODEC_MASK 0x003FFF00 #define HB_ACODEC_FAAC 0x00000100 #define HB_ACODEC_LAME 0x00000200 #define HB_ACODEC_VORBIS 0x00000400 @@ -478,7 +483,8 @@ struct hb_job_s #define HB_ACODEC_DCA_HD 0x00040000 #define HB_ACODEC_MP3 0x00080000 #define HB_ACODEC_FFFLAC 0x00100000 -#define HB_ACODEC_FF_MASK 0x001f2000 +#define HB_ACODEC_FFFLAC24 0x00200000 +#define HB_ACODEC_FF_MASK 0x003F2000 #define HB_ACODEC_PASS_FLAG 0x40000000 #define HB_ACODEC_PASS_MASK (HB_ACODEC_MP3 | HB_ACODEC_FFAAC | HB_ACODEC_DCA_HD | HB_ACODEC_AC3 | HB_ACODEC_DCA) #define HB_ACODEC_AUTO_PASS (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG) diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 5248d5f52..fe59300fe 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -423,10 +423,10 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, pos += len; if ( pbuffer_size > 0 ) { - AVFrame frame; int got_frame; + AVFrame frame = { { 0 } }; AVPacket avp; - av_init_packet( &avp ); + av_init_packet(&avp); avp.data = pbuffer; avp.size = pbuffer_size; @@ -504,31 +504,32 @@ static hb_buffer_t *copy_frame( hb_work_private_t *pv, AVFrame *frame ) hb_buffer_t *buf = hb_video_buffer_init( w, h ); uint8_t *dst = buf->data; - if ( context->pix_fmt != PIX_FMT_YUV420P || w != context->width || - h != context->height ) + if (context->pix_fmt != AV_PIX_FMT_YUV420P || w != context->width || + h != context->height) { // have to convert to our internal color space and/or rescale AVPicture dstpic; - hb_avpicture_fill( &dstpic, buf ); + hb_avpicture_fill(&dstpic, buf); - if ( ! pv->sws_context || - pv->sws_width != context->width || - pv->sws_height != context->height || - pv->sws_pix_fmt != context->pix_fmt ) + if (pv->sws_context == NULL || + pv->sws_width != context->width || + pv->sws_height != context->height || + pv->sws_pix_fmt != context->pix_fmt) { - if( pv->sws_context ) - sws_freeContext( pv->sws_context ); - pv->sws_context = hb_sws_get_context( - context->width, context->height, context->pix_fmt, - w, h, PIX_FMT_YUV420P, - SWS_LANCZOS|SWS_ACCURATE_RND); - pv->sws_width = context->width; - pv->sws_height = context->height; + if (pv->sws_context != NULL) + sws_freeContext(pv->sws_context); + pv->sws_context = hb_sws_get_context(context->width, + context->height, + context->pix_fmt, + w, h, AV_PIX_FMT_YUV420P, + SWS_LANCZOS|SWS_ACCURATE_RND); + pv->sws_width = context->width; + pv->sws_height = context->height; pv->sws_pix_fmt = context->pix_fmt; } - sws_scale( pv->sws_context, (const uint8_t* const *)frame->data, - frame->linesize, 0, context->height, - dstpic.data, dstpic.linesize ); + sws_scale(pv->sws_context, + (const uint8_t* const *)frame->data, frame->linesize, + 0, context->height, dstpic.data, dstpic.linesize); } else { @@ -690,7 +691,7 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen { hb_work_private_t *pv = w->private_data; int got_picture, oldlevel = 0; - AVFrame frame; + AVFrame frame = { { 0 } }; AVPacket avp; if ( global_verbosity_level <= 1 ) @@ -699,11 +700,11 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen av_log_set_level( AV_LOG_QUIET ); } - av_init_packet( &avp ); + av_init_packet(&avp); avp.data = data; avp.size = size; - avp.pts = pts; - avp.dts = dts; + avp.pts = pts; + avp.dts = dts; /* * libav avcodec_decode_video2() needs AVPacket flagged with AV_PKT_FLAG_KEY * for some codecs. For example, sequence of PNG in a mov container. @@ -727,10 +728,9 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen // codecs it simply sets frame.key_frame. But for others, it only // sets frame.pict_type. And for yet others neither gets set at all // (qtrle). - int key = frame.key_frame || - ( w->codec_param != CODEC_ID_H264 && - ( frame.pict_type == AV_PICTURE_TYPE_I || - frame.pict_type == 0 ) ); + int key = frame.key_frame || (w->codec_param != AV_CODEC_ID_H264 && + (frame.pict_type == 0 || + frame.pict_type == AV_PICTURE_TYPE_I)); if( !key ) { pv->wait_for_keyframe--; @@ -1058,7 +1058,7 @@ static int setup_extradata( hb_work_object_t *w, hb_buffer_t *in ) // vc1t_read_header allocates 'extradata' to deal with header issues // related to Microsoft's bizarre engineering notions. We alloc a chunk // of space to make vc1 work then associate the codec with the context. - if ( w->codec_param != CODEC_ID_VC1 ) + if ( w->codec_param != AV_CODEC_ID_VC1 ) { // we haven't been inflicted with M$ - allocate a little space as // a marker and return success. @@ -1434,9 +1434,10 @@ static void decodeAudio(hb_audio_t *audio, hb_work_private_t *pv, uint8_t *data, pv->pts_next = pts; while (pos < size) { - AVFrame frame; int got_frame; + AVFrame frame = { { 0 } }; AVPacket avp; + av_init_packet(&avp); avp.data = data + pos; avp.size = size - pos; diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index 991feb8e9..15c0d21d5 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -44,7 +44,7 @@ typedef struct hb_libmpeg2_s int height; int rate; double aspect_ratio; - enum PixelFormat pixfmt; + enum AVPixelFormat pixfmt; int got_iframe; /* set when we get our first iframe */ int look_for_iframe; /* need an iframe to add chap break */ int look_for_break; /* need gop start to add chap break */ @@ -272,7 +272,7 @@ static hb_buffer_t *hb_copy_frame( hb_libmpeg2_t *m ) hb_job_t * job = m->job; int width = m->info->sequence->width; int height = m->info->sequence->height; - enum PixelFormat pixfmt = m->pixfmt; + enum AVPixelFormat pixfmt = m->pixfmt; uint8_t *y = m->info->display_fbuf->buf[0]; uint8_t *u = m->info->display_fbuf->buf[1]; uint8_t *v = m->info->display_fbuf->buf[2]; @@ -423,11 +423,11 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, if ( m->info->sequence->width >> 1 == m->info->sequence->chroma_width && m->info->sequence->height >> 1 == m->info->sequence->chroma_height ) { - m->pixfmt = PIX_FMT_YUV420P; + m->pixfmt = AV_PIX_FMT_YUV420P; } else { - m->pixfmt = PIX_FMT_YUV422P; + m->pixfmt = AV_PIX_FMT_YUV422P; } } else if( state == STATE_GOP && m->look_for_break) diff --git a/libhb/decpgssub.c b/libhb/decpgssub.c index 9d32c85e3..7a11d924b 100644 --- a/libhb/decpgssub.c +++ b/libhb/decpgssub.c @@ -42,7 +42,7 @@ struct hb_work_private_s static int decsubInit( hb_work_object_t * w, hb_job_t * job ) { - AVCodec *codec = avcodec_find_decoder( CODEC_ID_HDMV_PGS_SUBTITLE ); + AVCodec *codec = avcodec_find_decoder( AV_CODEC_ID_HDMV_PGS_SUBTITLE ); AVCodecContext *context = avcodec_alloc_context3( codec ); context->codec = codec; @@ -226,9 +226,10 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, * 2. we're not doing Foreign Audio Search (!pv->job->indepth_scan) AND * 3. the sub is non-empty or we've seen one such sub before (!pv->discard_subtitle) * For forced-only extraction, usable subtitles also need to: - * a. be forced (subtitle.forced) OR + * a. be forced (subtitle.rects[0]->flags & AV_SUBTITLE_FLAG_FORCED) OR * b. follow a forced sub (pv->seen_forced_sub) */ - uint8_t useable_sub = 0; + uint8_t forced_sub = 0; + uint8_t useable_sub = 0; uint8_t clear_subtitle = 0; if (has_subtitle) @@ -237,8 +238,9 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if (subtitle.num_rects) { w->subtitle->hits++; - if (subtitle.forced) + if (subtitle.rects[0]->flags & AV_SUBTITLE_FLAG_FORCED) { + forced_sub = 1; w->subtitle->forced_hits++; } } @@ -254,10 +256,10 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, // do we need this subtitle? useable_sub = (!pv->discard_subtitle && (!w->subtitle->config.force || - subtitle.forced || pv->seen_forced_sub)); + forced_sub || pv->seen_forced_sub)); // do we need to create an empty subtitle? - if (w->subtitle->config.force && useable_sub && - !subtitle.forced && !clear_subtitle) + if (w->subtitle->config.force && + useable_sub && !forced_sub && !clear_subtitle) { // We are forced-only and need to output this subtitle, but // it's neither forced nor empty. @@ -268,7 +270,7 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, clear_subtitle = 1; } // is the subtitle forced? - pv->seen_forced_sub = subtitle.forced; + pv->seen_forced_sub = forced_sub; } } @@ -343,8 +345,8 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, { AVSubtitleRect *rect = subtitle.rects[ii]; - out = hb_frame_buffer_init( - PIX_FMT_YUVA420P, rect->w, rect->h ); + out = hb_frame_buffer_init(AV_PIX_FMT_YUVA420P, + rect->w, rect->h); out->s.id = in->s.id; out->sequence = in->sequence; diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index b57c75f12..05d4ae09d 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -536,7 +536,7 @@ static hb_buffer_t * CropSubtitle( hb_work_object_t * w, uint8_t * raw ) realwidth = crop[3] - crop[2] + 1; realheight = crop[1] - crop[0] + 1; - buf = hb_frame_buffer_init( PIX_FMT_YUVA420P, realwidth, realheight ); + buf = hb_frame_buffer_init( AV_PIX_FMT_YUVA420P, realwidth, realheight ); buf->s.start = pv->pts_start; buf->s.stop = pv->pts_stop; buf->s.type = SUBTITLE_BUF; diff --git a/libhb/dvd.c b/libhb/dvd.c index f342b5474..0368486a8 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -369,7 +369,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur case 0x03: audio->id = 0xc0 + position; audio->config.in.codec = HB_ACODEC_FFMPEG; - audio->config.in.codec_param = CODEC_ID_MP2; + audio->config.in.codec_param = AV_CODEC_ID_MP2; codec_name = "MPEG"; break; @@ -382,7 +382,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur case 0x06: audio->id = ( ( 0x88 + position ) << 8 ) | 0xbd; audio->config.in.codec = HB_ACODEC_DCA; - audio->config.in.codec_param = CODEC_ID_DTS; + audio->config.in.codec_param = AV_CODEC_ID_DTS; codec_name = "DTS"; break; diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index c1f152efd..e9cd44053 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -545,7 +545,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura case 0x03: audio->id = 0xc0 + position; audio->config.in.codec = HB_ACODEC_FFMPEG; - audio->config.in.codec_param = CODEC_ID_MP2; + audio->config.in.codec_param = AV_CODEC_ID_MP2; codec_name = "MPEG"; break; @@ -558,7 +558,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura case 0x06: audio->id = ( ( 0x88 + position ) << 8 ) | 0xbd; audio->config.in.codec = HB_ACODEC_DCA; - audio->config.in.codec_param = CODEC_ID_DTS; + audio->config.in.codec_param = AV_CODEC_ID_DTS; codec_name = "DTS"; break; diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index 44453477f..7468e9657 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -70,11 +70,11 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) switch ( w->codec_param ) { - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: { hb_log("encavcodecInit: MPEG-4 ASP encoder"); } break; - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: { hb_log("encavcodecInit: MPEG-2 encoder"); } break; @@ -198,7 +198,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) } context->width = job->width; context->height = job->height; - context->pix_fmt = PIX_FMT_YUV420P; + context->pix_fmt = AV_PIX_FMT_YUV420P; if( job->anamorphic.mode ) { @@ -539,7 +539,7 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in, hb_error( "encavcodec: codec context has uninitialized codec; skipping frame" ); } - av_free( frame ); + avcodec_free_frame(&frame); *buf_out = buf; diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c index 8da52d8b8..669691dc1 100644 --- a/libhb/encavcodecaudio.c +++ b/libhb/encavcodecaudio.c @@ -66,11 +66,12 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job) context->sample_rate = audio->config.out.samplerate; AVDictionary *av_opts = NULL; - if (w->codec_param == CODEC_ID_AAC) + if (w->codec_param == AV_CODEC_ID_AAC) { av_dict_set(&av_opts, "stereo_mode", "ms_off", 0); } - else if (w->codec_param == CODEC_ID_AC3 && mode != AV_MATRIX_ENCODING_NONE) + else if (w->codec_param == AV_CODEC_ID_AC3 && + mode != AV_MATRIX_ENCODING_NONE) { av_dict_set(&av_opts, "dsur_mode", "on", 0); } @@ -90,14 +91,22 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job) context->compression_level = audio->config.out.compression_level; } - // set the sample_fmt to something practical - if (audio->config.out.codec == HB_ACODEC_FFFLAC) + // set the sample format and bit depth to something practical + switch (audio->config.out.codec) { - hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S16); - } - else - { - hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_FLT); + case HB_ACODEC_FFFLAC: + hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S16); + context->bits_per_raw_sample = 16; + break; + + case HB_ACODEC_FFFLAC24: + hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S32); + context->bits_per_raw_sample = 24; + break; + + default: + hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_FLTP); + break; } if (hb_avcodec_open(context, codec, &av_opts, 0)) @@ -268,10 +277,10 @@ static hb_buffer_t* Encode(hb_work_object_t *w) av_samples_get_buffer_size(&in_linesize, pv->context->channels, frame.nb_samples, AV_SAMPLE_FMT_FLT, 1); int out_samples = avresample_convert(pv->avresample, - (void**)frame.extended_data, - out_linesize, frame.nb_samples, - (void**)&pv->input_buf, - in_linesize, frame.nb_samples); + frame.extended_data, out_linesize, + frame.nb_samples, + &pv->input_buf, in_linesize, + frame.nb_samples); if (out_samples != pv->samples_per_frame) { // we're not doing sample rate conversion, so this shouldn't happen diff --git a/libhb/enctheora.c b/libhb/enctheora.c index 77df0c0b5..3d2ecc440 100644 --- a/libhb/enctheora.c +++ b/libhb/enctheora.c @@ -365,7 +365,7 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, buf = hb_buffer_init( op.bytes + sizeof(op) ); memcpy(buf->data, &op, sizeof(op)); memcpy(buf->data + sizeof(op), op.packet, op.bytes); - buf->f.fmt = PIX_FMT_YUV420P; + buf->f.fmt = AV_PIX_FMT_YUV420P; buf->f.width = frame_width; buf->f.height = frame_height; buf->s.frametype = ( th_packet_iskeyframe(&op) ) ? HB_FRAME_KEY : HB_FRAME_REF; diff --git a/libhb/encx264.c b/libhb/encx264.c index 74a4adda2..f5808963f 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -340,10 +340,10 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) if( job->grayscale ) { - int uvsize = hb_image_stride( PIX_FMT_YUV420P, job->width, 1 ) * - hb_image_height( PIX_FMT_YUV420P, job->height, 1 ); - pv->grey_data = malloc( uvsize ); - memset( pv->grey_data, 0x80, uvsize ); + int uvsize = (hb_image_stride(AV_PIX_FMT_YUV420P, job->width, 1) * + hb_image_height(AV_PIX_FMT_YUV420P, job->height, 1)); + pv->grey_data = malloc(uvsize); + memset(pv->grey_data, 0x80, uvsize); pv->pic_in.img.plane[1] = pv->pic_in.img.plane[2] = pv->grey_data; } diff --git a/libhb/hb.c b/libhb/hb.c index fa329dbb2..63c6c6931 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -122,6 +122,12 @@ int hb_avcodec_open(AVCodecContext *avctx, AVCodec *codec, avctx->thread_count = 1; } + if (codec->capabilities & CODEC_CAP_EXPERIMENTAL) + { + // "experimental" encoders will not open without this + avctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; + } + ret = avcodec_open2(avctx, codec, av_opts); return ret; } @@ -152,20 +158,21 @@ int hb_avpicture_fill(AVPicture *pic, hb_buffer_t *buf) return ret; } -static int handle_jpeg(enum PixelFormat *format) +static int handle_jpeg(enum AVPixelFormat *format) { - switch (*format) { - case PIX_FMT_YUVJ420P: *format = PIX_FMT_YUV420P; return 1; - case PIX_FMT_YUVJ422P: *format = PIX_FMT_YUV422P; return 1; - case PIX_FMT_YUVJ444P: *format = PIX_FMT_YUV444P; return 1; - case PIX_FMT_YUVJ440P: *format = PIX_FMT_YUV440P; return 1; - default: return 0; + switch (*format) + { + case AV_PIX_FMT_YUVJ420P: *format = AV_PIX_FMT_YUV420P; return 1; + case AV_PIX_FMT_YUVJ422P: *format = AV_PIX_FMT_YUV422P; return 1; + case AV_PIX_FMT_YUVJ444P: *format = AV_PIX_FMT_YUV444P; return 1; + case AV_PIX_FMT_YUVJ440P: *format = AV_PIX_FMT_YUV440P; return 1; + default: return 0; } } struct SwsContext* -hb_sws_get_context(int srcW, int srcH, enum PixelFormat srcFormat, - int dstW, int dstH, enum PixelFormat dstFormat, +hb_sws_get_context(int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, int flags) { struct SwsContext * ctx; @@ -767,7 +774,7 @@ hb_buffer_t * hb_read_preview( hb_handle_t * h, int title_idx, int preview ) } hb_buffer_t * buf; - buf = hb_frame_buffer_init( PIX_FMT_YUV420P, title->width, title->height ); + buf = hb_frame_buffer_init( AV_PIX_FMT_YUV420P, title->width, title->height ); int pp, hh; for( pp = 0; pp < 3; pp++ ) @@ -810,7 +817,7 @@ void hb_get_preview( hb_handle_t * h, hb_job_t * job, int picture, swsflags = SWS_LANCZOS | SWS_ACCURATE_RND; - preview_buf = hb_frame_buffer_init( PIX_FMT_RGB32, + preview_buf = hb_frame_buffer_init( AV_PIX_FMT_RGB32, job->width, job->height ); hb_avpicture_fill( &pic_preview, preview_buf ); @@ -836,26 +843,26 @@ void hb_get_preview( hb_handle_t * h, hb_job_t * job, int picture, // we have aligned all buffers to 16 byte width and height strides // so there is room in the buffers to accomodate a litte // overscan. - deint_buf = hb_frame_buffer_init( PIX_FMT_YUV420P, + deint_buf = hb_frame_buffer_init( AV_PIX_FMT_YUV420P, title->width, title->height ); hb_avpicture_fill( &pic_deint, deint_buf ); - avpicture_deinterlace( &pic_deint, &pic_in, PIX_FMT_YUV420P, + avpicture_deinterlace( &pic_deint, &pic_in, AV_PIX_FMT_YUV420P, width, height ); - av_picture_crop( &pic_crop, &pic_deint, PIX_FMT_YUV420P, + av_picture_crop( &pic_crop, &pic_deint, AV_PIX_FMT_YUV420P, job->crop[0], job->crop[2] ); } else { // Crop - av_picture_crop( &pic_crop, &pic_in, PIX_FMT_YUV420P, job->crop[0], job->crop[2] ); + av_picture_crop( &pic_crop, &pic_in, AV_PIX_FMT_YUV420P, job->crop[0], job->crop[2] ); } // Get scaling context context = hb_sws_get_context(title->width - (job->crop[2] + job->crop[3]), title->height - (job->crop[0] + job->crop[1]), - PIX_FMT_YUV420P, - job->width, job->height, PIX_FMT_RGB32, + AV_PIX_FMT_YUV420P, + job->width, job->height, AV_PIX_FMT_RGB32, swsflags); // Scale diff --git a/libhb/hbffmpeg.h b/libhb/hbffmpeg.h index a44fc8d02..6447a367c 100644 --- a/libhb/hbffmpeg.h +++ b/libhb/hbffmpeg.h @@ -9,7 +9,7 @@ #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" -#include "libavutil/audioconvert.h" +#include "libavutil/channel_layout.h" #include "libavutil/imgutils.h" #include "libavutil/mathematics.h" #include "libavutil/opt.h" @@ -28,7 +28,7 @@ uint64_t hb_ff_mixdown_xlat(int hb_mixdown, int *downmix_mode); void hb_ff_set_sample_fmt(AVCodecContext *, AVCodec *, enum AVSampleFormat); struct SwsContext* -hb_sws_get_context(int srcW, int srcH, enum PixelFormat srcFormat, - int dstW, int dstH, enum PixelFormat dstFormat, +hb_sws_get_context(int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, int flags); int hb_avpicture_fill(AVPicture *pic, hb_buffer_t *buf); diff --git a/libhb/internal.h b/libhb/internal.h index 76845a3cc..9262ff6f8 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -174,27 +174,26 @@ static inline int hb_image_stride( int pix_fmt, int width, int plane ) return linesize; } -static inline int hb_image_width( int pix_fmt, int width, int plane ) +static inline int hb_image_width(int pix_fmt, int width, int plane) { - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - if ( plane == 1 || plane == 2 ) + if (desc != NULL && (plane == 1 || plane == 2)) { // The wacky arithmatic assures rounding up. - width = -((-width)>>desc->log2_chroma_w); + width = -((-width) >> desc->log2_chroma_w); } return width; } -static inline int hb_image_height_stride( int pix_fmt, int height, int plane ) +static inline int hb_image_height_stride(int pix_fmt, int height, int plane) { - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); // Decomb requires 6 extra lines and stride aligned to 32 bytes - // TODO: eliminate extra buffer copies in decomb - height = MULTIPLE_MOD_UP( height + 6, 32 ); - if ( plane == 1 || plane == 2 ) + height = MULTIPLE_MOD_UP(height + 6, 32); + if (desc != NULL && (plane == 1 || plane == 2)) { height = height >> desc->log2_chroma_h; } @@ -202,14 +201,14 @@ static inline int hb_image_height_stride( int pix_fmt, int height, int plane ) return height; } -static inline int hb_image_height( int pix_fmt, int height, int plane ) +static inline int hb_image_height(int pix_fmt, int height, int plane) { - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - if ( plane == 1 || plane == 2 ) + if (desc != NULL && (plane == 1 || plane == 2)) { // The wacky arithmatic assures rounding up. - height = -((-height)>>desc->log2_chroma_h); + height = -((-height) >> desc->log2_chroma_h); } return height; @@ -219,7 +218,7 @@ static inline int hb_image_height( int pix_fmt, int height, int plane ) // with dimensions width x height. static inline hb_buffer_t * hb_video_buffer_init( int width, int height ) { - return hb_frame_buffer_init( PIX_FMT_YUV420P, width, height ); + return hb_frame_buffer_init( AV_PIX_FMT_YUV420P, width, height ); } /*********************************************************************** diff --git a/libhb/mcdeint.c b/libhb/mcdeint.c index 4c8c7cb1e..9eb6f5ac0 100644 --- a/libhb/mcdeint.c +++ b/libhb/mcdeint.c @@ -40,7 +40,7 @@ void mcdeint_init( mcdeint_private_t * pv, { avcodec_register_all(); - AVCodec * enc = avcodec_find_encoder( CODEC_ID_SNOW ); + AVCodec * enc = avcodec_find_encoder( AV_CODEC_ID_SNOW ); // Snow ME_ITER will crash if width & height are not 16 pixel // aligned (or 8 pixel if CODEC_FLAG_4MV is set). diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c index 735bb631e..e45ebb126 100644 --- a/libhb/muxmkv.c +++ b/libhb/muxmkv.c @@ -247,11 +247,11 @@ static int MKVInit( hb_mux_object_t * m ) } break; case HB_ACODEC_FFFLAC: - if( audio->priv.config.extradata.bytes ) + case HB_ACODEC_FFFLAC24: + if (audio->priv.config.extradata.bytes) { - track->codecPrivate = create_flac_header( - audio->priv.config.extradata.bytes, - audio->priv.config.extradata.length ); + track->codecPrivate = create_flac_header(audio->priv.config.extradata.bytes, + audio->priv.config.extradata.length); track->codecPrivateSize = audio->priv.config.extradata.length + 8; } track->codecID = MK_ACODEC_FLAC; @@ -307,9 +307,10 @@ static int MKVInit( hb_mux_object_t * m ) track->extra.audio.channels = hb_mixdown_get_discrete_channel_count(audio->config.out.mixdown); } mux_data->track = mk_createTrack(m->file, track); - if( audio->config.out.codec == HB_ACODEC_VORBIS || - audio->config.out.codec == HB_ACODEC_FFFLAC ) - free( track->codecPrivate ); + if (audio->config.out.codec == HB_ACODEC_VORBIS || + audio->config.out.codec == HB_ACODEC_FFFLAC || + audio->config.out.codec == HB_ACODEC_FFFLAC24) + free(track->codecPrivate); } char * subidx_fmt = diff --git a/libhb/reader.c b/libhb/reader.c index d6279f5f5..4318b8005 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -26,6 +26,7 @@ typedef struct { int startup; double average; // average time between packets + double filtered_average; // average time between packets int64_t last; // last timestamp seen on this stream int id; // stream id int is_audio; // != 0 if this is an audio stream @@ -112,6 +113,7 @@ static int hb_reader_init( hb_work_object_t * w, hb_job_t * job ) r->stream_timing[0].id = r->title->video_id; r->stream_timing[0].average = 90000. * (double)job->vrate_base / (double)job->vrate; + r->stream_timing[0].filtered_average = r->stream_timing[0].average; r->stream_timing[0].last = -r->stream_timing[0].average; r->stream_timing[0].valid = 1; r->stream_timing[0].startup = 10; @@ -256,6 +258,7 @@ static stream_timing_t *id_to_st( hb_work_private_t *r, const hb_buffer_t *buf, } st->id = buf->s.id; st->average = 30.*90.; + st->filtered_average = st->average; st->startup = 10; st->last = -st->average; if ( ( st->is_audio = is_audio( r, buf->s.id ) ) != 0 ) @@ -277,13 +280,15 @@ static void update_ipt( hb_work_private_t *r, const hb_buffer_t *buf ) if( buf->s.renderOffset < 0 ) { - st->last += st->average; + st->last += st->filtered_average; return; } double dt = buf->s.renderOffset - st->last; + // Protect against spurious bad timestamps - if ( dt > -5 * 90000LL && dt < 5 * 90000LL ) + // timestamps should only move forward and by reasonable increments + if ( dt > 0 && dt < 5 * 90000LL ) { if( st->startup ) { @@ -294,6 +299,11 @@ static void update_ipt( hb_work_private_t *r, const hb_buffer_t *buf ) { st->average += ( dt - st->average ) * (1./32.); } + // Ignore outliers + if (dt < 1.5 * st->average) + { + st->filtered_average += ( dt - st->filtered_average ) * (1./32.); + } } st->last = buf->s.renderOffset; st->valid = 1; @@ -319,11 +329,13 @@ static void new_scr_offset( hb_work_private_t *r, hb_buffer_t *buf ) { last = st->last; } - int64_t nxt = last + st->average; + int64_t nxt = last + st->filtered_average; r->scr_offset = buf->s.renderOffset - nxt; // This log is handy when you need to debug timing problems... - //hb_log("id %x last %ld avg %g nxt %ld renderOffset %ld scr_offset %ld", - // buf->s.id, last, st->average, nxt, buf->s.renderOffset, r->scr_offset); + //hb_log("id %x last %"PRId64" avg %g nxt %"PRId64" renderOffset %"PRId64 + // " scr_offset %"PRId64"", + // buf->s.id, last, st->filtered_average, nxt, + // buf->s.renderOffset, r->scr_offset); r->scr_changes = r->demux.scr_changes; } @@ -616,7 +628,8 @@ void ReadLoop( void * _w ) r->start_found = 1; } // This log is handy when you need to debug timing problems - //hb_log("id %x scr_offset %ld start %ld --> %ld", + //hb_log("id %x scr_offset %"PRId64 + // " start %"PRId64" --> %"PRId64"", // buf->s.id, r->scr_offset, buf->s.start, // buf->s.start - r->scr_offset); buf->s.start -= r->scr_offset; @@ -630,10 +643,16 @@ void ReadLoop( void * _w ) buf->s.renderOffset -= r->scr_offset; update_ipt( r, buf ); } +#if 0 + // JAS: This was added to fix a rare "audio time went backward" + // sync error I found in one sample. But it has a bad side + // effect on DVDs, causing frequent "adding silence" sync + // errors. So I am disabling it. else { update_ipt( r, buf ); } +#endif } if( fifos ) { diff --git a/libhb/rendersub.c b/libhb/rendersub.c index 4e37699ae..9166ad89f 100644 --- a/libhb/rendersub.c +++ b/libhb/rendersub.c @@ -366,7 +366,7 @@ static hb_buffer_t * RenderSSAFrame( hb_filter_private_t * pv, ASS_Image * frame unsigned frameV = (yuv >> 8 ) & 0xff; unsigned frameU = (yuv >> 0 ) & 0xff; - sub = hb_frame_buffer_init( PIX_FMT_YUVA420P, frame->w, frame->h ); + sub = hb_frame_buffer_init( AV_PIX_FMT_YUVA420P, frame->w, frame->h ); if( sub == NULL ) return NULL; diff --git a/libhb/scan.c b/libhb/scan.c index 0163af406..49c092a1e 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -523,7 +523,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title ) if (vcodec == WORK_DECMPEG2) { vcodec = WORK_DECAVCODECV; - title->video_codec_param = CODEC_ID_MPEG2VIDEO; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; } #endif hb_work_object_t *vid_decoder = hb_get_work( vcodec ); @@ -1035,11 +1035,12 @@ static void LookForAudio( hb_title_t * title, hb_buffer_t * b ) } else if (audio->config.in.channel_layout) { - int lfe = !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY); + int lfes = (!!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY) + + !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY_2)); int channels = av_get_channel_layout_nb_channels(audio->config.in.channel_layout); char *desc = audio->config.lang.description + strlen(audio->config.lang.description); - sprintf(desc, " (%d.%d ch)", channels - lfe, lfe); + sprintf(desc, " (%d.%d ch)", channels - lfes, lfes); } hb_log( "scan: audio 0x%x: %s, rate=%dHz, bitrate=%d %s", audio->id, diff --git a/libhb/stream.c b/libhb/stream.c index bf3f726a6..85d047ece 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -48,57 +48,57 @@ typedef struct { [id] = { kind, codec, codec_param, name } static const stream2codec_t st2codec[256] = { - st(0x00, U, 0, 0, NULL), - st(0x01, V, WORK_DECMPEG2, 0, "MPEG1"), - st(0x02, V, WORK_DECMPEG2, 0, "MPEG2"), - st(0x03, A, HB_ACODEC_FFMPEG, CODEC_ID_MP2, "MPEG1"), - st(0x04, A, HB_ACODEC_FFMPEG, CODEC_ID_MP2, "MPEG2"), - st(0x05, N, 0, 0, "ISO 13818-1 private section"), - st(0x06, U, 0, 0, "ISO 13818-1 PES private data"), - st(0x07, N, 0, 0, "ISO 13522 MHEG"), - st(0x08, N, 0, 0, "ISO 13818-1 DSM-CC"), - st(0x09, N, 0, 0, "ISO 13818-1 auxiliary"), - st(0x0a, N, 0, 0, "ISO 13818-6 encap"), - st(0x0b, N, 0, 0, "ISO 13818-6 DSM-CC U-N msgs"), - st(0x0c, N, 0, 0, "ISO 13818-6 Stream descriptors"), - st(0x0d, N, 0, 0, "ISO 13818-6 Sections"), - st(0x0e, N, 0, 0, "ISO 13818-1 auxiliary"), - st(0x0f, A, HB_ACODEC_FFAAC, CODEC_ID_AAC, "AAC"), - st(0x10, V, WORK_DECAVCODECV, CODEC_ID_MPEG4, "MPEG4"), - st(0x11, A, HB_ACODEC_FFMPEG, CODEC_ID_AAC_LATM, "LATM AAC"), - st(0x12, U, 0, 0, "MPEG4 generic"), - - st(0x14, N, 0, 0, "ISO 13818-6 DSM-CC download"), - - st(0x1b, V, WORK_DECAVCODECV, CODEC_ID_H264, "H.264"), - - st(0x80, U, HB_ACODEC_FFMPEG, CODEC_ID_PCM_BLURAY, "Digicipher II Video"), - st(0x81, A, HB_ACODEC_AC3, 0, "AC3"), - st(0x82, A, HB_ACODEC_DCA, CODEC_ID_DTS, "DTS"), + st(0x00, U, 0, 0, NULL), + st(0x01, V, WORK_DECMPEG2, 0, "MPEG1"), + st(0x02, V, WORK_DECMPEG2, 0, "MPEG2"), + st(0x03, A, HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2, "MPEG1"), + st(0x04, A, HB_ACODEC_FFMPEG, AV_CODEC_ID_MP2, "MPEG2"), + st(0x05, N, 0, 0, "ISO 13818-1 private section"), + st(0x06, U, 0, 0, "ISO 13818-1 PES private data"), + st(0x07, N, 0, 0, "ISO 13522 MHEG"), + st(0x08, N, 0, 0, "ISO 13818-1 DSM-CC"), + st(0x09, N, 0, 0, "ISO 13818-1 auxiliary"), + st(0x0a, N, 0, 0, "ISO 13818-6 encap"), + st(0x0b, N, 0, 0, "ISO 13818-6 DSM-CC U-N msgs"), + st(0x0c, N, 0, 0, "ISO 13818-6 Stream descriptors"), + st(0x0d, N, 0, 0, "ISO 13818-6 Sections"), + st(0x0e, N, 0, 0, "ISO 13818-1 auxiliary"), + st(0x0f, A, HB_ACODEC_FFAAC, AV_CODEC_ID_AAC, "AAC"), + st(0x10, V, WORK_DECAVCODECV, AV_CODEC_ID_MPEG4, "MPEG4"), + st(0x11, A, HB_ACODEC_FFMPEG, AV_CODEC_ID_AAC_LATM, "LATM AAC"), + st(0x12, U, 0, 0, "MPEG4 generic"), + + st(0x14, N, 0, 0, "ISO 13818-6 DSM-CC download"), + + st(0x1b, V, WORK_DECAVCODECV, AV_CODEC_ID_H264, "H.264"), + + st(0x80, U, HB_ACODEC_FFMPEG, AV_CODEC_ID_PCM_BLURAY, "Digicipher II Video"), + st(0x81, A, HB_ACODEC_AC3, 0, "AC3"), + st(0x82, A, HB_ACODEC_DCA, AV_CODEC_ID_DTS, "DTS"), // 0x83 can be LPCM or BD TrueHD. Set to 'unknown' till we know more. - st(0x83, U, HB_ACODEC_LPCM, 0, "LPCM"), + st(0x83, U, HB_ACODEC_LPCM, 0, "LPCM"), // BD E-AC3 Primary audio - st(0x84, U, 0, 0, "SDDS"), - st(0x85, U, 0, 0, "ATSC Program ID"), + st(0x84, U, 0, 0, "SDDS"), + st(0x85, U, 0, 0, "ATSC Program ID"), // 0x86 can be BD DTS-HD/DTS. Set to 'unknown' till we know more. - st(0x86, U, HB_ACODEC_DCA_HD, CODEC_ID_DTS, "DTS-HD MA"), - st(0x87, A, HB_ACODEC_FFMPEG, CODEC_ID_EAC3, "E-AC3"), + st(0x86, U, HB_ACODEC_DCA_HD, AV_CODEC_ID_DTS, "DTS-HD MA"), + st(0x87, A, HB_ACODEC_FFMPEG, AV_CODEC_ID_EAC3, "E-AC3"), - st(0x8a, A, HB_ACODEC_DCA, CODEC_ID_DTS, "DTS"), + st(0x8a, A, HB_ACODEC_DCA, AV_CODEC_ID_DTS, "DTS"), - st(0x90, S, WORK_DECPGSSUB, 0, "PGS Subtitle"), + st(0x90, S, WORK_DECPGSSUB, 0, "PGS Subtitle"), // 0x91 can be AC3 or BD Interactive Graphics Stream. - st(0x91, U, 0, 0, "AC3/IGS"), - st(0x92, N, 0, 0, "Subtitle"), + st(0x91, U, 0, 0, "AC3/IGS"), + st(0x92, N, 0, 0, "Subtitle"), - st(0x94, U, 0, 0, "SDDS"), - st(0xa0, V, 0, 0, "MSCODEC"), + st(0x94, U, 0, 0, "SDDS"), + st(0xa0, V, 0, 0, "MSCODEC"), // BD E-AC3 Secondary audio - st(0xa1, U, 0, 0, "E-AC3"), + st(0xa1, U, 0, 0, "E-AC3"), // BD DTS-HD Secondary audio - st(0xa2, U, 0, 0, "DTS-HD LBR"), + st(0xa2, U, 0, 0, "DTS-HD LBR"), - st(0xea, V, WORK_DECAVCODECV, CODEC_ID_VC1, "VC-1"), + st(0xea, V, WORK_DECAVCODECV, AV_CODEC_ID_VC1, "VC-1"), }; #undef st @@ -1264,8 +1264,8 @@ static int isIframe( hb_stream_t *stream, const uint8_t *buf, int len ) int vid = pes_index_of_video( stream ); hb_pes_stream_t *pes = &stream->pes.list[vid]; if ( pes->stream_type <= 2 || - pes->codec_param == CODEC_ID_MPEG1VIDEO || - pes->codec_param == CODEC_ID_MPEG2VIDEO ) + pes->codec_param == AV_CODEC_ID_MPEG1VIDEO || + pes->codec_param == AV_CODEC_ID_MPEG2VIDEO ) { // This section of the code handles MPEG-1 and MPEG-2 video streams for (ii = 0; ii < len; ii++) @@ -1299,7 +1299,7 @@ static int isIframe( hb_stream_t *stream, const uint8_t *buf, int len ) // didn't find an I-frame return 0; } - if ( pes->stream_type == 0x1b || pes->codec_param == CODEC_ID_H264 ) + if ( pes->stream_type == 0x1b || pes->codec_param == AV_CODEC_ID_H264 ) { // we have an h.264 stream for (ii = 0; ii < len; ii++) @@ -1333,7 +1333,7 @@ static int isIframe( hb_stream_t *stream, const uint8_t *buf, int len ) // didn't find an I-frame return 0; } - if ( pes->stream_type == 0xea || pes->codec_param == CODEC_ID_VC1 ) + if ( pes->stream_type == 0xea || pes->codec_param == AV_CODEC_ID_VC1 ) { // we have an vc1 stream for (ii = 0; ii < len; ii++) @@ -2067,11 +2067,12 @@ static void set_audio_description( } else if (audio->config.in.channel_layout) { - int lfe = !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY); + int lfes = (!!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY) + + !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY_2)); int channels = av_get_channel_layout_nb_channels(audio->config.in.channel_layout); char *desc = audio->config.lang.description + strlen(audio->config.lang.description); - sprintf(desc, " (%d.%d ch)", channels - lfe, lfe); + sprintf(desc, " (%d.%d ch)", channels - lfes, lfes); } } @@ -3975,7 +3976,7 @@ static void hb_ps_stream_find_streams(hb_stream_t *stream) int idx = update_ps_streams( stream, pes_info.stream_id, pes_info.bd_substream_id, 0, U ); stream->pes.list[idx].codec = HB_ACODEC_DCA_HD; - stream->pes.list[idx].codec_param = CODEC_ID_DTS; + stream->pes.list[idx].codec_param = AV_CODEC_ID_DTS; continue; } else if ( ssid >= 0xa0 && ssid <= 0xaf ) @@ -3994,7 +3995,7 @@ static void hb_ps_stream_find_streams(hb_stream_t *stream) int idx = update_ps_streams( stream, pes_info.stream_id, pes_info.bd_substream_id, 0, A ); stream->pes.list[idx].codec = HB_ACODEC_FFMPEG; - stream->pes.list[idx].codec_param = CODEC_ID_TRUEHD; + stream->pes.list[idx].codec_param = AV_CODEC_ID_TRUEHD; continue; } else if ( ssid >= 0xc0 && ssid <= 0xcf ) @@ -4160,28 +4161,32 @@ static int do_probe( hb_pes_stream_t *pes, hb_buffer_t *buf ) if( !codec ) { int i; - static const struct { - const char *name; enum CodecID id; - } fmt_id_type[] = { - { "g722" , CODEC_ID_ADPCM_G722 }, - { "mlp" , CODEC_ID_MLP }, - { "truehd" , CODEC_ID_TRUEHD }, - { "shn" , CODEC_ID_SHORTEN }, - { "aac" , CODEC_ID_AAC }, - { "ac3" , CODEC_ID_AC3 }, - { "dts" , CODEC_ID_DTS }, - { "eac3" , CODEC_ID_EAC3 }, - { "h264" , CODEC_ID_H264 }, - { "m4v" , CODEC_ID_MPEG4 }, - { "mp3" , CODEC_ID_MP3 }, - { "mpegvideo", CODEC_ID_MPEG2VIDEO }, - { "cavsvideo", CODEC_ID_CAVS }, - { "dnxhd" , CODEC_ID_DNXHD }, - { "h261" , CODEC_ID_H261 }, - { "h263" , CODEC_ID_H263 }, - { "mjpeg" , CODEC_ID_MJPEG }, - { "vc1" , CODEC_ID_VC1 }, - { 0 } + static const struct + { + const char *name; + enum AVCodecID id; + } + fmt_id_type[] = + { + { "g722" , AV_CODEC_ID_ADPCM_G722 }, + { "mlp" , AV_CODEC_ID_MLP }, + { "truehd" , AV_CODEC_ID_TRUEHD }, + { "shn" , AV_CODEC_ID_SHORTEN }, + { "aac" , AV_CODEC_ID_AAC }, + { "ac3" , AV_CODEC_ID_AC3 }, + { "dts" , AV_CODEC_ID_DTS }, + { "eac3" , AV_CODEC_ID_EAC3 }, + { "h264" , AV_CODEC_ID_H264 }, + { "m4v" , AV_CODEC_ID_MPEG4 }, + { "mp3" , AV_CODEC_ID_MP3 }, + { "mpegvideo", AV_CODEC_ID_MPEG2VIDEO }, + { "cavsvideo", AV_CODEC_ID_CAVS }, + { "dnxhd" , AV_CODEC_ID_DNXHD }, + { "h261" , AV_CODEC_ID_H261 }, + { "h263" , AV_CODEC_ID_H263 }, + { "mjpeg" , AV_CODEC_ID_MJPEG }, + { "vc1" , AV_CODEC_ID_VC1 }, + { 0 }, }; for( i = 0; fmt_id_type[i].name; i++ ) { @@ -4200,22 +4205,22 @@ static int do_probe( hb_pes_stream_t *pes, hb_buffer_t *buf ) pes->stream_kind = V; switch ( codec->id ) { - case CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: pes->codec = WORK_DECMPEG2; pes->stream_type = 0x01; break; - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: pes->codec = WORK_DECMPEG2; pes->stream_type = 0x02; break; - case CODEC_ID_H264: + case AV_CODEC_ID_H264: pes->codec = WORK_DECAVCODECV; pes->stream_type = 0x1b; break; - case CODEC_ID_VC1: + case AV_CODEC_ID_VC1: pes->codec = WORK_DECAVCODECV; pes->stream_type = 0xea; break; @@ -4229,7 +4234,7 @@ static int do_probe( hb_pes_stream_t *pes, hb_buffer_t *buf ) pes->stream_kind = A; switch ( codec->id ) { - case CODEC_ID_AC3: + case AV_CODEC_ID_AC3: pes->codec = HB_ACODEC_AC3; break; default: @@ -4271,7 +4276,7 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) // To distinguish, Bluray streams have a reg_desc of HDMV update_ts_streams( stream, pid, 0, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_FFMPEG; - stream->pes.list[pes_idx].codec_param = CODEC_ID_PCM_BLURAY; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_PCM_BLURAY; continue; } @@ -4293,7 +4298,7 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) update_ts_streams( stream, pid, HB_SUBSTREAM_BD_TRUEHD, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_FFMPEG; - stream->pes.list[pes_idx].codec_param = CODEC_ID_TRUEHD; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_TRUEHD; continue; } if ( ( stype == 0x84 || stype == 0xa1 ) && @@ -4304,7 +4309,7 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) // To distinguish, Bluray streams have a reg_desc of HDMV update_ts_streams( stream, pid, 0, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_FFMPEG; - stream->pes.list[pes_idx].codec_param = CODEC_ID_EAC3; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_EAC3; continue; } // 0xa2 is DTS-HD LBR used in HD-DVD and bluray for @@ -4323,11 +4328,11 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) update_ts_streams( stream, pid, HB_SUBSTREAM_BD_DTS, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_DCA; - stream->pes.list[pes_idx].codec_param = CODEC_ID_DTS; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_DTS; update_ts_streams( stream, pid, 0, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_DCA_HD; - stream->pes.list[pes_idx].codec_param = CODEC_ID_DTS; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_DTS; continue; } if ( stype == 0x86 && @@ -4338,11 +4343,11 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream) update_ts_streams( stream, pid, HB_SUBSTREAM_BD_DTS, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_DCA; - stream->pes.list[pes_idx].codec_param = CODEC_ID_DTS; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_DTS; update_ts_streams( stream, pid, 0, stype, A, &pes_idx ); stream->pes.list[pes_idx].codec = HB_ACODEC_DCA_HD; - stream->pes.list[pes_idx].codec_param = CODEC_ID_DTS; + stream->pes.list[pes_idx].codec_param = AV_CODEC_ID_DTS; continue; } @@ -4784,7 +4789,13 @@ hb_buffer_t * hb_ts_decode_pkt( hb_stream_t *stream, const uint8_t * pkt ) } // if there's an adaptation header & PCR_flag is set // get the PCR (Program Clock Reference) - if ( adapt_len > 7 && ( pkt[5] & 0x10 ) != 0 ) + // + // JAS: I have a badly mastered BD that does adaptation field + // stuffing incorrectly which results in invalid PCRs. Test + // for all 0xff to guard against this. + if ( adapt_len > 7 && ( pkt[5] & 0x10 ) != 0 && + !(pkt[5] == 0xff && pkt[6] == 0xff && pkt[7] == 0xff && + pkt[8] == 0xff && pkt[9] == 0xff && pkt[10] == 0xff)) { int64_t pcr; pcr = ( (uint64_t)pkt[6] << (33 - 8) ) | @@ -5125,7 +5136,7 @@ static void ffmpeg_close( hb_stream_t *d ) } } -static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id ) +static void add_ffmpeg_audio(hb_title_t *title, hb_stream_t *stream, int id) { AVStream *st = stream->ffmpeg_ic->streams[id]; AVCodecContext *codec = st->codec; @@ -5133,38 +5144,44 @@ static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id ) // scan will ignore any audio without a bitrate. Since we've already typed the // audio in order to determine its codec we set up the audio parameters here. - if ( codec->bit_rate || codec->sample_rate ) + if (codec->bit_rate || codec->sample_rate) { - hb_audio_t *audio = calloc( 1, sizeof(*audio) );; - + hb_audio_t *audio = calloc(1, sizeof(*audio)); audio->id = id; - if ( codec->codec_id == CODEC_ID_AC3 ) + + if (codec->codec_id == AV_CODEC_ID_AC3) { audio->config.in.codec = HB_ACODEC_AC3; } else { - if ( codec->codec_id == CODEC_ID_DTS && - ( codec->profile == FF_PROFILE_DTS || - codec->profile == FF_PROFILE_DTS_ES || - codec->profile == FF_PROFILE_DTS_96_24 ) ) + if (codec->codec_id == AV_CODEC_ID_DTS) { - audio->config.in.codec = HB_ACODEC_DCA; - } - else if ( codec->codec_id == CODEC_ID_DTS && - ( codec->profile == FF_PROFILE_DTS_HD_MA || - codec->profile == FF_PROFILE_DTS_HD_HRA ) ) - { - audio->config.in.codec = HB_ACODEC_DCA_HD; + if (codec->profile == FF_PROFILE_DTS_HD_MA || + codec->profile == FF_PROFILE_DTS_HD_HRA) + { + audio->config.in.codec = HB_ACODEC_DCA_HD; + } + else if (codec->profile == FF_PROFILE_DTS || + codec->profile == FF_PROFILE_DTS_ES || + codec->profile == FF_PROFILE_DTS_96_24) + { + audio->config.in.codec = HB_ACODEC_DCA; + } + else + { + audio->config.in.codec = HB_ACODEC_FFMPEG; + } } - else if ( codec->codec_id == CODEC_ID_AAC ) + else if (codec->codec_id == AV_CODEC_ID_AAC) { int len = MIN(codec->extradata_size, HB_CONFIG_MAX_SIZE); - memcpy(audio->priv.config.extradata.bytes, codec->extradata, len); + memcpy(audio->priv.config.extradata.bytes, codec->extradata, + len); audio->priv.config.extradata.length = len; audio->config.in.codec = HB_ACODEC_FFAAC; } - else if ( codec->codec_id == CODEC_ID_MP3 ) + else if (codec->codec_id == AV_CODEC_ID_MP3) { audio->config.in.codec = HB_ACODEC_MP3; } @@ -5175,24 +5192,32 @@ static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id ) audio->config.in.codec_param = codec->codec_id; int bps = av_get_bits_per_sample(codec->codec_id); - if( bps && codec->sample_rate && codec->channels ) - audio->config.in.bitrate = bps * codec->sample_rate * codec->channels; - else if( codec->bit_rate ) + if (bps && codec->sample_rate && codec->channels) + { + audio->config.in.bitrate = (codec->channels * + codec->sample_rate * bps); + } + else if (codec->bit_rate) + { audio->config.in.bitrate = codec->bit_rate; + } else + { audio->config.in.bitrate = 1; + } audio->config.in.samplerate = codec->sample_rate; audio->config.in.samples_per_frame = codec->frame_size; audio->config.in.channel_map = &hb_libav_chan_map; - audio->config.in.channel_layout = hb_ff_layout_xlat(codec->channel_layout, - codec->channels); + audio->config.in.channel_layout = + hb_ff_layout_xlat(codec->channel_layout, codec->channels); } - tag = av_dict_get( st->metadata, "language", NULL, 0 ); - set_audio_description( stream, audio, lang_for_code2( tag ? tag->value : "und" ) ); + tag = av_dict_get(st->metadata, "language", NULL, 0); + set_audio_description(stream, audio, + lang_for_code2(tag ? tag->value : "und")); audio->config.in.track = id; - hb_list_add( title->list_audio, audio ); + hb_list_add(title->list_audio, audio); } } @@ -5331,7 +5356,7 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id switch ( codec->codec_id ) { - case CODEC_ID_DVD_SUBTITLE: + case AV_CODEC_ID_DVD_SUBTITLE: subtitle->format = PICTURESUB; subtitle->source = VOBSUB; subtitle->config.dest = RENDERSUB; // By default render (burn-in) the VOBSUB. @@ -5340,25 +5365,25 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id hb_log( "add_ffmpeg_subtitle: malformed extradata for VOB subtitle track; " "subtitle colors likely to be wrong" ); break; - case CODEC_ID_TEXT: + case AV_CODEC_ID_TEXT: subtitle->format = TEXTSUB; subtitle->source = UTF8SUB; subtitle->config.dest = PASSTHRUSUB; subtitle->codec = WORK_DECUTF8SUB; break; - case CODEC_ID_MOV_TEXT: // TX3G + case AV_CODEC_ID_MOV_TEXT: // TX3G subtitle->format = TEXTSUB; subtitle->source = TX3GSUB; subtitle->config.dest = PASSTHRUSUB; subtitle->codec = WORK_DECTX3GSUB; break; - case CODEC_ID_SSA: + case AV_CODEC_ID_SSA: subtitle->format = TEXTSUB; subtitle->source = SSASUB; subtitle->config.dest = PASSTHRUSUB; subtitle->codec = WORK_DECSSASUB; break; - case CODEC_ID_HDMV_PGS_SUBTITLE: + case AV_CODEC_ID_HDMV_PGS_SUBTITLE: subtitle->format = PICTURESUB; subtitle->source = PGSSUB; subtitle->config.dest = RENDERSUB; @@ -5410,7 +5435,7 @@ static void add_ffmpeg_attachment( hb_title_t *title, hb_stream_t *stream, int i const char *name = get_ffmpeg_metadata_value( st->metadata, "filename" ); switch ( codec->codec_id ) { - case CODEC_ID_TTF: + case AV_CODEC_ID_TTF: // Libav sets codec ID based on mime type of the attachment type = FONT_TTF_ATTACH; break; @@ -5537,7 +5562,7 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream, hb_title_t *title ) title->video_codec == 0 ) { AVCodecContext *context = ic->streams[i]->codec; - if ( context->pix_fmt != PIX_FMT_YUV420P && + if ( context->pix_fmt != AV_PIX_FMT_YUV420P && !sws_isSupportedInput( context->pix_fmt ) ) { hb_log( "ffmpeg_title_scan: Unsupported color space" ); @@ -5552,7 +5577,7 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream, hb_title_t *title ) title->pixel_aspect_height = ic->streams[i]->sample_aspect_ratio.den; } - if ( context->codec_id == CODEC_ID_H264 ) + if ( context->codec_id == AV_CODEC_ID_H264 ) title->flags |= HBTF_NO_IDR; title->video_codec = WORK_DECAVCODECV; @@ -5678,7 +5703,7 @@ static int ffmpeg_is_keyframe( hb_stream_t *stream ) switch ( stream->ffmpeg_ic->streams[stream->ffmpeg_video_id]->codec->codec_id ) { - case CODEC_ID_VC1: + case AV_CODEC_ID_VC1: // XXX the VC1 codec doesn't mark key frames so to get previews // we do it ourselves here. The decoder gets messed up if it // doesn't get a SEQ header first so we consider that to be a key frame. @@ -5688,7 +5713,7 @@ static int ffmpeg_is_keyframe( hb_stream_t *stream ) return 0; - case CODEC_ID_WMV3: + case AV_CODEC_ID_WMV3: // XXX the ffmpeg WMV3 codec doesn't mark key frames. // Only M$ could make I-frame detection this complicated: there // are two to four bits of unused junk ahead of the frame type @@ -5802,20 +5827,20 @@ hb_buffer_t * hb_ffmpeg_read( hb_stream_t *stream ) /* * Fill out buf->s.stop for subtitle packets * - * libavcodec's MKV demuxer stores the duration of UTF-8 subtitles (CODEC_ID_TEXT) + * libavcodec's MKV demuxer stores the duration of UTF-8 subtitles (AV_CODEC_ID_TEXT) * in the 'convergence_duration' field for some reason. * * Other subtitles' durations are stored in the 'duration' field. * - * VOB subtitles (CODEC_ID_DVD_SUBTITLE) do not have their duration stored in + * VOB subtitles (AV_CODEC_ID_DVD_SUBTITLE) do not have their duration stored in * either field. This is not a problem because the VOB decoder can extract this * information from the packet payload itself. * - * SSA subtitles (CODEC_ID_SSA) do not have their duration stored in + * SSA subtitles (AV_CODEC_ID_SSA) do not have their duration stored in * either field. This is not a problem because the SSA decoder can extract this * information from the packet payload itself. */ - enum CodecID ffmpeg_pkt_codec; + enum AVCodecID ffmpeg_pkt_codec; enum AVMediaType codec_type; ffmpeg_pkt_codec = stream->ffmpeg_ic->streams[stream->ffmpeg_pkt->stream_index]->codec->codec_id; codec_type = stream->ffmpeg_ic->streams[stream->ffmpeg_pkt->stream_index]->codec->codec_type; @@ -5845,12 +5870,12 @@ hb_buffer_t * hb_ffmpeg_read( hb_stream_t *stream ) buf->s.type = OTHER_BUF; break; } - if ( ffmpeg_pkt_codec == CODEC_ID_TEXT ) { + if ( ffmpeg_pkt_codec == AV_CODEC_ID_TEXT ) { int64_t ffmpeg_pkt_duration = stream->ffmpeg_pkt->convergence_duration; int64_t buf_duration = av_to_hb_pts( ffmpeg_pkt_duration, tsconv ); buf->s.stop = buf->s.start + buf_duration; } - if ( ffmpeg_pkt_codec == CODEC_ID_MOV_TEXT ) { + if ( ffmpeg_pkt_codec == AV_CODEC_ID_MOV_TEXT ) { int64_t ffmpeg_pkt_duration = stream->ffmpeg_pkt->duration; int64_t buf_duration = av_to_hb_pts( ffmpeg_pkt_duration, tsconv ); buf->s.stop = buf->s.start + buf_duration; diff --git a/libhb/sync.c b/libhb/sync.c index 592ebb8c3..5ad5bfedb 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -950,15 +950,11 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) { case HB_ACODEC_AC3_PASS: { - codec = avcodec_find_encoder( CODEC_ID_AC3 ); + codec = avcodec_find_encoder( AV_CODEC_ID_AC3 ); } break; case HB_ACODEC_AAC_PASS: { - codec = avcodec_find_encoder( CODEC_ID_AAC ); - } break; - case HB_ACODEC_MP3_PASS: - { - codec = avcodec_find_encoder( CODEC_ID_MP3 ); + codec = avcodec_find_encoder( AV_CODEC_ID_AAC ); } break; default: { @@ -990,16 +986,13 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) } // Prepare input frame - AVFrame frame; - uint8_t * zeros; - - frame.nb_samples= c->frame_size; + AVFrame frame = { .nb_samples = c->frame_size, .pts = 0, }; int input_size = av_samples_get_buffer_size(NULL, c->channels, - frame.nb_samples, c->sample_fmt, 1); - zeros = calloc( 1, input_size ); - avcodec_fill_audio_frame(&frame, c->channels, - c->sample_fmt, zeros, input_size, 1); - frame.pts = 0; + frame.nb_samples, + c->sample_fmt, 1); + uint8_t *zeros = calloc(1, input_size); + avcodec_fill_audio_frame(&frame, c->channels, c->sample_fmt, zeros, + input_size, 1); // Allocate enough space for the encoded silence // The output should be < the input diff --git a/libhb/work.c b/libhb/work.c index d727f1366..db7dfe788 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -141,19 +141,20 @@ hb_work_object_t * hb_codec_encoder( int codec ) case HB_ACODEC_FFAAC: { w = hb_get_work( WORK_ENCAVCODEC_AUDIO ); - w->codec_param = CODEC_ID_AAC; + w->codec_param = AV_CODEC_ID_AAC; return w; } case HB_ACODEC_FFFLAC: + case HB_ACODEC_FFFLAC24: { w = hb_get_work( WORK_ENCAVCODEC_AUDIO ); - w->codec_param = CODEC_ID_FLAC; + w->codec_param = AV_CODEC_ID_FLAC; return w; } case HB_ACODEC_AC3: { w = hb_get_work( WORK_ENCAVCODEC_AUDIO ); - w->codec_param = CODEC_ID_AC3; + w->codec_param = AV_CODEC_ID_AC3; return w; } } @@ -708,7 +709,7 @@ static void do_job( hb_job_t * job ) hb_filter_init_t init; init.job = job; - init.pix_fmt = PIX_FMT_YUV420P; + init.pix_fmt = AV_PIX_FMT_YUV420P; init.width = title->width; init.height = title->height; #ifdef USE_OPENCL @@ -1017,7 +1018,7 @@ static void do_job( hb_job_t * job ) if (vcodec == WORK_DECMPEG2) { vcodec = WORK_DECAVCODECV; - title->video_codec_param = CODEC_ID_MPEG2VIDEO; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; } #endif #ifdef USE_OPENCL @@ -1088,11 +1089,11 @@ static void do_job( hb_job_t * job ) { case HB_VCODEC_FFMPEG_MPEG4: w = hb_get_work( WORK_ENCAVCODEC ); - w->codec_param = CODEC_ID_MPEG4; + w->codec_param = AV_CODEC_ID_MPEG4; break; case HB_VCODEC_FFMPEG_MPEG2: w = hb_get_work( WORK_ENCAVCODEC ); - w->codec_param = CODEC_ID_MPEG2VIDEO; + w->codec_param = AV_CODEC_ID_MPEG2VIDEO; break; case HB_VCODEC_X264: w = hb_get_work( WORK_ENCX264 ); diff --git a/macosx/Controller.h b/macosx/Controller.h index 5c8ddf34a..b4c0420f5 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -59,6 +59,27 @@ BOOL fIsDragging; /* Picture Preview */ PreviewController * fPreviewController; + /* x264 Presets Box */ + NSArray * fX264PresetNames; + NSUInteger * fX264MediumPresetIndex; + IBOutlet NSButton * fx264UseAdvancedOptionsCheck; + IBOutlet NSBox * fX264PresetsBox; + IBOutlet NSSlider * fX264PresetsSlider; + IBOutlet NSTextField * fX264PresetSliderLabel; + IBOutlet NSTextField * fX264PresetSelectedTextField; + IBOutlet NSPopUpButton * fX264TunePopUp; + IBOutlet NSTextField * fX264TunePopUpLabel; + IBOutlet NSPopUpButton * fX264ProfilePopUp; + IBOutlet NSTextField * fX264ProfilePopUpLabel; + IBOutlet NSPopUpButton * fX264LevelPopUp; + IBOutlet NSTextField * fX264LevelPopUpLabel; + IBOutlet NSButton * fX264FastDecodeCheck; + IBOutlet NSTextField * fDisplayX264PresetsAdditonalOptionsTextField; + IBOutlet NSTextField * fDisplayX264PresetsAdditonalOptionsLabel; + // Text Field to show the expanded opts from unparse() + IBOutlet NSTextField * fDisplayX264PresetsUnparseTextField; + char * fX264PresetsUnparsedUTF8String; + /* Advanced options tab */ HBAdvancedController * fAdvancedOptions; IBOutlet NSBox * fAdvancedView; @@ -280,8 +301,13 @@ BOOL fIsDragging; - (IBAction) cancelScanning:(id)sender; -- (void) updateUI: (NSTimer *) timer; -- (void) enableUI: (bool) enable; +- (void) updateUI: (NSTimer*) timer; +- (void) enableUI: (bool) enable; +- (void) setupX264PresetsWidgets: (id) sender; +- (void) enableX264Widgets: (bool) enable; +- (IBAction) updateX264Widgets: (id) sender; +- (IBAction) x264PresetsChangedDisplayExpandedOptions: (id) sender; + - (IBAction) encodeStartStopPopUpChanged: (id) sender; @@ -455,5 +481,20 @@ BOOL fIsDragging; - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender; - (void) updateDockIcon:(double)progress withETA:(NSString*)etaStr; + +// x264 system methods +- (NSString*) x264Preset; +- (NSString*) x264Tune; +- (NSString*) x264OptionExtra; +- (NSString*) h264Profile; +- (NSString*) h264Level; +- (void) setX264Preset: (NSString*) x264Preset; +- (void) setX264Tune: (NSString*) x264Tune; +- (void) setX264OptionExtra: (NSString*) x264OptionExtra; +- (void) setH264Profile: (NSString*) h264Profile; +- (void) setH264Level: (NSString*) h264Level; +- (IBAction) x264PresetsSliderChanged: (id) sender; + + @end diff --git a/macosx/Controller.m b/macosx/Controller.m index e93bd8e54..9eb594c66 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -114,6 +114,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [self updateDockIcon:-1.0 withETA:@""]; + /* + * initialize fX264PresetsUnparsedUTF8String as early as possible + * avoids an invalid free + */ + fX264PresetsUnparsedUTF8String = NULL; + return self; } @@ -678,6 +684,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [fVidEncoderPopUp removeAllItems]; [fVidEncoderPopUp addItemWithTitle: @"FFmpeg"]; + /* setup our x264 presets widgets - this only needs to be done once */ + [self setupX264PresetsWidgets: nil]; /* Video quality */ [fVidBitrateField setIntValue: 1000]; @@ -746,31 +754,35 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It fSrcChapterField, fSrcChapterStartPopUp, fSrcChapterToField, fSrcChapterEndPopUp, fSrcDuration1Field, fSrcDuration2Field, fDstFormatField, fDstFormatPopUp, fDstFile1Field, fDstFile2Field, - fDstBrowseButton, fVidRateField, fVidRatePopUp,fVidEncoderField, fVidEncoderPopUp, fVidQualityField, - fPictureSizeField,fPictureCroppingField, fVideoFiltersField,fVidQualityMatrix, fSubField, fSubPopUp, - fPresetsAdd,fPresetsDelete,fSrcAngleLabel,fSrcAnglePopUp, - fCreateChapterMarkers,fVidTurboPassCheck,fDstMp4LargeFileCheck,fSubForcedCheck,fPresetsOutlineView, - fDstMp4HttpOptFileCheck,fDstMp4iPodFileCheck,fVidQualityRFField,fVidQualityRFLabel, - fEncodeStartStopPopUp,fSrcTimeStartEncodingField,fSrcTimeEndEncodingField,fSrcFrameStartEncodingField, - fSrcFrameEndEncodingField, fLoadChaptersButton, fSaveChaptersButton, fFramerateMatrix + fDstBrowseButton, fVidRateField, fVidRatePopUp, fVidEncoderField, + fVidEncoderPopUp, fVidQualityField, fPictureSizeField, + fPictureCroppingField, fVideoFiltersField, fVidQualityMatrix, + fSubField, fSubPopUp, fPresetsAdd, fPresetsDelete, fSrcAngleLabel, + fSrcAnglePopUp, fCreateChapterMarkers, fVidTurboPassCheck, + fDstMp4LargeFileCheck, fSubForcedCheck, fPresetsOutlineView, + fDstMp4HttpOptFileCheck, fDstMp4iPodFileCheck, fVidQualityRFField, + fVidQualityRFLabel, fEncodeStartStopPopUp, fSrcTimeStartEncodingField, + fSrcTimeEndEncodingField, fSrcFrameStartEncodingField, + fSrcFrameEndEncodingField, fLoadChaptersButton, fSaveChaptersButton, + fFramerateMatrix, + }; - - for( unsigned i = 0; - i < sizeof( controls ) / sizeof( NSControl * ); i++ ) + for (unsigned i = 0; i < (sizeof(controls) / sizeof(NSControl*)); i++) { - if( [[controls[i] className] isEqualToString: @"NSTextField"] ) + if ([[controls[i] className] isEqualToString: @"NSTextField"]) { - NSTextField * tf = (NSTextField *) controls[i]; - if( ![tf isBezeled] ) + NSTextField *tf = (NSTextField*)controls[i]; + if (![tf isBezeled]) { - [tf setTextColor: b ? [NSColor controlTextColor] : - [NSColor disabledControlTextColor]]; + [tf setTextColor: (b ? + [NSColor controlTextColor] : + [NSColor disabledControlTextColor])]; continue; } } [controls[i] setEnabled: b]; - } + if (b) { @@ -788,7 +800,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It } [self videoMatrixChanged:nil]; - [fAdvancedOptions enableUI:b]; + [self enableX264Widgets:b]; } @@ -2525,8 +2537,25 @@ fWorkingCount = 0; /* Codecs */ /* Video encoder */ [queueFileJob setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"]; - /* x264 Option String */ - [queueFileJob setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + + /* x264 advanced options */ + if ([fx264UseAdvancedOptionsCheck state]) + { + // we are using the advanced panel + [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"x264UseAdvancedOptions"]; + [queueFileJob setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + } + else + { + // we are using the x264 system + [queueFileJob setObject:[NSNumber numberWithInt:0] forKey: @"x264UseAdvancedOptions"]; + [queueFileJob setObject:[self x264Preset] forKey: @"x264Preset"]; + [queueFileJob setObject:[self x264Tune] forKey: @"x264Tune"]; + [queueFileJob setObject:[self x264OptionExtra] forKey: @"x264OptionExtra"]; + [queueFileJob setObject:[self h264Profile] forKey: @"h264Profile"]; + [queueFileJob setObject:[self h264Level] forKey: @"h264Level"]; + } + /* FFmpeg (lavc) Option String */ [queueFileJob setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"]; @@ -2848,46 +2877,54 @@ fWorkingCount = 0; /* * If scanning we need to do some extra setup of the job. */ - if( job->indepth_scan == 1 ) + if (job->indepth_scan == 1) { - NSString *advanced_opts_tmp = [NSString stringWithUTF8String: job->advanced_opts]; - + char *x264_preset_tmp = job->x264_preset != NULL ? strdup(job->x264_preset) : NULL; + char *x264_tune_tmp = job->x264_tune != NULL ? strdup(job->x264_tune) : NULL; + char *advanced_opts_tmp = job->advanced_opts != NULL ? job->advanced_opts : NULL; + char *h264_profile_tmp = job->x264_profile != NULL ? strdup(job->x264_profile) : NULL; + char *h264_level_tmp = job->h264_level != NULL ? strdup(job->h264_level) : NULL; /* * When subtitle scan is enabled do a fast pre-scan job * which will determine which subtitles to enable, if any. */ - job->pass = -1; + hb_job_set_x264_preset (job, NULL); + hb_job_set_x264_tune (job, NULL); hb_job_set_advanced_opts(job, NULL); - - job->indepth_scan = 1; - - + hb_job_set_x264_profile (job, NULL); + hb_job_set_x264_level (job, NULL); + job->pass = -1; + hb_add(fQueueEncodeLibhb, job); /* - * Add the pre-scan job + * reset the advanced settings */ - hb_add( fQueueEncodeLibhb, job ); - hb_job_set_advanced_opts(job, [advanced_opts_tmp UTF8String] ); + hb_job_set_x264_preset (job, x264_preset_tmp); + hb_job_set_x264_tune (job, x264_tune_tmp); + hb_job_set_advanced_opts(job, advanced_opts_tmp); + hb_job_set_x264_profile (job, h264_profile_tmp); + hb_job_set_x264_level (job, h264_level_tmp); + if (x264_preset_tmp != NULL) free(x264_preset_tmp); + if (x264_tune_tmp != NULL) free(x264_tune_tmp); + if (advanced_opts_tmp != NULL) free(advanced_opts_tmp); + if (h264_profile_tmp != NULL) free(h264_profile_tmp); + if (h264_level_tmp != NULL) free(h264_level_tmp); } - if( [[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1 ) + if ([[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1) { job->indepth_scan = 0; job->pass = 1; - - hb_add( fQueueEncodeLibhb, job ); - + hb_add(fQueueEncodeLibhb, job); job->pass = 2; - - hb_add( fQueueEncodeLibhb, job ); + hb_add(fQueueEncodeLibhb, job); } else { job->indepth_scan = 0; job->pass = 0; - - hb_add( fQueueEncodeLibhb, job ); + hb_add(fQueueEncodeLibhb, job); } NSString *destinationDirectory = [[queueToApply objectForKey:@"DestinationPath"] stringByDeletingLastPathComponent]; @@ -2954,11 +2991,30 @@ fWorkingCount = 0; /* Mux mp4 with http optimization */ [fDstMp4HttpOptFileCheck setState:[[queueToApply objectForKey:@"Mp4HttpOptimize"] intValue]]; - /* Video encoder */ - /* We set the advanced opt string here if applicable*/ + /* video encoder */ [fVidEncoderPopUp selectItemWithTitle:[queueToApply objectForKey:@"VideoEncoder"]]; - [fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]]; - [fAdvancedOptions setLavcOptions:[queueToApply objectForKey:@"lavcOption"]]; + [fAdvancedOptions setLavcOptions: [queueToApply objectForKey:@"lavcOption"]]; + /* advanced x264 options */ + if ([[queueToApply objectForKey:@"x264UseAdvancedOptions"] intValue]) + { + // we are using the advanced panel + [fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]]; + // enable the advanced panel and update the widgets + [fx264UseAdvancedOptionsCheck setState: NSOnState]; + [self updateX264Widgets:nil]; + } + else + { + // we are using the x264 system + [self setX264Preset: [queueToApply objectForKey:@"x264Preset"]]; + [self setX264Tune: [queueToApply objectForKey:@"x264Tune"]]; + [self setX264OptionExtra: [queueToApply objectForKey:@"x264OptionExtra"]]; + [self setH264Profile: [queueToApply objectForKey:@"h264Profile"]]; + [self setH264Level: [queueToApply objectForKey:@"h264Level"]]; + // disable the advanced panel and update the widgets + [fx264UseAdvancedOptionsCheck setState: NSOffState]; + [self updateX264Widgets:nil]; + } /* Lets run through the following functions to get variables set there */ [self videoEncoderPopUpChanged:nil]; @@ -3219,21 +3275,60 @@ fWorkingCount = 0; /* Format (Muxer) and Video Encoder */ job->mux = [[fDstFormatPopUp selectedItem] tag]; job->vcodec = [[fVidEncoderPopUp selectedItem] tag]; + job->fastfirstpass = 0; job->chapter_markers = 0; - if( job->vcodec == HB_VCODEC_X264 ) + if (job->vcodec == HB_VCODEC_X264) { - - /* Below Sends x264 options to the core library if x264 is selected*/ - /* Lets use this as per Nyx, Thanks Nyx! */ - /* For previews we ignore the turbo option for the first pass of two since we only use 1 pass */ - job->fastfirstpass = 0; - hb_job_set_advanced_opts(job, [[fAdvancedOptions optionsString] UTF8String] ); + /* advanced x264 options */ + NSString *tmpString; + // translate zero-length strings to NULL for libhb + const char *x264_preset = NULL; + const char *x264_tune = NULL; + const char *advanced_opts = NULL; + const char *h264_profile = NULL; + const char *h264_level = NULL; + if ([fx264UseAdvancedOptionsCheck state]) + { + // we are using the advanced panel + if ([(tmpString = [fAdvancedOptions optionsString]) length]) + { + advanced_opts = [tmpString UTF8String]; + } + } + else + { + // we are using the x264 system + x264_preset = [[self x264Preset] UTF8String]; + if ([(tmpString = [self x264Tune]) length]) + { + x264_tune = [tmpString UTF8String]; + } + if ([(tmpString = [self x264OptionExtra]) length]) + { + advanced_opts = [tmpString UTF8String]; + } + if ([(tmpString = [self h264Profile]) length]) + { + h264_profile = [tmpString UTF8String]; + } + if ([(tmpString = [self h264Level]) length]) + { + h264_level = [tmpString UTF8String]; + } + } + hb_job_set_x264_preset (job, x264_preset); + hb_job_set_x264_tune (job, x264_tune); + hb_job_set_advanced_opts(job, advanced_opts); + hb_job_set_x264_profile (job, h264_profile); + hb_job_set_x264_level (job, h264_level); } - else if( job->vcodec & HB_VCODEC_FFMPEG_MASK ) + else if (job->vcodec & HB_VCODEC_FFMPEG_MASK) { - hb_job_set_advanced_opts(job, [[fAdvancedOptions optionsStringLavc] UTF8String] ); + hb_job_set_advanced_opts(job, + [[fAdvancedOptions optionsStringLavc] + UTF8String]); } /* Video settings */ @@ -3698,37 +3793,67 @@ bool one_burned = FALSE; job->chapter_markers = 0; } - if( job->vcodec == HB_VCODEC_X264 ) + if (job->vcodec == HB_VCODEC_X264) { - if ([[queueToApply objectForKey:@"Mp4iPodCompatible"] intValue] == 1) - { - job->ipod_atom = 1; - } + /* iPod 5G atom */ + job->ipod_atom = ([[queueToApply objectForKey:@"Mp4iPodCompatible"] + intValue] == 1); + + /* set fastfirstpass if 2-pass and Turbo are enabled */ + if ([[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1) + { + job->fastfirstpass = ([[queueToApply objectForKey:@"VideoTurboTwoPass"] + intValue] == 1); + } + + /* advanced x264 options */ + NSString *tmpString; + // translate zero-length strings to NULL for libhb + const char *x264_preset = NULL; + const char *x264_tune = NULL; + const char *advanced_opts = NULL; + const char *h264_profile = NULL; + const char *h264_level = NULL; + if ([[queueToApply objectForKey:@"x264UseAdvancedOptions"] intValue]) + { + // we are using the advanced panel + if ([(tmpString = [queueToApply objectForKey:@"x264Option"]) length]) + { + advanced_opts = [tmpString UTF8String]; + } + } else { - job->ipod_atom = 0; + // we are using the x264 system + x264_preset = [[queueToApply objectForKey:@"x264Preset"] UTF8String]; + if ([(tmpString = [queueToApply objectForKey:@"x264Tune"]) length]) + { + x264_tune = [tmpString UTF8String]; + } + if ([(tmpString = [queueToApply objectForKey:@"x264OptionExtra"]) length]) + { + advanced_opts = [tmpString UTF8String]; + } + if ([(tmpString = [queueToApply objectForKey:@"h264Profile"]) length]) + { + h264_profile = [tmpString UTF8String]; + } + if ([(tmpString = [queueToApply objectForKey:@"h264Level"]) length]) + { + h264_level = [tmpString UTF8String]; + } } - - - /* Below Sends x264 options to the core library if x264 is selected */ - /* Lets use this as per Nyx, Thanks Nyx! */ - /* Turbo first pass if two pass and Turbo First pass is selected */ - if( [[queueToApply objectForKey:@"VideoTwoPass"] intValue] == 1 && [[queueToApply objectForKey:@"VideoTurboTwoPass"] intValue] == 1 ) - { - job->fastfirstpass = 1; - } - else - { - job->fastfirstpass = 0; - } - hb_job_set_advanced_opts( job, [[queueToApply objectForKey:@"x264Option"] UTF8String] ); + hb_job_set_x264_preset (job, x264_preset); + hb_job_set_x264_tune (job, x264_tune); + hb_job_set_advanced_opts(job, advanced_opts); + hb_job_set_x264_profile (job, h264_profile); + hb_job_set_x264_level (job, h264_level); } - else if( job->vcodec & HB_VCODEC_FFMPEG_MASK ) + else if (job->vcodec & HB_VCODEC_FFMPEG_MASK) { - if ([queueToApply objectForKey:@"lavcOption"]) - { - hb_job_set_advanced_opts( job, [[queueToApply objectForKey:@"lavcOption"] UTF8String] ); - } + hb_job_set_advanced_opts(job, + [[queueToApply objectForKey:@"lavcOption"] + UTF8String]); } @@ -4905,15 +5030,20 @@ the user is using "Custom" settings by determining the sender*/ int videoEncoder = [[fVidEncoderPopUp selectedItem] tag]; [fAdvancedOptions setHidden:YES]; - /* If we are using x264 then show the x264 advanced panel */ + /* If we are using x264 then show the x264 advanced panel and the x264 presets box */ if (videoEncoder == HB_VCODEC_X264) { [fAdvancedOptions setHidden:NO]; + + // show the x264 presets box + [fX264PresetsBox setHidden:NO]; + [self autoSetM4vExtension: sender]; } else // we are FFmpeg (lavc) or Theora { [fAdvancedOptions setHidden:YES]; + [fX264PresetsBox setHidden:YES]; // We Are Lavc if ([[fVidEncoderPopUp selectedItem] tag] & HB_VCODEC_FFMPEG_MASK) @@ -4922,7 +5052,7 @@ the user is using "Custom" settings by determining the sender*/ } else /// We are Theora { - [fAdvancedOptions setLavcOptsEnabled:NO]; + [fAdvancedOptions setLavcOptsEnabled:NO]; } } @@ -5085,6 +5215,7 @@ the user is using "Custom" settings by determining the sender*/ - (IBAction) qualitySliderChanged: (id) sender { + /* Our constant quality slider is in a range based * on each encoders qp/rf values. The range depends * on the encoder. Also, the range is inverse of quality @@ -5118,6 +5249,7 @@ the user is using "Custom" settings by determining the sender*/ [self customSettingUsed: sender]; } + - (void) controlTextDidChange: (NSNotification *) notification { [self calculateBitrate:nil]; @@ -5152,6 +5284,342 @@ the user is using "Custom" settings by determining the sender*/ } #pragma mark - +#pragma mark - Video x264 Presets + +- (IBAction) setupX264PresetsWidgets: (id) sender +{ + NSUInteger i; + /* + * now we populate the x264 system widgets via hb_x264_presets(), + * hb_x264_tunes(), hb_x264_profiles(), hb_h264_levels() + */ + + // store x264 preset names + const char * const * x264_presets = hb_x264_presets(); + NSMutableArray *tmp_array = [[NSMutableArray alloc] init]; + for (i = 0; x264_presets[i] != NULL; i++) + { + [tmp_array addObject:[NSString stringWithUTF8String:x264_presets[i]]]; + if (!strcasecmp(x264_presets[i], "medium")) + { + fX264MediumPresetIndex = i; + } + } + fX264PresetNames = [[NSArray alloc] initWithArray:tmp_array]; + [tmp_array release]; + // setup the x264 preset slider + [fX264PresetsSlider setMinValue:0]; + [fX264PresetsSlider setMaxValue:[fX264PresetNames count]-1]; + [fX264PresetsSlider setNumberOfTickMarks:[fX264PresetNames count]]; + [fX264PresetsSlider setIntegerValue:fX264MediumPresetIndex]; + [fX264PresetsSlider setTickMarkPosition:NSTickMarkAbove]; + [fX264PresetsSlider setAllowsTickMarkValuesOnly:YES]; + [self x264PresetsSliderChanged: sender]; + // setup the x264 tune popup + [fX264TunePopUp removeAllItems]; + [fX264TunePopUp addItemWithTitle: @"none"]; + const char * const * x264_tunes = hb_x264_tunes(); + for (int i = 0; x264_tunes[i] != NULL; i++) + { + // we filter out "fastdecode" as we have a dedicated checkbox for it + if (strcasecmp(x264_tunes[i], "fastdecode")) + { + [fX264TunePopUp addItemWithTitle: [NSString stringWithUTF8String:x264_tunes[i]]]; + } + } + // the fastdecode checkbox is off by default + [fX264FastDecodeCheck setState: NSOffState]; + // setup the h264 profile popup + [fX264ProfilePopUp removeAllItems]; + [fX264ProfilePopUp addItemWithTitle: @"auto"]; + const char * const * x264_profiles = hb_x264_profiles(); + for (int i = 0; x264_profiles[i] != NULL; i++) + { + [fX264ProfilePopUp addItemWithTitle: [NSString stringWithUTF8String:x264_profiles[i]]]; + } + // setup the h264 level popup + [fX264LevelPopUp removeAllItems]; + [fX264LevelPopUp addItemWithTitle: @"auto"]; + const char * const * h264_levels = hb_h264_levels(); + for (int i = 0; h264_levels[i] != NULL; i++) + { + [fX264LevelPopUp addItemWithTitle: [NSString stringWithUTF8String:h264_levels[i]]]; + } + // clear the additional x264 options + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""]; +} + +- (void) enableX264Widgets: (bool) enable +{ + NSControl * controls[] = + { + fX264PresetsSlider, fX264PresetSliderLabel, fX264PresetSelectedTextField, + fX264TunePopUp, fX264TunePopUpLabel, fX264FastDecodeCheck, + fDisplayX264PresetsAdditonalOptionsTextField, fDisplayX264PresetsAdditonalOptionsLabel, + fX264ProfilePopUp, fX264ProfilePopUpLabel, + fX264LevelPopUp, fX264LevelPopUpLabel, + fDisplayX264PresetsUnparseTextField, + }; + // check whether we're using the x264 system + bool x264_system = ([fx264UseAdvancedOptionsCheck state] == NSOffState); + // enable or disable the "Use x264 Advanced Options Panel" checkbox + [fx264UseAdvancedOptionsCheck setEnabled: enable]; + // enable or disable the x264 system widgets + for (unsigned i = 0; i < (sizeof(controls) / sizeof(NSControl*)); i++) + { + if ([[controls[i] className] isEqualToString: @"NSTextField"]) + { + NSTextField *tf = (NSTextField*)controls[i]; + if (![tf isBezeled]) + { + [tf setTextColor: (x264_system ? + [NSColor controlTextColor] : + [NSColor disabledControlTextColor])]; + continue; + } + } + [controls[i] setEnabled: (enable && x264_system)]; + } + + if (x264_system) + { + // using x264 system, always disable advanced panel + [fAdvancedOptions enableUI:NO]; + // don't reset x264 system widgets as they may have been set explicitly + } + else + { + // using advanced panel, enable if applicable + [fAdvancedOptions enableUI:enable]; + // reset x264 system widgets + [fX264PresetsSlider setIntegerValue: fX264MediumPresetIndex]; + [fX264TunePopUp selectItemAtIndex:0]; + [fX264FastDecodeCheck setState:NSOffState]; + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""]; + [fX264ProfilePopUp selectItemAtIndex:0]; + [fX264LevelPopUp selectItemAtIndex:0]; + } + [self x264PresetsSliderChanged:nil]; +} + +- (IBAction) updateX264Widgets: (id) sender +{ + [self enableX264Widgets: YES]; +} + +#pragma mark - +#pragma mark x264 system + +- (NSString*) x264Preset +{ + return (NSString*)[fX264PresetNames objectAtIndex:[fX264PresetsSlider intValue]]; +} + +- (NSString*) x264Tune +{ + NSString *x264Tune = @""; + if ([fX264TunePopUp indexOfSelectedItem]) + { + x264Tune = [x264Tune stringByAppendingString: + [fX264TunePopUp titleOfSelectedItem]]; + } + if ([fX264FastDecodeCheck state]) + { + if ([x264Tune length]) + { + x264Tune = [x264Tune stringByAppendingString: @","]; + } + x264Tune = [x264Tune stringByAppendingString: @"fastdecode"]; + } + return x264Tune; +} + +- (NSString*) x264OptionExtra +{ + return [fDisplayX264PresetsAdditonalOptionsTextField stringValue]; +} + +- (NSString*) h264Profile +{ + if ([fX264ProfilePopUp indexOfSelectedItem]) + { + return [fX264ProfilePopUp titleOfSelectedItem]; + } + return @""; +} + +- (NSString*) h264Level +{ + if ([fX264LevelPopUp indexOfSelectedItem]) + { + return [fX264LevelPopUp titleOfSelectedItem]; + } + return @""; +} + +- (void) setX264Preset: (NSString*)x264Preset +{ + if (x264Preset) + { + NSString *name; + NSEnumerator *enumerator = [fX264PresetNames objectEnumerator]; + while ((name = (NSString *)[enumerator nextObject])) + { + if ([name isEqualToString:x264Preset]) + { + [fX264PresetsSlider setIntegerValue: + [fX264PresetNames indexOfObject:name]]; + return; + } + } + } + [fX264PresetsSlider setIntegerValue:fX264MediumPresetIndex]; +} + +- (void) setX264Tune: (NSString*)x264Tune +{ + if (!x264Tune) + { + [fX264TunePopUp selectItemAtIndex:0]; + [fX264FastDecodeCheck setState:NSOffState]; + return; + } + // handle fastdecode + if ([x264Tune rangeOfString:@"fastdecode"].location != NSNotFound) + { + [fX264FastDecodeCheck setState:NSOnState]; + } + else + { + [fX264FastDecodeCheck setState:NSOffState]; + } + // filter out fastdecode + x264Tune = [x264Tune stringByReplacingOccurrencesOfString:@"," + withString:@""]; + x264Tune = [x264Tune stringByReplacingOccurrencesOfString:@"fastdecode" + withString:@""]; + // set the tune + [fX264TunePopUp selectItemWithTitle:x264Tune]; + // fallback + if ([fX264TunePopUp indexOfSelectedItem] == -1) + { + [fX264TunePopUp selectItemAtIndex:0]; + } +} + +- (void) setX264OptionExtra: (NSString*)x264OptionExtra +{ + if (!x264OptionExtra) + { + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:@""]; + return; + } + [fDisplayX264PresetsAdditonalOptionsTextField setStringValue:x264OptionExtra]; +} + +- (void) setH264Profile: (NSString*)h264Profile +{ + if (!h264Profile) + { + [fX264ProfilePopUp selectItemAtIndex:0]; + return; + } + // set the profile + [fX264ProfilePopUp selectItemWithTitle:h264Profile]; + // fallback + if ([fX264ProfilePopUp indexOfSelectedItem] == -1) + { + [fX264ProfilePopUp selectItemAtIndex:0]; + } +} + +- (void) setH264Level: (NSString*)h264Level +{ + if (!h264Level) + { + [fX264LevelPopUp selectItemAtIndex:0]; + return; + } + // set the level + [fX264LevelPopUp selectItemWithTitle:h264Level]; + // fallback + if ([fX264LevelPopUp indexOfSelectedItem] == -1) + { + [fX264LevelPopUp selectItemAtIndex:0]; + } +} + + +- (IBAction) x264PresetsSliderChanged: (id) sender +{ + // we assume the preset names and slider were setup properly + [fX264PresetSelectedTextField setStringValue: [self x264Preset]]; + [self x264PresetsChangedDisplayExpandedOptions:nil]; + +} + +/* This is called everytime a x264 widget in the video tab is changed to + display the expanded options in a text field via outlet fDisplayX264PresetsUnparseTextField + */ +- (IBAction) x264PresetsChangedDisplayExpandedOptions: (id) sender + +{ + /* API reference: + * + * char * hb_x264_param_unparse(const char *x264_preset, + * const char *x264_tune, + * const char *x264_encopts, + * const char *x264_profile, + * const char *h264_level, + * int width, int height); + */ + NSString *tmpString; + const char *x264_preset = [[self x264Preset] UTF8String]; + const char *x264_tune = NULL; + const char *advanced_opts = NULL; + const char *h264_profile = NULL; + const char *h264_level = NULL; + int unparse_width, unparse_height; + // prepare the tune, advanced options, profile and level + if ([(tmpString = [self x264Tune]) length]) + { + x264_tune = [tmpString UTF8String]; + } + if ([(tmpString = [self x264OptionExtra]) length]) + { + advanced_opts = [tmpString UTF8String]; + } + if ([(tmpString = [self h264Profile]) length]) + { + h264_profile = [tmpString UTF8String]; + } + if ([(tmpString = [self h264Level]) length]) + { + h264_level = [tmpString UTF8String]; + } + // prepare the width and height (FIXME) + unparse_width = 1280; + unparse_height = 720; + // if the previous unparsed string is non-NULL, free it + if (fX264PresetsUnparsedUTF8String != NULL) + { + free(fX264PresetsUnparsedUTF8String); + } + // now, unparse + fX264PresetsUnparsedUTF8String = hb_x264_param_unparse(x264_preset, + x264_tune, + advanced_opts, + h264_profile, + h264_level, + unparse_width, + unparse_height); + // update the text field + [fDisplayX264PresetsUnparseTextField setStringValue: + [NSString stringWithFormat:@"x264 Unparse: %s", + fX264PresetsUnparsedUTF8String]]; +} + +#pragma mark - #pragma mark - Picture /* lets set the picture size back to the max from right after title scan @@ -5818,15 +6286,47 @@ return YES; /* Video encoder */ [fVidEncoderPopUp selectItemWithTitle:[chosenPreset objectForKey:@"VideoEncoder"]]; [self videoEncoderPopUpChanged:nil]; - /* We set the advanced opt string here if applicable*/ - if ([chosenPreset objectForKey:@"x264Option"]) - { - [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]]; - } - else + + if ([[chosenPreset objectForKey:@"VideoEncoder"] isEqualToString:@"H.264 (x264)"]) { - [fAdvancedOptions setOptions:@""]; + if (![chosenPreset objectForKey:@"x264UseAdvancedOptions"] || + [[chosenPreset objectForKey:@"x264UseAdvancedOptions"] intValue]) + { + /* + * x264UseAdvancedOptions is not set (legacy preset) + * or set to 1 (enabled), so we use the old advanced panel + */ + if ([chosenPreset objectForKey:@"x264Option"]) + { + /* we set the advanced opt string here if applicable */ + [fAdvancedOptions setOptions: + [chosenPreset objectForKey:@"x264Option"]]; + } + else + { + [fAdvancedOptions setOptions:@""]; + } + /* we enable the advanced panel and update the widgets */ + [fx264UseAdvancedOptionsCheck setState: NSOnState]; + [self updateX264Widgets:nil]; + } + else + { + /* + * x264UseAdvancedOptions is set to 0 (disabled), + * so we use the x264 system + */ + [self setX264Preset: [chosenPreset objectForKey:@"x264Preset"]]; + [self setX264Tune: [chosenPreset objectForKey:@"x264Tune"]]; + [self setX264OptionExtra: [chosenPreset objectForKey:@"x264OptionExtra"]]; + [self setH264Profile: [chosenPreset objectForKey:@"h264Profile"]]; + [self setH264Level: [chosenPreset objectForKey:@"h264Level"]]; + /* we disable the advanced panel and update the widgets */ + [fx264UseAdvancedOptionsCheck setState: NSOffState]; + [self updateX264Widgets:nil]; + } } + if ([chosenPreset objectForKey:@"lavcOption"]) { [fAdvancedOptions setLavcOptions:[chosenPreset objectForKey:@"lavcOption"]]; @@ -6425,8 +6925,31 @@ return YES; /* Codecs */ /* Video encoder */ [preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"]; - /* x264 Option String */ - [preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + /* x264 Options, this will either be advanced panel or the video tabs x264 presets panel with modded option string */ + + if ([fx264UseAdvancedOptionsCheck state] == NSOnState) + { + /* use the old advanced panel */ + [preset setObject:[NSNumber numberWithInt:1] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"]; + } + else + { + /* use the x264 system */ + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:[self x264Preset] forKey:@"x264Preset"]; + [preset setObject:[self x264Tune] forKey:@"x264Tune"]; + [preset setObject:[self x264OptionExtra] forKey:@"x264OptionExtra"]; + [preset setObject:[self h264Profile] forKey:@"h264Profile"]; + [preset setObject:[self h264Level] forKey:@"h264Level"]; + /* + * bonus: set the unparsed options to make the preset compatible + * with old HB versions + */ + [preset setObject:[NSString stringWithUTF8String:fX264PresetsUnparsedUTF8String] + forKey:@"x264Option"]; + } + /* FFmpeg (lavc) Option String */ [preset setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"]; diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib index 7ab1be7d3..e4b943f72 100644 --- a/macosx/English.lproj/MainMenu.xib +++ b/macosx/English.lproj/MainMenu.xib @@ -2,10 +2,10 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">11C74</string> + <string key="IBDocument.SystemVersion">11G63</string> <string key="IBDocument.InterfaceBuilderVersion">1938</string> - <string key="IBDocument.AppKitVersion">1138.23</string> - <string key="IBDocument.HIToolboxVersion">567.00</string> + <string key="IBDocument.AppKitVersion">1138.51</string> + <string key="IBDocument.HIToolboxVersion">569.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="NS.object.0">1938</string> @@ -127,6 +127,7 @@ <string key="NSFrame">{{18, -26}, {930, 20}}</string> <reference key="NSSuperview" ref="168918359"/> <reference key="NSWindow"/> + <reference key="NSNextKeyView"/> <int key="NSpiFlags">16396</int> <double key="NSMaxValue">100</double> </object> @@ -136,20 +137,23 @@ <string key="NSFrame">{{13, 28}, {940, 343}}</string> <reference key="NSSuperview" ref="168918359"/> <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1053078401"/> <object class="NSMutableArray" key="NSTabViewItems"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTabViewItem" id="107038816"> <string key="NSIdentifier">1</string> <object class="NSView" key="NSView" id="1053078401"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder" ref="712502892"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTextField" id="521019277"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 205}, {94, 19}}</string> + <string key="NSFrame">{{14, 247}, {94, 19}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="888819828"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="200565868"> <int key="NSCellFlags">67239424</int> @@ -164,8 +168,10 @@ <object class="NSTextField" id="783405221"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{170, 166}, {84, 19}}</string> + <string key="NSFrame">{{170, 209}, {84, 19}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1000247853"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="351953267"> <int key="NSCellFlags">-1804468671</int> @@ -194,8 +200,10 @@ <object class="NSSlider" id="239657287"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{281, 186}, {622, 16}}</string> + <string key="NSFrame">{{281, 229}, {622, 16}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="783405221"/> <bool key="NSEnabled">YES</bool> <object class="NSSliderCell" key="NSCell" id="160453387"> <int key="NSCellFlags">67501824</int> @@ -222,8 +230,10 @@ <object class="NSTextField" id="987137669"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 63}, {892, 14}}</string> + <string key="NSFrame">{{14, 30}, {892, 14}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="690364175"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="537000521"> <int key="NSCellFlags">67239424</int> @@ -238,8 +248,10 @@ <object class="NSTextField" id="690304958"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{192, 188}, {65, 14}}</string> + <string key="NSFrame">{{192, 231}, {65, 14}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="239657287"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="923732752"> <int key="NSCellFlags">67239424</int> @@ -321,8 +333,10 @@ <object class="NSTextField" id="323705695"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{167, 188}, {28, 14}}</string> + <string key="NSFrame">{{167, 231}, {28, 14}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="690304958"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="936221726"> <int key="NSCellFlags">67239424</int> @@ -337,8 +351,10 @@ <object class="NSTextField" id="690364175"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 45}, {892, 14}}</string> + <string key="NSFrame">{{14, 15}, {892, 14}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="503933842"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="508148739"> <int key="NSCellFlags">67239424</int> @@ -353,8 +369,10 @@ <object class="NSTextField" id="503933842"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 17}, {892, 14}}</string> + <string key="NSFrame">{{14, 2}, {892, 14}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="794651271"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="109092334"> <int key="NSCellFlags">67239424</int> @@ -369,8 +387,10 @@ <object class="NSPopUpButton" id="222980245"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{372, 254}, {158, 22}}</string> + <string key="NSFrame">{{372, 272}, {158, 22}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="521019277"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="343952154"> <int key="NSCellFlags">-2076049856</int> @@ -423,8 +443,10 @@ <object class="NSButton" id="1000247853"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{279, 166}, {124, 18}}</string> + <string key="NSFrame">{{279, 209}, {124, 18}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="447003158"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="860863090"> <int key="NSCellFlags">67239424</int> @@ -446,8 +468,10 @@ <object class="NSButton" id="447003158"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{416, 167}, {107, 16}}</string> + <string key="NSFrame">{{416, 210}, {107, 16}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="954159030"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1070893195"> <int key="NSCellFlags">67239424</int> @@ -471,8 +495,10 @@ <object class="NSPopUpButton" id="12330413"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{98, 254}, {149, 22}}</string> + <string key="NSFrame">{{98, 272}, {149, 22}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="463960465"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="1018849574"> <int key="NSCellFlags">-2076049856</int> @@ -519,8 +545,10 @@ <object class="NSTextField" id="463960465"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{278, 256}, {92, 17}}</string> + <string key="NSFrame">{{278, 274}, {92, 17}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="222980245"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="509250281"> <int key="NSCellFlags">67239424</int> @@ -535,8 +563,10 @@ <object class="NSTextField" id="1064150725"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 256}, {79, 17}}</string> + <string key="NSFrame">{{14, 274}, {79, 17}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="12330413"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="451922400"> <int key="NSCellFlags">67239424</int> @@ -551,8 +581,10 @@ <object class="NSMatrix" id="1036976683"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 166}, {145, 38}}</string> + <string key="NSFrame">{{17, 209}, {145, 38}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="323705695"/> <bool key="NSEnabled">YES</bool> <int key="NSNumRows">2</int> <int key="NSNumCols">1</int> @@ -752,8 +784,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMatrix" id="888819828"> <reference key="NSNextResponder" ref="1053078401"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{540, 237}, {157, 38}}</string> + <string key="NSFrame">{{540, 255}, {157, 38}}</string> <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1036976683"/> <bool key="NSEnabled">YES</bool> <int key="NSNumRows">2</int> <int key="NSNumCols">1</int> @@ -941,8 +975,487 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSCellBackgroundColor" ref="809784795"/> <reference key="NSFont" ref="273283760"/> </object> + <object class="NSBox" id="954159030"> + <reference key="NSNextResponder" ref="1053078401"/> + <int key="NSvFlags">12</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSView" id="443817184"> + <reference key="NSNextResponder" ref="954159030"/> + <int key="NSvFlags">274</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSSlider" id="480823072"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{212, 105}, {660, 16}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1031662534"/> + <string key="NSReuseIdentifierKey">_NS:779</string> + <bool key="NSEnabled">YES</bool> + <object class="NSSliderCell" key="NSCell" id="690637620"> + <int key="NSCellFlags">-2079981824</int> + <int key="NSCellFlags2">262144</int> + <string key="NSContents"/> + <string key="NSCellIdentifier">_NS:779</string> + <reference key="NSControlView" ref="480823072"/> + <double key="NSMaxValue">5</double> + <double key="NSMinValue">0.0</double> + <double key="NSValue">0.0</double> + <double key="NSAltIncValue">0.0</double> + <int key="NSNumberOfTickMarks">2</int> + <int key="NSTickMarkPosition">1</int> + <bool key="NSAllowsTickMarkValuesOnly">YES</bool> + <bool key="NSVertical">NO</bool> + </object> + </object> + <object class="NSTextField" id="139432403"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{15, 107}, {79, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="527737261"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="367754591"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">x264 Preset:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="139432403"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSTextField" id="1031662534"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{15, 86}, {79, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="610425389"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="444043003"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">x264 Tune:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="1031662534"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSTextField" id="102651997"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{15, 65}, {79, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="112458239"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="858212432"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">x264 Profile:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="102651997"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSTextField" id="8023338"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{15, 43}, {79, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="144142005"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="248169798"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">x264 Level:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="8023338"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSPopUpButton" id="610425389"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{98, 84}, {126, 15}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="884471415"/> + <string key="NSReuseIdentifierKey">_NS:868</string> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="1050851477"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">264192</int> + <reference key="NSSupport" ref="22"/> + <string key="NSCellIdentifier">_NS:868</string> + <reference key="NSControlView" ref="610425389"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="791223578"> + <reference key="NSMenu" ref="353982019"/> + <string key="NSTitle">Item 1</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1050851477"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="353982019"> + <string key="NSTitle">OtherViews</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="791223578"/> + <object class="NSMenuItem" id="645526467"> + <reference key="NSMenu" ref="353982019"/> + <string key="NSTitle">Item 2</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1050851477"/> + </object> + <object class="NSMenuItem" id="1035566125"> + <reference key="NSMenu" ref="353982019"/> + <string key="NSTitle">Item 3</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1050851477"/> + </object> + </object> + <reference key="NSMenuFont" ref="273283760"/> + </object> + <int key="NSPreferredEdge">3</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">1</int> + </object> + </object> + <object class="NSPopUpButton" id="112458239"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{98, 63}, {126, 15}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="796460997"/> + <string key="NSReuseIdentifierKey">_NS:868</string> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="1012707648"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">264192</int> + <reference key="NSSupport" ref="22"/> + <string key="NSCellIdentifier">_NS:868</string> + <reference key="NSControlView" ref="112458239"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="56675133"> + <reference key="NSMenu" ref="349551230"/> + <string key="NSTitle">Item 1</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1012707648"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="349551230"> + <string key="NSTitle">OtherViews</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="56675133"/> + <object class="NSMenuItem" id="603447176"> + <reference key="NSMenu" ref="349551230"/> + <string key="NSTitle">Item 2</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1012707648"/> + </object> + <object class="NSMenuItem" id="691985983"> + <reference key="NSMenu" ref="349551230"/> + <string key="NSTitle">Item 3</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="1012707648"/> + </object> + </object> + <reference key="NSMenuFont" ref="273283760"/> + </object> + <int key="NSPreferredEdge">3</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">1</int> + </object> + </object> + <object class="NSPopUpButton" id="144142005"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{98, 41}, {126, 15}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="487526549"/> + <string key="NSReuseIdentifierKey">_NS:868</string> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="379682863"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">264192</int> + <reference key="NSSupport" ref="22"/> + <string key="NSCellIdentifier">_NS:868</string> + <reference key="NSControlView" ref="144142005"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="658841842"> + <reference key="NSMenu" ref="957749846"/> + <string key="NSTitle">Item 1</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="379682863"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="957749846"> + <string key="NSTitle">OtherViews</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="658841842"/> + <object class="NSMenuItem" id="442645374"> + <reference key="NSMenu" ref="957749846"/> + <string key="NSTitle">Item 2</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="379682863"/> + </object> + <object class="NSMenuItem" id="831415388"> + <reference key="NSMenu" ref="957749846"/> + <string key="NSTitle">Item 3</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="447995298"/> + <reference key="NSMixedImage" ref="760317610"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="379682863"/> + </object> + </object> + <reference key="NSMenuFont" ref="273283760"/> + </object> + <int key="NSPreferredEdge">3</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">1</int> + </object> + </object> + <object class="NSButton" id="884471415"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{240, 84}, {108, 18}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="102651997"/> + <string key="NSReuseIdentifierKey">_NS:771</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="140128742"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Fast Decode</string> + <reference key="NSSupport" ref="26"/> + <string key="NSCellIdentifier">_NS:771</string> + <reference key="NSControlView" ref="884471415"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="887198214"/> + <reference key="NSAlternateImage" ref="624832340"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="796460997"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{240, 65}, {110, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="8023338"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="934066385"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">71303168</int> + <string key="NSContents">Additional Options:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="796460997"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSTextField" id="487526549"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{355, 43}, {517, 36}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="349581420"/> + <string key="NSReuseIdentifierKey">_NS:354</string> + <string key="NSAntiCompressionPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="284269747"> + <int key="NSCellFlags">-1805517311</int> + <int key="NSCellFlags2">272760832</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <string key="NSCellIdentifier">_NS:354</string> + <reference key="NSControlView" ref="487526549"/> + <bool key="NSDrawsBackground">YES</bool> + <reference key="NSBackgroundColor" ref="138233214"/> + <reference key="NSTextColor" ref="378140636"/> + </object> + </object> + <object class="NSTextField" id="527737261"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{96, 107}, {95, 13}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="480823072"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="513519725"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">138412032</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="527737261"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + <object class="NSButton" id="902460295"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{20, 127}, {209, 18}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="139432403"/> + <string key="NSReuseIdentifierKey">_NS:771</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="191360965"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Use x264 Advanced Options Panel</string> + <reference key="NSSupport" ref="26"/> + <string key="NSCellIdentifier">_NS:771</string> + <reference key="NSControlView" ref="902460295"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="887198214"/> + <reference key="NSAlternateImage" ref="624832340"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSTextField" id="349581420"> + <reference key="NSNextResponder" ref="443817184"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{22, 6}, {853, 29}}</string> + <reference key="NSSuperview" ref="443817184"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="987137669"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="812860538"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">x264 Unparse:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="349581420"/> + <reference key="NSBackgroundColor" ref="242973447"/> + <reference key="NSTextColor" ref="701609070"/> + </object> + </object> + </object> + <string key="NSFrame">{{1, 1}, {890, 155}}</string> + <reference key="NSSuperview" ref="954159030"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="902460295"/> + <string key="NSReuseIdentifierKey">_NS:21</string> + </object> + </object> + <string key="NSFrame">{{14, 46}, {892, 157}}</string> + <reference key="NSSuperview" ref="1053078401"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="443817184"/> + <string key="NSReuseIdentifierKey">_NS:18</string> + <string key="NSOffsets">{0, 0}</string> + <object class="NSTextFieldCell" key="NSTitleCell"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">x264 Presets</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="138233214"/> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes> + </object> + </object> + <reference key="NSContentView" ref="443817184"/> + <int key="NSBorderType">1</int> + <int key="NSBoxType">0</int> + <int key="NSTitlePosition">0</int> + <bool key="NSTransparent">NO</bool> + </object> </object> <string key="NSFrame">{{10, 25}, {920, 305}}</string> + <reference key="NSSuperview" ref="712502892"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1064150725"/> </object> <string key="NSLabel">Video</string> <reference key="NSColor" ref="242973447"/> @@ -951,7 +1464,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTabViewItem" id="157300012"> <string key="NSIdentifier">2</string> <object class="NSView" key="NSView" id="738554558"> - <reference key="NSNextResponder" ref="712502892"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -975,7 +1488,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">256</int> <string key="NSFrameSize">{884, 236}</string> <reference key="NSSuperview" ref="528259747"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="496546489"/> <bool key="NSEnabled">YES</bool> <object class="NSTableHeaderView" key="NSHeaderView" id="146611085"> @@ -983,7 +1495,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">256</int> <string key="NSFrameSize">{884, 17}</string> <reference key="NSSuperview" ref="230332532"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="528259747"/> <reference key="NSTableView" ref="792464451"/> </object> @@ -992,7 +1503,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-26, 0}, {16, 17}}</string> <reference key="NSSuperview" ref="933946879"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="230332532"/> </object> <object class="NSMutableArray" key="NSTableColumns"> @@ -1439,7 +1949,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{1, 17}, {884, 236}}</string> <reference key="NSSuperview" ref="933946879"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="792464451"/> <reference key="NSDocView" ref="792464451"/> <reference key="NSBGColor" ref="355843302"/> @@ -1450,7 +1959,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {15, 206}}</string> <reference key="NSSuperview" ref="933946879"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="821562152"/> <reference key="NSTarget" ref="933946879"/> <string key="NSAction">_doScroller:</string> @@ -1462,7 +1970,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {685, 15}}</string> <reference key="NSSuperview" ref="933946879"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="727606062"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="933946879"/> @@ -1478,7 +1985,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{1, 0}, {884, 17}}</string> <reference key="NSSuperview" ref="933946879"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="146611085"/> <reference key="NSDocView" ref="146611085"/> <reference key="NSBGColor" ref="355843302"/> @@ -1488,14 +1994,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{17, 17}, {886, 254}}</string> <reference key="NSSuperview" ref="577274772"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="528259747"/> <int key="NSsFlags">133650</int> <reference key="NSVScroller" ref="496546489"/> <reference key="NSHScroller" ref="821562152"/> <reference key="NSContentView" ref="528259747"/> <reference key="NSHeaderClipView" ref="230332532"/> - <reference key="NSCornerView" ref="727606062"/> <bytes key="NSScrollAmts">QSAAAEEgAABB2AAAQdgAAA</bytes> </object> <object class="NSButton" id="883603583"> @@ -1503,7 +2007,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{16, 282}, {116, 16}}</string> <reference key="NSSuperview" ref="577274772"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="334448622"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="327570663"> @@ -1535,7 +2038,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{85, 8}, {41, 18}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="354328979"/> <string key="NSReuseIdentifierKey">_NS:771</string> <bool key="NSEnabled">YES</bool> @@ -1561,7 +2063,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{130, 8}, {47, 18}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="453548414"/> <string key="NSReuseIdentifierKey">_NS:771</string> <bool key="NSEnabled">YES</bool> @@ -1587,7 +2088,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{179, 8}, {47, 18}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="485809563"/> <string key="NSReuseIdentifierKey">_NS:771</string> <bool key="NSEnabled">YES</bool> @@ -1613,7 +2113,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{226, 8}, {48, 18}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1024961404"/> <string key="NSReuseIdentifierKey">_NS:771</string> <bool key="NSEnabled">YES</bool> @@ -1639,7 +2138,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{271, 8}, {58, 18}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="431725280"/> <string key="NSReuseIdentifierKey">_NS:771</string> <bool key="NSEnabled">YES</bool> @@ -1665,7 +2163,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{442, 8}, {100, 15}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="933946879"/> <string key="NSReuseIdentifierKey">_NS:868</string> <bool key="NSEnabled">YES</bool> @@ -1735,7 +2232,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">264</int> <string key="NSFrame">{{2, -7}, {78, 28}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="162512199"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="935575109"> @@ -1753,7 +2249,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">264</int> <string key="NSFrame">{{354, 7}, {86, 14}}</string> <reference key="NSSuperview" ref="754802956"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="586044455"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="121164790"> @@ -1769,14 +2264,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{1, 1}, {552, 29}}</string> <reference key="NSSuperview" ref="334448622"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1010907474"/> <string key="NSReuseIdentifierKey">_NS:21</string> </object> </object> <string key="NSFrame">{{349, 275}, {554, 31}}</string> <reference key="NSSuperview" ref="577274772"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="754802956"/> <string key="NSReuseIdentifierKey">_NS:18</string> <string key="NSOffsets">{0, 0}</string> @@ -1800,13 +2293,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{0, -3}, {920, 305}}</string> <reference key="NSSuperview" ref="738554558"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="883603583"/> </object> </object> <string key="NSFrame">{{10, 25}, {920, 305}}</string> - <reference key="NSSuperview" ref="712502892"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="577274772"/> </object> <string key="NSLabel">Audio</string> @@ -2258,6 +2748,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{7, 8}, {907, 290}}</string> <reference key="NSSuperview" ref="833271282"/> + <reference key="NSNextKeyView" ref="815869140"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -2278,6 +2769,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <string key="NSFrame">{{10, 25}, {920, 305}}</string> + <reference key="NSNextKeyView" ref="231506045"/> </object> <string key="NSLabel">Advanced</string> <reference key="NSColor" ref="242973447"/> @@ -2521,14 +3013,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSTabView" ref="712502892"/> </object> </object> - <reference key="NSSelectedTabViewItem" ref="157300012"/> + <reference key="NSSelectedTabViewItem" ref="107038816"/> <reference key="NSFont" ref="26"/> <int key="NSTvFlags">134217728</int> <bool key="NSAllowTruncatedLabels">YES</bool> <bool key="NSDrawsBackground">YES</bool> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="738554558"/> + <reference ref="1053078401"/> </object> </object> <object class="NSTextField" id="586321835"> @@ -6483,6 +6975,182 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> + <string key="label">fX264PresetsBox</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="954159030"/> + </object> + <int key="connectionID">5973</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264TunePopUp</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="610425389"/> + </object> + <int key="connectionID">5974</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264ProfilePopUp</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="112458239"/> + </object> + <int key="connectionID">5975</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264LevelPopUp</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="144142005"/> + </object> + <int key="connectionID">5976</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264FastDecodeCheck</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="884471415"/> + </object> + <int key="connectionID">5977</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fDisplayX264PresetsAdditonalOptionsTextField</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="487526549"/> + </object> + <int key="connectionID">5979</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264PresetsSlider</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="480823072"/> + </object> + <int key="connectionID">5980</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264PresetSelectedTextField</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="527737261"/> + </object> + <int key="connectionID">5983</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsSliderChanged:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="480823072"/> + </object> + <int key="connectionID">5984</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264PresetSliderLabel</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="139432403"/> + </object> + <int key="connectionID">5985</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264TunePopUpLabel</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="1031662534"/> + </object> + <int key="connectionID">5986</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264ProfilePopUpLabel</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="102651997"/> + </object> + <int key="connectionID">5987</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fX264LevelPopUpLabel</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="8023338"/> + </object> + <int key="connectionID">5988</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fDisplayX264PresetsAdditonalOptionsLabel</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="796460997"/> + </object> + <int key="connectionID">5989</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fx264UseAdvancedOptionsCheck</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="902460295"/> + </object> + <int key="connectionID">5994</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">updateX264Widgets:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="902460295"/> + </object> + <int key="connectionID">5995</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">fDisplayX264PresetsUnparseTextField</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="349581420"/> + </object> + <int key="connectionID">5998</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsChangedDisplayExpandedOptions:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="610425389"/> + </object> + <int key="connectionID">5999</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsChangedDisplayExpandedOptions:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="112458239"/> + </object> + <int key="connectionID">6000</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsChangedDisplayExpandedOptions:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="144142005"/> + </object> + <int key="connectionID">6001</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsChangedDisplayExpandedOptions:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="487526549"/> + </object> + <int key="connectionID">6002</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">x264PresetsChangedDisplayExpandedOptions:</string> + <reference key="source" ref="2258723"/> + <reference key="destination" ref="884471415"/> + </object> + <int key="connectionID">6003</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> <string key="label">parentWindow</string> <reference key="source" ref="972647787"/> <reference key="destination" ref="192660081"/> @@ -7214,9 +7882,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="987137669"/> - <reference ref="690364175"/> <reference ref="503933842"/> - <reference ref="222980245"/> <reference ref="783405221"/> <reference ref="690304958"/> <reference ref="323705695"/> @@ -7228,7 +7894,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="1036976683"/> <reference ref="521019277"/> <reference ref="1064150725"/> + <reference ref="222980245"/> + <reference ref="954159030"/> <reference ref="888819828"/> + <reference ref="690364175"/> </object> <reference key="parent" ref="107038816"/> </object> @@ -10088,6 +10757,314 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="object" ref="121164790"/> <reference key="parent" ref="431725280"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">5934</int> + <reference key="object" ref="954159030"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="480823072"/> + <reference ref="139432403"/> + <reference ref="1031662534"/> + <reference ref="102651997"/> + <reference ref="610425389"/> + <reference ref="8023338"/> + <reference ref="144142005"/> + <reference ref="112458239"/> + <reference ref="796460997"/> + <reference ref="487526549"/> + <reference ref="884471415"/> + <reference ref="527737261"/> + <reference ref="902460295"/> + <reference ref="349581420"/> + </object> + <reference key="parent" ref="1053078401"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5932</int> + <reference key="object" ref="480823072"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="690637620"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5933</int> + <reference key="object" ref="690637620"/> + <reference key="parent" ref="480823072"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5937</int> + <reference key="object" ref="139432403"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="367754591"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5938</int> + <reference key="object" ref="367754591"/> + <reference key="parent" ref="139432403"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5939</int> + <reference key="object" ref="1031662534"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="444043003"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5940</int> + <reference key="object" ref="444043003"/> + <reference key="parent" ref="1031662534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5941</int> + <reference key="object" ref="102651997"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="858212432"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5942</int> + <reference key="object" ref="858212432"/> + <reference key="parent" ref="102651997"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5943</int> + <reference key="object" ref="8023338"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="248169798"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5944</int> + <reference key="object" ref="248169798"/> + <reference key="parent" ref="8023338"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5945</int> + <reference key="object" ref="610425389"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1050851477"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5946</int> + <reference key="object" ref="1050851477"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="353982019"/> + </object> + <reference key="parent" ref="610425389"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5947</int> + <reference key="object" ref="353982019"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="791223578"/> + <reference ref="645526467"/> + <reference ref="1035566125"/> + </object> + <reference key="parent" ref="1050851477"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5948</int> + <reference key="object" ref="791223578"/> + <reference key="parent" ref="353982019"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5949</int> + <reference key="object" ref="645526467"/> + <reference key="parent" ref="353982019"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5950</int> + <reference key="object" ref="1035566125"/> + <reference key="parent" ref="353982019"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5951</int> + <reference key="object" ref="112458239"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1012707648"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5952</int> + <reference key="object" ref="1012707648"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="349551230"/> + </object> + <reference key="parent" ref="112458239"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5953</int> + <reference key="object" ref="349551230"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="691985983"/> + <reference ref="603447176"/> + <reference ref="56675133"/> + </object> + <reference key="parent" ref="1012707648"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5954</int> + <reference key="object" ref="691985983"/> + <reference key="parent" ref="349551230"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5955</int> + <reference key="object" ref="603447176"/> + <reference key="parent" ref="349551230"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5956</int> + <reference key="object" ref="56675133"/> + <reference key="parent" ref="349551230"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5957</int> + <reference key="object" ref="144142005"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="379682863"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5958</int> + <reference key="object" ref="379682863"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="957749846"/> + </object> + <reference key="parent" ref="144142005"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5959</int> + <reference key="object" ref="957749846"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="658841842"/> + <reference ref="442645374"/> + <reference ref="831415388"/> + </object> + <reference key="parent" ref="379682863"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5960</int> + <reference key="object" ref="658841842"/> + <reference key="parent" ref="957749846"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5961</int> + <reference key="object" ref="442645374"/> + <reference key="parent" ref="957749846"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5962</int> + <reference key="object" ref="831415388"/> + <reference key="parent" ref="957749846"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5963</int> + <reference key="object" ref="884471415"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="140128742"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5964</int> + <reference key="object" ref="140128742"/> + <reference key="parent" ref="884471415"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5967</int> + <reference key="object" ref="796460997"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="934066385"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5968</int> + <reference key="object" ref="934066385"/> + <reference key="parent" ref="796460997"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5971</int> + <reference key="object" ref="487526549"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="284269747"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5972</int> + <reference key="object" ref="284269747"/> + <reference key="parent" ref="487526549"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5981</int> + <reference key="object" ref="527737261"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="513519725"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5982</int> + <reference key="object" ref="513519725"/> + <reference key="parent" ref="527737261"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5992</int> + <reference key="object" ref="902460295"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="191360965"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5993</int> + <reference key="object" ref="191360965"/> + <reference key="parent" ref="902460295"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5996</int> + <reference key="object" ref="349581420"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="812860538"/> + </object> + <reference key="parent" ref="954159030"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5997</int> + <reference key="object" ref="812860538"/> + <reference key="parent" ref="349581420"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -10511,6 +11488,47 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>5922.IBPluginDependency</string> <string>5923.IBPluginDependency</string> <string>5924.IBPluginDependency</string> + <string>5932.IBPluginDependency</string> + <string>5933.IBPluginDependency</string> + <string>5934.IBPluginDependency</string> + <string>5937.IBPluginDependency</string> + <string>5938.IBPluginDependency</string> + <string>5939.IBPluginDependency</string> + <string>5940.IBPluginDependency</string> + <string>5941.IBPluginDependency</string> + <string>5942.IBPluginDependency</string> + <string>5943.IBPluginDependency</string> + <string>5944.IBPluginDependency</string> + <string>5945.IBPluginDependency</string> + <string>5946.IBPluginDependency</string> + <string>5947.IBPluginDependency</string> + <string>5948.IBPluginDependency</string> + <string>5949.IBPluginDependency</string> + <string>5950.IBPluginDependency</string> + <string>5951.IBPluginDependency</string> + <string>5952.IBPluginDependency</string> + <string>5953.IBPluginDependency</string> + <string>5954.IBPluginDependency</string> + <string>5955.IBPluginDependency</string> + <string>5956.IBPluginDependency</string> + <string>5957.IBPluginDependency</string> + <string>5958.IBPluginDependency</string> + <string>5959.IBPluginDependency</string> + <string>5960.IBPluginDependency</string> + <string>5961.IBPluginDependency</string> + <string>5962.IBPluginDependency</string> + <string>5963.IBPluginDependency</string> + <string>5964.IBPluginDependency</string> + <string>5967.IBPluginDependency</string> + <string>5968.IBPluginDependency</string> + <string>5971.IBPluginDependency</string> + <string>5972.IBPluginDependency</string> + <string>5981.IBPluginDependency</string> + <string>5982.IBPluginDependency</string> + <string>5992.IBPluginDependency</string> + <string>5993.IBPluginDependency</string> + <string>5996.IBPluginDependency</string> + <string>5997.IBPluginDependency</string> <string>970.IBPluginDependency</string> <string>971.IBPluginDependency</string> <string>973.IBPluginDependency</string> @@ -10965,6 +11983,47 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> @@ -10979,7 +12038,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="dict.values" ref="0"/> </object> <nil key="sourceID"/> - <int key="maxID">5931</int> + <int key="maxID">6003</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -11026,6 +12085,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>customSettingUsed:</string> <string>deleteFactoryPresets:</string> <string>deletePreset:</string> + <string>updateX264Widgets:</string> <string>encodeStartStopPopUpChanged:</string> <string>formatPopUpChanged:</string> <string>getDefaultPresets:</string> @@ -11039,6 +12099,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>selectDefaultPreset:</string> <string>selectPreset:</string> <string>setDefaultPreset:</string> + <string>setupX264PresetsWidgets:</string> <string>showAboutPanel:</string> <string>showAddPresetPanel:</string> <string>showDebugOutputPanel:</string> @@ -11055,6 +12116,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>videoEncoderPopUpChanged:</string> <string>videoFrameRateChanged:</string> <string>videoMatrixChanged:</string> + <string>x264PresetsChangedDisplayExpandedOptions:</string> + <string>x264PresetsSetJobVariables:</string> + <string>x264PresetsSliderChanged:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -11114,6 +12178,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="actionInfosByName"> @@ -11147,6 +12216,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>customSettingUsed:</string> <string>deleteFactoryPresets:</string> <string>deletePreset:</string> + <string>updateX264Widgets:</string> <string>encodeStartStopPopUpChanged:</string> <string>formatPopUpChanged:</string> <string>getDefaultPresets:</string> @@ -11160,6 +12230,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>selectDefaultPreset:</string> <string>selectPreset:</string> <string>setDefaultPreset:</string> + <string>setupX264PresetsWidgets:</string> <string>showAboutPanel:</string> <string>showAddPresetPanel:</string> <string>showDebugOutputPanel:</string> @@ -11176,6 +12247,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>videoEncoderPopUpChanged:</string> <string>videoFrameRateChanged:</string> <string>videoMatrixChanged:</string> + <string>x264PresetsChangedDisplayExpandedOptions:</string> + <string>x264PresetsSetJobVariables:</string> + <string>x264PresetsSliderChanged:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -11288,6 +12362,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="candidateClassName">id</string> </object> <object class="IBActionInfo"> + <string key="name">updateX264Widgets:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> <string key="name">encodeStartStopPopUpChanged:</string> <string key="candidateClassName">id</string> </object> @@ -11340,6 +12418,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="candidateClassName">id</string> </object> <object class="IBActionInfo"> + <string key="name">setupX264PresetsWidgets:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> <string key="name">showAboutPanel:</string> <string key="candidateClassName">id</string> </object> @@ -11403,6 +12485,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="name">videoMatrixChanged:</string> <string key="candidateClassName">id</string> </object> + <object class="IBActionInfo"> + <string key="name">x264PresetsChangedDisplayExpandedOptions:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">x264PresetsSetJobVariables:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">x264PresetsSliderChanged:</string> + <string key="candidateClassName">id</string> + </object> </object> </object> <object class="NSMutableDictionary" key="outlets"> @@ -11417,11 +12511,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>fAudioAllowDTSPassCheck</string> <string>fAudioAllowMP3PassCheck</string> <string>fAudioAutoPassthruBox</string> + <string>fAudioDelegate</string> <string>fAudioFallbackPopUp</string> <string>fBrowseSrtFileButton</string> <string>fChapterTable</string> <string>fChapterTableNameColumn</string> <string>fCreateChapterMarkers</string> + <string>fDisplayX264PresetsAdditonalOptionsLabel</string> + <string>fDisplayX264PresetsAdditonalOptionsTextField</string> + <string>fDisplayX264PresetsUnparseTextField</string> <string>fDstBrowseButton</string> <string>fDstFile1Field</string> <string>fDstFile2Field</string> @@ -11497,6 +12595,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>fVidTwoPassCheck</string> <string>fVideoFiltersField</string> <string>fWindow</string> + <string>fX264FastDecodeCheck</string> + <string>fX264LevelPopUp</string> + <string>fX264LevelPopUpLabel</string> + <string>fX264PresetSelectedTextField</string> + <string>fX264PresetSliderLabel</string> + <string>fX264PresetsBox</string> + <string>fX264PresetsSlider</string> + <string>fX264ProfilePopUp</string> + <string>fX264ProfilePopUpLabel</string> + <string>fX264TunePopUp</string> + <string>fX264TunePopUpLabel</string> + <string>fx264UseAdvancedOptionsCheck</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -11508,11 +12618,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>NSButton</string> <string>NSButton</string> <string>NSBox</string> + <string>HBAudioController</string> <string>NSButton</string> <string>NSButton</string> <string>NSTableView</string> <string>NSTableColumn</string> <string>NSButton</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> <string>NSButton</string> <string>NSTextField</string> <string>NSTextField</string> @@ -11588,6 +12702,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>NSButton</string> <string>NSTextField</string> <string>NSWindow</string> + <string>NSButton</string> + <string>NSPopUpButton</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSBox</string> + <string>NSSlider</string> + <string>NSPopUpButton</string> + <string>NSTextField</string> + <string>NSPopUpButton</string> + <string>NSTextField</string> + <string>NSButton</string> </object> </object> <object class="NSMutableDictionary" key="toOneOutletInfosByName"> @@ -11602,11 +12728,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>fAudioAllowDTSPassCheck</string> <string>fAudioAllowMP3PassCheck</string> <string>fAudioAutoPassthruBox</string> + <string>fAudioDelegate</string> <string>fAudioFallbackPopUp</string> <string>fBrowseSrtFileButton</string> <string>fChapterTable</string> <string>fChapterTableNameColumn</string> <string>fCreateChapterMarkers</string> + <string>fDisplayX264PresetsAdditonalOptionsLabel</string> + <string>fDisplayX264PresetsAdditonalOptionsTextField</string> + <string>fDisplayX264PresetsUnparseTextField</string> <string>fDstBrowseButton</string> <string>fDstFile1Field</string> <string>fDstFile2Field</string> @@ -11682,6 +12812,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>fVidTwoPassCheck</string> <string>fVideoFiltersField</string> <string>fWindow</string> + <string>fX264FastDecodeCheck</string> + <string>fX264LevelPopUp</string> + <string>fX264LevelPopUpLabel</string> + <string>fX264PresetSelectedTextField</string> + <string>fX264PresetSliderLabel</string> + <string>fX264PresetsBox</string> + <string>fX264PresetsSlider</string> + <string>fX264ProfilePopUp</string> + <string>fX264ProfilePopUpLabel</string> + <string>fX264TunePopUp</string> + <string>fX264TunePopUpLabel</string> + <string>fx264UseAdvancedOptionsCheck</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -11718,6 +12860,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="candidateClassName">NSBox</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">fAudioDelegate</string> + <string key="candidateClassName">HBAudioController</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">fAudioFallbackPopUp</string> <string key="candidateClassName">NSButton</string> </object> @@ -11738,6 +12884,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="candidateClassName">NSButton</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">fDisplayX264PresetsAdditonalOptionsLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fDisplayX264PresetsAdditonalOptionsTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fDisplayX264PresetsUnparseTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">fDstBrowseButton</string> <string key="candidateClassName">NSButton</string> </object> @@ -12037,6 +13195,54 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="name">fWindow</string> <string key="candidateClassName">NSWindow</string> </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264FastDecodeCheck</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264LevelPopUp</string> + <string key="candidateClassName">NSPopUpButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264LevelPopUpLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264PresetSelectedTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264PresetSliderLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264PresetsBox</string> + <string key="candidateClassName">NSBox</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264PresetsSlider</string> + <string key="candidateClassName">NSSlider</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264ProfilePopUp</string> + <string key="candidateClassName">NSPopUpButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264ProfilePopUpLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264TunePopUp</string> + <string key="candidateClassName">NSPopUpButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fX264TunePopUpLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">fx264UseAdvancedOptionsCheck</string> + <string key="candidateClassName">NSButton</string> + </object> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -12113,8 +13319,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>{128, 128}</string> <string>{15, 15}</string> <string>{8, 8}</string> - <string>{9, 8}</string> - <string>{7, 2}</string> + <string>{11, 11}</string> + <string>{10, 3}</string> <string>{8, 8}</string> <string>{15, 15}</string> </object> diff --git a/macosx/English.lproj/OutputPanel.xib b/macosx/English.lproj/OutputPanel.xib index b3328dc71..64029f65d 100644 --- a/macosx/English.lproj/OutputPanel.xib +++ b/macosx/English.lproj/OutputPanel.xib @@ -1,28 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03"> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">9G55</string> - <string key="IBDocument.InterfaceBuilderVersion">677</string> - <string key="IBDocument.AppKitVersion">949.43</string> - <string key="IBDocument.HIToolboxVersion">353.00</string> - <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> + <string key="IBDocument.SystemVersion">11G63</string> + <string key="IBDocument.InterfaceBuilderVersion">1938</string> + <string key="IBDocument.AppKitVersion">1138.51</string> + <string key="IBDocument.HIToolboxVersion">569.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="NS.object.0">1938</string> + </object> + <object class="NSArray" key="IBDocument.IntegratedClassDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="11"/> - <integer value="6"/> + <string>NSView</string> + <string>NSMenu</string> + <string>NSScrollView</string> + <string>NSWindowTemplate</string> + <string>NSMenuItem</string> + <string>NSTextView</string> + <string>NSScroller</string> + <string>NSCustomObject</string> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> </object> <object class="NSMutableArray" key="IBDocument.RootObjects" id="640353287"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -45,8 +50,8 @@ <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> - <string key="NSWindowContentMinSize">{214.502, 107}</string> + <nil key="NSUserInterfaceItemIdentifier"/> + <string key="NSWindowContentMinSize">{214.50200000000001, 107}</string> <object class="NSView" key="NSWindowView" id="1055997608"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -83,22 +88,20 @@ <nil key="NSDelegate"/> </object> <reference key="NSTextView" ref="123567529"/> - <double key="NSWidth">3.630000e+02</double> + <double key="NSWidth">363</double> <int key="NSTCFlags">1</int> </object> <object class="NSTextViewSharedData" key="NSSharedData"> <int key="NSFlags">11109</int> + <int key="NSTextCheckingTypes">0</int> + <nil key="NSMarkedAttributes"/> <object class="NSColor" key="NSBackgroundColor" id="913007966"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MQA</bytes> </object> - <object class="NSColor" key="NSInsertionColor" id="76040784"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> <object class="NSDictionary" key="NSSelectedAttributes"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="dict.sortedKeys"> + <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSBackgroundColor</string> <string>NSColor</string> @@ -111,21 +114,24 @@ <string key="NSColorName">selectedTextBackgroundColor</string> <object class="NSColor" key="NSColor"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> </object> </object> <object class="NSColor"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">selectedTextColor</string> - <reference key="NSColor" ref="76040784"/> + <object class="NSColor" key="NSColor" id="76040784"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> </object> </object> </object> - <nil key="NSMarkedAttributes"/> + <reference key="NSInsertionColor" ref="76040784"/> <object class="NSDictionary" key="NSLinkAttributes"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="dict.sortedKeys"> + <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSColor</string> <string>NSUnderline</string> @@ -136,13 +142,15 @@ <int key="NSColorSpace">1</int> <bytes key="NSRGB">MCAwIDEAA</bytes> </object> - <integer value="1" id="9"/> + <integer value="1"/> </object> </object> <nil key="NSDefaultParagraphStyle"/> + <nil key="NSTextFinder"/> + <int key="NSPreferredTextFinderStyle">1</int> </object> <int key="NSTVFlags">6</int> - <string key="NSMaxSize">{743, 1e+07}</string> + <string key="NSMaxSize">{743, 10000000}</string> <string key="NSMinize">{83, 0}</string> <nil key="NSDelegate"/> </object> @@ -153,8 +161,30 @@ <reference key="NSDocView" ref="123567529"/> <reference key="NSBGColor" ref="913007966"/> <object class="NSCursor" key="NSCursor"> - <string key="NSHotSpot">{4, -5}</string> - <int key="NSCursorType">1</int> + <string key="NSHotSpot">{4, 5}</string> + <object class="NSImage" key="NSImage"> + <int key="NSImageFlags">12582912</int> + <object class="NSMutableArray" key="NSReps"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray"> + <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="0"/> + <object class="NSBitmapImageRep"> + <object class="NSData" key="NSTIFFRepresentation"> + <bytes key="NS.bytes">TU0AKgAAAHCAFUqgBVKsAAAAwdVQUqwaEQeIRGJRGFlYqwWLQ+JxuOQpVRmEx2RROKwOQyOUQSPyaUym +SxqWyKXyeYxyZzWbSuJTScRCbz2Nz+gRKhUOfTqeUai0OSxiWTiBQSHSGFquGwekxyAgAAAOAQAAAwAA +AAEAEAAAAQEAAwAAAAEAEAAAAQIAAwAAAAIACAAIAQMAAwAAAAEABQAAAQYAAwAAAAEAAQAAAREABAAA +AAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAgAAARYAAwAAAAEAEAAAARcABAAAAAEAAABnARwAAwAA +AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes> + </object> + </object> + </object> + </object> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MCAwAA</bytes> + </object> + </object> </object> <int key="NScvFlags">4</int> </object> @@ -165,24 +195,24 @@ <reference key="NSSuperview" ref="777989256"/> <reference key="NSTarget" ref="777989256"/> <string key="NSAction">_doScroller:</string> - <double key="NSPercent">6.003236e-01</double> + <double key="NSPercent">0.60032359999999996</double> </object> <object class="NSScroller" id="446620405"> <reference key="NSNextResponder" ref="777989256"/> - <int key="NSvFlags">256</int> + <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {87, 18}}</string> <reference key="NSSuperview" ref="777989256"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="777989256"/> <string key="NSAction">_doScroller:</string> - <double key="NSCurValue">1.000000e+00</double> - <double key="NSPercent">9.456522e-01</double> + <double key="NSCurValue">1</double> + <double key="NSPercent">0.94565220000000005</double> </object> </object> <string key="NSFrame">{{-1, -1}, {380, 373}}</string> <reference key="NSSuperview" ref="1055997608"/> <reference key="NSNextKeyView" ref="630219039"/> - <int key="NSsFlags">18</int> + <int key="NSsFlags">133138</int> <reference key="NSVScroller" ref="821320990"/> <reference key="NSHScroller" ref="446620405"/> <reference key="NSContentView" ref="630219039"/> @@ -192,9 +222,10 @@ <string key="NSFrameSize">{378, 371}</string> <reference key="NSSuperview"/> </object> - <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> - <string key="NSMinSize">{214.502, 129}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> + <string key="NSMinSize">{214.50200000000001, 129}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> </object> <object class="NSMenu" id="391216144"> <string key="NSTitle">Menu</string> @@ -282,30 +313,6 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1026712888"/> - <reference key="destination" ref="282956917"/> - </object> - <int key="connectionID">17</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="123567529"/> - <reference key="destination" ref="282956917"/> - </object> - <int key="connectionID">21</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">menu</string> - <reference key="source" ref="123567529"/> - <reference key="destination" ref="391216144"/> - </object> - <int key="connectionID">22</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> <string key="label">textView</string> <reference key="source" ref="282956917"/> <reference key="destination" ref="123567529"/> @@ -360,6 +367,30 @@ </object> <int key="connectionID">44</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="1026712888"/> + <reference key="destination" ref="282956917"/> + </object> + <int key="connectionID">17</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="123567529"/> + <reference key="destination" ref="282956917"/> + </object> + <int key="connectionID">21</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">menu</string> + <reference key="source" ref="123567529"/> + <reference key="destination" ref="391216144"/> + </object> + <int key="connectionID">22</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -376,7 +407,7 @@ <int key="objectID">-2</int> <reference key="object" ref="282956917"/> <reference key="parent" ref="650019074"/> - <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> + <string key="objectName">File's Owner</string> </object> <object class="IBObjectRecord"> <int key="objectID">-1</int> @@ -490,174 +521,92 @@ </object> <object class="NSMutableDictionary" key="flattenedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="dict.sortedKeys"> + <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>-1.IBPluginDependency</string> <string>-2.IBPluginDependency</string> <string>-3.IBPluginDependency</string> - <string>-3.ImportedFromIB2</string> - <string>11.IBEditorWindowLastContentRect</string> <string>11.IBPluginDependency</string> - <string>11.ImportedFromIB2</string> <string>12.IBPluginDependency</string> - <string>12.ImportedFromIB2</string> <string>19.IBPluginDependency</string> - <string>19.ImportedFromIB2</string> <string>20.IBPluginDependency</string> - <string>20.ImportedFromIB2</string> <string>24.IBPluginDependency</string> - <string>24.ImportedFromIB2</string> <string>33.IBPluginDependency</string> - <string>33.ImportedFromIB2</string> <string>35.IBPluginDependency</string> - <string>35.ImportedFromIB2</string> <string>37.IBPluginDependency</string> - <string>37.ImportedFromIB2</string> <string>39.IBPluginDependency</string> <string>39.IBShouldRemoveOnLegacySave</string> <string>40.IBPluginDependency</string> <string>40.IBShouldRemoveOnLegacySave</string> <string>42.IBPluginDependency</string> - <string>42.ImportedFromIB2</string> <string>43.IBPluginDependency</string> - <string>43.ImportedFromIB2</string> - <string>5.IBEditorWindowLastContentRect</string> + <string>5.IBPluginDependency</string> <string>5.IBWindowTemplateEditedContentRect</string> - <string>5.ImportedFromIB2</string> - <string>5.windowTemplate.hasMaxSize</string> - <string>5.windowTemplate.hasMinSize</string> - <string>5.windowTemplate.maxSize</string> - <string>5.windowTemplate.minSize</string> <string>6.IBPluginDependency</string> - <string>6.ImportedFromIB2</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> - <string>{{319, 676}, {300, 123}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> + <integer value="1"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> - <string>{{597, 246}, {378, 371}}</string> <string>{{597, 246}, {378, 371}}</string> - <reference ref="9"/> - <boolean value="NO"/> - <reference ref="9"/> - <string>{3.40282e+38, 3.40282e+38}</string> - <string>{214.502, 107}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <reference ref="9"/> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <reference key="dict.sortedKeys" ref="650019074"/> + <reference key="dict.values" ref="650019074"/> </object> <nil key="activeLocalization"/> <object class="NSMutableDictionary" key="localizations"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <reference key="dict.sortedKeys" ref="650019074"/> + <reference key="dict.values" ref="650019074"/> </object> <nil key="sourceID"/> <int key="maxID">44</int> </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <object class="NSMutableArray" key="referencedPartialClassDescriptions"> + <object class="IBClassDescriber" key="IBDocument.Classes"/> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <integer value="1050" key="NS.object.0"/> + </object> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> + <integer value="3000" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">FirstResponder</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">HBOutputPanelController</string> - <string key="superclassName">NSWindowController</string> - <object class="NSMutableDictionary" key="actions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>clearActivityLogFile:</string> - <string>clearOutput:</string> - <string>copyAllOutputToPasteboard:</string> - <string>openActivityLogFile:</string> - <string>openEncodeLogDirectory:</string> - <string>showOutputPanel:</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">textView</string> - <string key="NS.object.0">NSTextView</string> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">HBOutputPanelController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">HBOutputPanelController</string> - <string key="superclassName">NSWindowController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> + <string>NSMenuCheckmark</string> + <string>NSMenuMixedState</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>{11, 11}</string> + <string>{10, 3}</string> </object> </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.LastKnownRelativeProjectPath">../HandBrake.xcodeproj</string> - <int key="IBDocument.defaultPropertyAccessControl">3</int> </data> </archive> diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index 6add5ab90..2a961be6d 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -1321,29 +1321,61 @@ return ![(HBQueueOutlineView*)outlineView isDragging]; if ([[item objectForKey:@"VideoEncoder"] isEqualToString: @"H.264 (x264)"]) { - [finalString appendString: @"x264 Options: " withAttributes:detailBoldAttr]; - if ([item objectForKey:@"x264Option"]) + /* we are using x264 */ + NSString *x264Info = @""; + if ([[item objectForKey:@"x264UseAdvancedOptions"] intValue]) { - [finalString appendString: [item objectForKey:@"x264Option"] withAttributes:detailAttr]; + // we are using the old advanced panel + if ([item objectForKey:@"x264Option"] && + [[item objectForKey:@"x264Option"] length]) + { + x264Info = [x264Info stringByAppendingString: [item objectForKey:@"x264Option"]]; + } + else + { + x264Info = [x264Info stringByAppendingString: @"default settings"]; + } } else { - [finalString appendString: @"x264 defaults" withAttributes:detailAttr]; + // we are using the x264 system + x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@"Preset: %@", [item objectForKey:@"x264Preset"]]]; + if ([[item objectForKey:@"x264Tune"] length]) + { + x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Tune: %@", [item objectForKey:@"x264Tune"]]]; + } + if ([[item objectForKey:@"x264OptionExtra"] length]) + { + x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Options: %@", [item objectForKey:@"x264OptionExtra"]]]; + } + if ([[item objectForKey:@"h264Profile"] length]) + { + x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Profile: %@", [item objectForKey:@"h264Profile"]]]; + } + if ([[item objectForKey:@"h264Level"] length]) + { + x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Level: %@", [item objectForKey:@"h264Level"]]]; + } } + [finalString appendString: @"x264: " withAttributes:detailBoldAttr]; + [finalString appendString: x264Info withAttributes:detailAttr]; [finalString appendString:@"\n" withAttributes:detailAttr]; } - /*If we are not x264 and we are not Theora then we must be FFmpeg (lavc) */ else if (![[item objectForKey:@"VideoEncoder"] isEqualToString: @"VP3 (Theora)"]) { - [finalString appendString: @"FFmpeg (lavc) Options: " withAttributes:detailBoldAttr]; - if ([item objectForKey:@"lavcOption"]) + /* we are using libavcodec */ + NSString *lavcInfo = @""; + if ([item objectForKey:@"lavcOption"] && + [[item objectForKey:@"lavcOption"] length]) { - [finalString appendString: [item objectForKey:@"lavcOption"] withAttributes:detailAttr]; + lavcInfo = [lavcInfo stringByAppendingString: [item objectForKey:@"lavcOption"]]; } else { - [finalString appendString: @"FFmpeg (lavc) defaults" withAttributes:detailAttr]; + lavcInfo = [lavcInfo stringByAppendingString: @"default settings"]; } + [finalString appendString: @"ffmpeg: " withAttributes:detailBoldAttr]; + [finalString appendString: lavcInfo withAttributes:detailAttr]; [finalString appendString:@"\n" withAttributes:detailAttr]; } diff --git a/make/config.guess b/make/config.guess index e792aac60..d622a44e5 100755 --- a/make/config.guess +++ b/make/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-09-18' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2009-09-18' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -56,8 +54,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -333,6 +335,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -391,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -477,8 +482,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -491,7 +496,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -548,7 +553,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -591,52 +596,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -727,22 +732,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -766,14 +771,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -785,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -800,19 +804,22 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -854,6 +861,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -863,7 +877,7 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} @@ -875,23 +889,40 @@ EOF then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-gnu + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -918,15 +949,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -952,7 +979,7 @@ EOF echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -960,14 +987,17 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -976,11 +1006,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1012,7 +1042,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1040,13 +1070,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1081,8 +1111,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1125,10 +1155,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <[email protected]> - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <[email protected]> + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <[email protected]>. # How about differentiating between stratus architectures? -djm @@ -1154,11 +1184,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1223,6 +1253,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1268,13 +1301,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1292,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1314,11 +1350,11 @@ main () #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/test/test.c b/test/test.c index a2fa672c4..f54122918 100644 --- a/test/test.c +++ b/test/test.c @@ -81,11 +81,7 @@ static char ** acompressions = NULL; static char * acodec_fallback = NULL; static char * acodecs = NULL; static char ** anames = NULL; -#ifdef __APPLE_CC__ -static int default_acodec = HB_ACODEC_CA_AAC; -#else -static int default_acodec = HB_ACODEC_FAAC; -#endif +static int default_acodec = 0; static int audio_explicit = 0; static char ** subtracks = NULL; static char ** subforce = NULL; @@ -148,15 +144,24 @@ static volatile int die = 0; static void SigHandler( int ); /* Utils */ -static void ShowCommands(); static void ShowHelp(); static void ShowPresets(); +static void ShowCommands() +{ + fprintf(stdout, "\nCommands:\n"); + fprintf(stdout, " [h]elp Show this message\n"); + fprintf(stdout, " [q]uit Exit HandBrakeCLI\n"); + fprintf(stdout, " [p]ause Pause encoding\n"); + fprintf(stdout, " [r]esume Resume encoding\n"); +} static int ParseOptions( int argc, char ** argv ); static int CheckOptions( int argc, char ** argv ); static int HandleEvents( hb_handle_t * h ); -static int get_acodec_for_string( char *codec ); +static int get_acodec_for_string(const char *codec); +static const char* get_string_for_acodec(int acodec); + static int is_sample_rate_valid(int rate); static void str_vfree( char **strv ); static char** str_split( char *str, char delem ); @@ -382,15 +387,6 @@ int main( int argc, char ** argv ) return 0; } -static void ShowCommands() -{ - fprintf( stdout, "\nCommands:\n" ); - fprintf( stdout, " [h]elp Show this message\n" ); - fprintf( stdout, " [q]uit Exit HandBrakeCLI\n" ); - fprintf( stdout, " [p]ause Pause encoding\n" ); - fprintf( stdout, " [r]esume Resume encoding\n" ); -} - static void PrintTitleInfo( hb_title_t * title, int feature ) { hb_chapter_t * chapter; @@ -2201,11 +2197,7 @@ static int HandleEvents( hb_handle_t * h ) { fprintf( stderr, "AAC Passthru requested and input codec is not AAC for track %d, using AAC encoder\n", audio->out.track ); -#ifdef __APPLE_CC__ - audio->out.codec = HB_ACODEC_CA_AAC; -#else - audio->out.codec = HB_ACODEC_FAAC; -#endif + audio->out.codec = hb_audio_encoders[0].encoder; } else if( audio->out.codec == HB_ACODEC_AC3_PASS ) { @@ -2885,35 +2877,36 @@ static void ShowHelp() " tracks, default: first one).\n" " Multiple output tracks can be used for one input.\n" " -E, --aencoder <string> Audio encoder(s):\n" ); - for( i = 0; i < hb_audio_encoders_count; i++ ) + for (i = 0; i < hb_audio_encoders_count; i++) { - fprintf( out, " %s\n", - hb_audio_encoders[i].short_name ); + fprintf(out, " %s\n", + hb_audio_encoders[i].short_name); } - fprintf( out, + fprintf(out, " copy:* will passthrough the corresponding\n" " audio unmodified to the muxer if it is a\n" " supported passthrough audio type.\n" " Separated by commas for more than one audio track.\n" -#ifdef __APPLE_CC__ - " (default: ca_aac)\n" -#else - " (default: faac for mp4, lame for mkv)\n" -#endif + " (default: %s for mp4, %s for mkv)\n", + get_string_for_acodec(hb_get_default_audio_encoder(HB_MUX_MP4)), + get_string_for_acodec(hb_get_default_audio_encoder(HB_MUX_MKV))); + fprintf(out, " --audio-copy-mask Set audio codecs that are permitted when the\n" " <string> \"copy\" audio encoder option is specified\n" " (" ); - for( i = 0, j = 0; i < hb_audio_encoders_count; i++ ) + for (i = j = 0; i < hb_audio_encoders_count; i++) { - if( !strncmp( hb_audio_encoders[i].short_name, "copy:", 5 ) ) + if ((hb_audio_encoders[i].encoder & HB_ACODEC_PASS_FLAG) && + (hb_audio_encoders[i].encoder != HB_ACODEC_AUTO_PASS)) { - if( j != 0 ) - fprintf( out, "/" ); - fprintf( out, "%s", hb_audio_encoders[i].short_name + 5 ); + if (j) + fprintf(out, "/"); + // skip "copy:" + fprintf(out, "%s", hb_audio_encoders[i].short_name + 5); j = 1; } } - fprintf( out, ", default: all).\n" + fprintf(out, ", default: all).\n" " Separated by commas for multiple allowed options.\n" " --audio-fallback Set audio codec to use when it is not possible\n" " <string> to copy an audio track without re-encoding.\n" @@ -2935,11 +2928,20 @@ static void ShowHelp() } fprintf(out, " Separated by commas for more than one audio track.\n" - " Default: up to %s for ffac3 and ffflac,\n", - hb_mixdown_get_short_name_from_mixdown(HB_AMIXDOWN_5POINT1)); - fprintf(out, - " up to %s for other encoders).\n", - hb_mixdown_get_short_name_from_mixdown(HB_AMIXDOWN_DOLBYPLII)); + " Defaults:\n"); + for (i = 0; i < hb_audio_encoders_count; i++) + { + if (!(hb_audio_encoders[i].encoder & HB_ACODEC_PASS_FLAG)) + { + // layout: UINT64_MAX (all channels) should work with any mixdown + int mixdown = hb_get_default_mixdown(hb_audio_encoders[i].encoder, + UINT64_MAX); + // assumes that the encoder short name is <= 16 characters long + fprintf(out, " %-16s up to %s\n", + hb_audio_encoders[i].short_name, + hb_mixdown_get_short_name_from_mixdown(mixdown)); + } + } fprintf(out, " --normalize-mix Normalize audio mix levels to prevent clipping.\n" " <string> Separated by commas for more than one audio track.\n" @@ -3839,7 +3841,7 @@ static int ParseOptions( int argc, char ** argv ) { for( j = 0; j < hb_audio_encoders_count; j++ ) { - char * encoder = hb_audio_encoders[j].short_name; + const char *encoder = hb_audio_encoders[j].short_name; // skip "copy:" if( strlen( encoder ) > 5 ) encoder += 5; @@ -3982,10 +3984,6 @@ static int CheckOptions( int argc, char ** argv ) else if( p && !strcasecmp(p, ".mkv" ) ) { mux = HB_MUX_MKV; -#ifndef __APPLE_CC__ - // default to Lame for MKV (except under OS X where Core Audio is available) - default_acodec = HB_ACODEC_LAME; -#endif } else { @@ -4002,10 +4000,6 @@ static int CheckOptions( int argc, char ** argv ) else if( !strcasecmp( format, "mkv" ) ) { mux = HB_MUX_MKV; -#ifndef __APPLE_CC__ - // default to Lame for MKV (except under OS X where Core Audio is available) - default_acodec = HB_ACODEC_LAME; -#endif } else { @@ -4013,23 +4007,36 @@ static int CheckOptions( int argc, char ** argv ) "choices are mp4, m4v and mkv\n.", format ); return 1; } + default_acodec = hb_get_default_audio_encoder(mux); } return 0; } -static int get_acodec_for_string( char *codec ) +static int get_acodec_for_string(const char *codec) { - int i, acodec; - for( i = 0, acodec = 0; i < hb_audio_encoders_count; i++ ) + int i; + for (i = 0; i < hb_audio_encoders_count; i++) { - if( !strcasecmp( hb_audio_encoders[i].short_name, codec ) ) + if (!strcasecmp(hb_audio_encoders[i].short_name, codec)) { - acodec = hb_audio_encoders[i].encoder; - break; + return hb_audio_encoders[i].encoder; + } + } + return -1; +} + +static const char* get_string_for_acodec(int acodec) +{ + int i; + for (i = 0; i < hb_audio_encoders_count; i++) + { + if (hb_audio_encoders[i].encoder == acodec) + { + return hb_audio_encoders[i].short_name; } } - return acodec ? acodec : -1; + return NULL; } static int is_sample_rate_valid(int rate) diff --git a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl index 5b506a911..c9a9da245 100644 --- a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl +++ b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs.tmpl @@ -16,7 +16,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs index 46e696ca1..39b601a27 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs @@ -432,12 +432,12 @@ namespace HandBrake.ApplicationServices.Utilities return x264Profile.Main;
case "high":
return x264Profile.High;
- case "high10":
- return x264Profile.High10;
- case "high422":
- return x264Profile.High422;
- case "high444":
- return x264Profile.High444;
+ //case "high10":
+ // return x264Profile.High10;
+ //case "high422":
+ // return x264Profile.High422;
+ //case "high444":
+ // return x264Profile.High444;
default:
return x264Profile.Main;
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs index e82d772d6..ad2bc9063 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x264/x264Profile.cs @@ -28,13 +28,13 @@ namespace HandBrake.Interop.Model.Encoding.x264 [Display(Name = "High")]
High,
- [Display(Name = "High 10")]
- High10,
+ //[Display(Name = "High 10")]
+ //High10, HandBrake does not yet support 10bit.
- [Display(Name = "High 422")]
- High422,
+ //[Display(Name = "High 422")]
+ //High422, Not supported
- [Display(Name = "High 444")]
- High444,
+ //[Display(Name = "High 444")]
+ // High444, Use Auto Instead.
}
}
diff --git a/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs b/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs index 70de9c3fa..872727ded 100644 --- a/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrake.Server/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake.Server")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs index fc7c4398f..a30401a56 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ using System.Windows; [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake")]
-[assembly: AssemblyCopyright("Copyright © HandBrake Team 2011-2012")]
+[assembly: AssemblyCopyright("Copyright © HandBrake Team 2003-2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl index 29208d222..8d77fdd8a 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl @@ -17,7 +17,7 @@ using System.Windows; [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake")]
[assembly: AssemblyProduct("HandBrake")]
-[assembly: AssemblyCopyright("Copyright © HandBrake Team 2012")]
+[assembly: AssemblyCopyright("Copyright © HandBrake Team 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml index 5abd5c152..a9e7e4319 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml @@ -52,7 +52,7 @@ <TextBlock Grid.Row="1"
Margin="5,0,0,0 "
- Text="Copyright 2003-2012 HandBrake Team" />
+ Text="Copyright 2003-2013 HandBrake Team" />
<TextBlock Grid.Row="2"
Margin="5,10,0,5"
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index f8a09cf44..c68a54e72 100644 --- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -125,13 +125,13 @@ <Label Content="Left" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" />
<Label Content="Right" Grid.Row="2" Grid.Column="4" HorizontalAlignment="Center" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropTop, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="1" Grid.Column="2"
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding CropTop, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="1" Grid.Column="2"
HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropBottom, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="3" Grid.Column="2"
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding CropBottom, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="3" Grid.Column="2"
HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropLeft, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="1"
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding CropLeft, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="1"
HorizontalAlignment="Left" Margin="0,0,0,5" />
- <NumericUpDown:NumericUpDown Width="45" Value="{Binding CropRight, Mode=TwoWay}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="3"
+ <NumericUpDown:NumericUpDown Width="60" Value="{Binding CropRight, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" IsEnabled="{Binding IsCustomCrop}" Grid.Row="2" Grid.Column="3"
HorizontalAlignment="Left" Margin="0,0,0,5" />
</Grid>
|