Overview
Request 292 (accepted)
update version 0.9.8. but I don't know how to fix the factory gtk error. help appreciated.
- Created by marguerite over 11 years ago
- In state accepted
- 4 package maintainers
Submit package home:marguerit...hes:Multimedia / handbrake to package Multimedia / handbrake
handbrake.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Sun Oct 7 13:47:32 UTC 2012 - i@marguerite.su
4
+
5
+- update to 0.9.8
6
+ * Corrects a few crash bugs that showed up in 0.9.7
7
+ * Includes an AppleTV3 Preset and updated iPad Preset (0.9.7)
8
+
9
+-------------------------------------------------------------------
10
Thu Mar 01 06:12:36 UTC 2012 - pascal.bleser@opensuse.org
11
12
- update to 0.9.6
13
handbrake.spec
Changed
159
1
2
Name: handbrake
3
#define rev 3549
4
#Version: 0.9.4+r%{rev}
5
-Version: 0.9.6
6
+Version: 0.9.8
7
Release: 1.pm.1
8
+License: GPL-2.0+
9
Summary: Multithreaded Video Transcoder
10
+Url: http://handbrake.fr/
11
+Group: Productivity/Multimedia/Video/Editors and Convertors
12
# svn://svn.handbrake.fr/HandBrake/trunk#%{rev}
13
#Source: HandBrake-svn%{rev}.tar.bz2
14
Source: http://prdownloads.sourceforge.net/handbrake/HandBrake-%{version}.tar.bz2
15
16
Source122: http://download.handbrake.fr/handbrake/contrib/fribidi-0.19.2.tar.gz
17
Source123: http://download.handbrake.fr/handbrake/contrib/yasm-1.1.0.tar.gz
18
Source151: handbrake-ffmpeg_fix_missing_return_in_nonvoid_function.patch
19
+Source152: handbrake-libmkv_no_return_in_nonvoid_function.patch
20
Source99: handbrake-rpmlintrc
21
-URL: http://handbrake.fr/
22
-Group: Productivity/Multimedia/Video/Editors and Convertors
23
-License: GNU General Public License version 2 (GPL v2)
24
-BuildRoot: %{_tmppath}/build-%{name}-%{version}
25
-BuildRequires: python curl wget subversion
26
-BuildRequires: gtk2-devel gtkhtml2-devel libbz2-devel zlib-devel
27
-BuildRequires: libicu-devel libnotify-devel libgudev-1_0-devel alsa-devel
28
-BuildRequires: sqlite3-devel libcurl-devel libxslt-devel
29
+BuildRequires: alsa-devel
30
+BuildRequires: curl
31
BuildRequires: fribidi-devel
32
-BuildRequires: gstreamer-0_10-devel gstreamer-0_10-plugins-base-devel
33
+BuildRequires: gstreamer-0_10-plugins-base-devel
34
+BuildRequires: gtkhtml2-devel
35
+BuildRequires: libbz2-devel
36
+BuildRequires: libcurl-devel
37
+BuildRequires: libicu-devel
38
+BuildRequires: libxslt-devel
39
+BuildRequires: python
40
+BuildRequires: sqlite3-devel
41
+BuildRequires: subversion
42
+BuildRequires: wget
43
+BuildRequires: zlib-devel
44
+BuildRequires: pkgconfig(gstreamer-0.10)
45
+BuildRequires: pkgconfig(gtk+-2.0)
46
+BuildRequires: pkgconfig(gudev-1.0)
47
+BuildRequires: pkgconfig(libnotify)
48
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
49
%if 0%{?suse_version} <= 1140
50
-BuildRequires: hal-devel
51
+BuildRequires: pkgconfig(hal)
52
%endif
53
-BuildRequires: dbus-1-glib-devel
54
-%if %suse_version >= 1110
55
+BuildRequires: pkgconfig(dbus-glib-1)
56
+%if 0%{?suse_version} >= 1110
57
BuildRequires: libwebkit-devel
58
%else
59
BuildRequires: WebKitGtk-devel
60
%endif
61
-BuildRequires: gcc gcc-c++ make glibc-devel yasm nasm
62
-BuildRequires: autoconf automake libtool intltool
63
+BuildRequires: autoconf
64
+BuildRequires: automake
65
+BuildRequires: gcc
66
+BuildRequires: gcc-c++
67
+BuildRequires: glibc-devel
68
+BuildRequires: intltool
69
+BuildRequires: libtool
70
+BuildRequires: make
71
+BuildRequires: nasm
72
BuildRequires: update-desktop-files
73
+BuildRequires: yasm
74
75
%description
76
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
77
78
%endif
79
80
# Copy 3rd party dependencies into expected locations:
81
-%__mkdir download
82
+mkdir download
83
for f in \
84
%{S:101} %{S:102} %{S:103} %{S:104} %{S:105} %{S:106} \
85
%{S:107} %{S:108} %{S:109} %{S:110} %{S:111} %{S:112} \
86
%{S:113} %{S:114} %{S:115} %{S:116} %{S:117} %{S:118} \
87
%{S:119} %{S:120} %{S:121} %{S:122} %{S:123} \
88
; do
89
- %__ln_s "$f" download/
90
+ ln -s "$f" download/
91
done
92
93
# check beforehand that the versions match what the
94
# build system expects:
95
missing=$PWD/.missing
96
-%__grep -hE '\.FETCH\.url *=' contrib/*/module.defs \
97
-| %__awk -F' =' '{print $2}' \
98
+grep -hE '\.FETCH\.url *=' contrib/*/module.defs \
99
+| gawk -F' =' '{print $2}' \
100
| while read url; do
101
- f=$(echo "$url" | %__sed 's|^.*/||')
102
+ f=$(echo "$url" | sed 's|^.*/||')
103
case $f in
104
bzip2*|libiconv*|pthreads*|zlib*) continue ;;
105
esac
106
107
%build
108
# will be removed when the makefiles are fixed, currently
109
# fails on openSUSE factory because of --as-needed
110
-export SUSE_ASNEEDED=0
111
-export CFLAGS="%{optflags}"
112
-export CXXFLAGS="%{optflags}"
113
+# export SUSE_ASNEEDED=0
114
+export CFLAGS="%{optflags} -fno-strict-aliasing"
115
+export CXXFLAGS="%{optflags} -fno-strict-aliasing"
116
117
-# %__cp "%{S:151}" contrib/ffmpeg/A99-fix-missing-return-in-nonvoid-function.patch
118
+# cp "%{S:151}" contrib/ffmpeg/A99-fix-missing-return-in-nonvoid-function.patch
119
+cp %{S:152} contrib/libmkv/A99-fix-missing-return-in-nonvoid-function.patch
120
121
-%__mkdir build
122
+mkdir build
123
./configure \
124
--force \
125
--build="$PWD/build" \
126
127
GHB_PKGS="dbus-glib-1 glib-2.0 gdk-pixbuf-2.0 gudev-1.0 webkit-1.0 libnotify"
128
GHB_PKGS="$GHB_PKGS gstreamer-interfaces-0.10 gstreamer-0.10 gstreamer-pbutils-0.10 gstreamer-video-0.10"
129
pushd build
130
-%__make libhb/project.h
131
-%__make %{?_smp_mflags} \
132
+make libhb/project.h
133
+make %{?_smp_mflags} \
134
GHB_CFLAGS="$(pkg-config --cflags $GHB_PKGS) -I../../libhb" \
135
GHB_LIBS="$(pkg-config --libs $GHB_PKGS)"
136
popd #build
137
138
139
%install
140
pushd build
141
-%__make install
142
+make install
143
popd #build
144
145
-%__ln_s ghb "%{buildroot}%{_bindir}/HandBrakeGUI"
146
+ln -s ghb "%{buildroot}%{_bindir}/HandBrakeGUI"
147
148
%suse_update_desktop_file -r ghb AudioVideo AudioVideoEditing
149
150
-%__rm "%{buildroot}%{_datadir}/icons"/*/*.cache
151
+rm "%{buildroot}%{_datadir}/icons"/*/*.cache
152
153
%clean
154
-%{?buildroot:%__rm -rf "%{buildroot}"}
155
+%{?buildroot:rm -rf %{buildroot}}
156
157
%files cli
158
%defattr(-,root,root)
159
handbrake-libmkv_no_return_in_nonvoid_function.patch
Added
15
1
2
+Index: tracks.c
3
+===================================================================
4
+--- a/src/tracks.c
5
++++ b/src/tracks.c
6
+@@ -210,6 +210,8 @@ int mk_updateTrackPrivateData(mk_Writer
7
+ if (track->private_data == NULL)
8
+ track->private_data = calloc(1, track->private_data_size);
9
+ memcpy(track->private_data, data, size);
10
++
11
++ return 0;
12
+ }
13
+
14
+ int mk_writeTracks(mk_Writer *w, mk_Context *tracks)
15
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Converters/AudioEnumConverter.cs
Deleted
85
1
2
-•// --------------------------------------------------------------------------------------------------------------------
3
-// <copyright file="BooleanToVisibilityConverter.cs" company="HandBrake Project (http://handbrake.fr)">
4
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
5
-// </copyright>
6
-// <summary>
7
-// Defines the BooleanToVisibilityConverter type.
8
-// </summary>
9
-// --------------------------------------------------------------------------------------------------------------------
10
-
11
-namespace HandBrakeWPF.Converters
12
-{
13
- using System.Collections.Generic;
14
- using System.Globalization;
15
- using System.Windows.Data;
16
- using System;
17
-
18
- using HandBrake.ApplicationServices.Functions;
19
- using HandBrake.Interop.Model.Encoding;
20
-
21
- /// <summary>
22
- /// Boolean to Visibility Converter
23
- /// </summary>
24
- public sealed class AudioEnumConverter : IValueConverter
25
- {
26
- /// <summary>
27
- /// Convert an Enum to it's display value (attribute)
28
- /// </summary>
29
- /// <param name="value">
30
- /// The value.
31
- /// </param>
32
- /// <param name="targetType">
33
- /// The target type.
34
- /// </param>
35
- /// <param name="parameter">
36
- /// The parameter. (A boolean which inverts the output)
37
- /// </param>
38
- /// <param name="culture">
39
- /// The culture.
40
- /// </param>
41
- /// <returns>
42
- /// Visibility property
43
- /// </returns>
44
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
45
- {
46
- if (value is Mixdown)
47
- {
48
- return EnumHelper<Mixdown>.GetEnumDisplayValues(value.GetType());
49
- }
50
- else if (value is AudioEncoder)
51
- {
52
- return EnumHelper<AudioEncoder>.GetEnumDisplayValues(value.GetType());
53
- }
54
-
55
- return new List<string>();
56
- }
57
-
58
- /// <summary>
59
- /// Convert Back for the IValueConverter Interface. Not used!
60
- /// </summary>
61
- /// <param name="value">
62
- /// The value.
63
- /// </param>
64
- /// <param name="targetType">
65
- /// The target type.
66
- /// </param>
67
- /// <param name="parameter">
68
- /// The parameter.
69
- /// </param>
70
- /// <param name="culture">
71
- /// The culture.
72
- /// </param>
73
- /// <returns>
74
- /// Nothing
75
- /// </returns>
76
- /// <exception cref="NotImplementedException">
77
- /// This method is not used!
78
- /// </exception>
79
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
80
- {
81
- throw new NotImplementedException();
82
- }
83
- }
84
-}
85
HandBrake-0.9.6.tar.bz2/AUTHORS -> HandBrake-0.9.8.tar.bz2/AUTHORS
Changed
142
1
2
AUTHORS file for HandBrake <http://handbrake.fr/>
3
4
-Eric Petit <titer@m0k.org>
5
+Eric Petit
6
+ Core (construct, multithreading, BeOS/OS X/Linux ports)
7
+ MPEG demuxer
8
+ MPEG-2, AC3 and MPGA decoders (w/ libmpeg2/liba52/libavcodec)
9
10
+ OS X interface
11
+ French translation
12
13
-Laurent Aimar <fenrir@via.ecp.fr>
14
+Laurent Aimar
15
+ H264 and Vorbis encoders (w/ libx264/libvorbis)
16
+ OGG/OGM muxer (w/ libogg)
17
+ Gtk2 interface
18
+ wxWidgets interface
19
20
-Van Jacobson <vanj.hb@gmail.com> (van)
21
+Van Jacobson (van)
22
+ Universal input architecture
23
+ MPEG Standard Target Decoder timing model
24
+ Auto-typing MPEG stream files
25
26
+ Minor dvd reader fixes
27
+ Chapter mark bug fixes
28
29
-John Allen (?) <johnallenemail@gmail.com> (johnallen)
30
+John Allen
31
+ Core enhancements
32
+ Threading enhancements
33
+ Simplified Mac OS X GUI
34
35
-Joe Crain <dynaflashtech@gmail.com> (dynaflash)
36
+Joe Crain (dynaflash)
37
+ Mac OS X GUI enhancements/rewrite
38
39
-Damiano Galassi <damiog@gmail.com> (ritsuka)
40
+Damiano Galassi (ritsuka)
41
+ Mac OS X GUI enhancements
42
43
-Edward Groenendaal <eddyg.hb@myreflection.org> (eddyg)
44
+Edward Groenendaal (eddyg)
45
+ Major bug fixes
46
+ Subtitle scan & Colour
47
+ Performance improvements
48
49
-David Foster <unknown> (davidfstr)
50
+David Foster (davidfstr)
51
+ Subtitles from file inputs
52
+ SSA subtitle support
53
54
-Rodney Hester <rhester@multics.dynalias.com> (rhester)
55
+Rodney Hester (rhester)
56
+ iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
57
58
-Andrew Kimpton <awk@awkward.org> (awk)
59
+Andrew Kimpton (awk)
60
+ MPEG Audio fixes
61
+ MPEG Stream Support
62
63
-Chris Lee <clee@kde.org>
64
+Chris Lee
65
+ PAR/anamorphic support
66
+ dvdread enhancements
67
+ Linux GUI
68
69
-Chris Long <chris.long@mac.com> (chrislong)
70
+Chris Long (chrislong)
71
+ iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
72
73
-Brian Lopez <seniorlopez@gmail.com> (brianmario)
74
+Brian Mario <Unknown> (brianmario)
75
+ Windows GUI
76
77
-Maurj <handbrake@maurj.com> (maurj)
78
+Maurj(maurj)
79
+ Dolby Surround and Dolby Pro Logic II mixdowns
80
+ 6-channel AAC audio from 5.1 source
81
+ Mono AAC audio from mono source
82
83
+ Mac OS X GUI enhancements
84
+ Support for DTS audio sources
85
86
-Mirkwood <mirkwood07@gmail.com> (mirkwood)
87
+Mirkwood (mirkwood)
88
+ Windows CLI port
89
90
-Nyx <unknown> (Nyx)
91
+Nyx
92
+ Frame re-ordering and flushing in mp4
93
94
-Philippe Rigaux <pri@nopapers.org> (prigaux)
95
+Philippe Rigaux (prigaux)
96
+ 3rd party library integration
97
+ Mac OS X GUI enhancements
98
+ PAR/anamorphic support
99
+ Universal binary build process
100
+ Conversion from jam to make for compiles
101
102
-Jonathon Rubin <jb.rubin@gmail.com> (jbrjake)
103
+Jonathon Rubin (jbrjake)
104
+ Massive core enhancements
105
+ Significant improvements to H.264 support
106
107
-Scott <unknown> (s55)
108
+Scott(s55)
109
+ Windows GUI
110
111
-John Stebbins <jstebbins.hb@gmail.com> (j45)
112
+John Stebbins (j45)
113
+ GTK GUI
114
+ TrueHD demuxing
115
+ libavcodec video encoding quality enhancements
116
+ Numerous bug fixes
117
118
-Chris Thoman <cthoman@gmail.com> (huevos_rancheros)
119
+Chris Thoman (huevos_rancheros)
120
+ Ported video filters from libmpcodec
121
122
-Mark Krenek <markkrenek@mac.com> (travistex)
123
+Mark Krenek (travistex)
124
+ Mac OS X GUI enhancements
125
+ Mac OS X GUI Queueing system
126
127
-Kona 'mike' Blend <Kona8lend@gmail.com> (KonaBlend)
128
+Kona 'mike' Blend (KonaBlend)
129
+ Build System and related guides
130
131
-David Rickard <unknown> (RandomEngy)
132
- + HandBrake Interop Library
133
-
134
-Tim Walker <unknown> (Rodeo)
135
- + Miscellaneous fixes and enhancements
136
+David Rickard (RandomEngy)
137
++ HandBrake Interop Library
138
+
139
+Tim Walker (Rodeo)
140
++ Miscellaneous fixes and enhancements
141
+
142
HandBrake-0.9.6.tar.bz2/NEWS -> HandBrake-0.9.8.tar.bz2/NEWS
Changed
17
1
2
NEWS file for HandBrake <http://handbrake.fr/>
3
4
+Changes betwen 0.9.7 and 0.9.8:
5
+
6
+-> Corrects a few crash bugs that showed up in 0.9.7
7
+
8
+Changes betwen 0.9.6 and 0.9.7:
9
+
10
+-> This is a bug fix release for 0.9.6.
11
+-> Includes an AppleTV3 Preset and updated iPad Preset
12
+
13
+
14
Changes betwen 0.9.5 and 0.9.6:
15
16
Encoders:
17
HandBrake-0.9.6.tar.bz2/THANKS -> HandBrake-0.9.8.tar.bz2/THANKS
Changed
10
1
2
ReviewBoard (http://www.reviewboard.org/)
3
PhpBB (http://www.phpbb.com/)
4
hlscript (http://badmofo.org/hlscript/)
5
+Jetbrains (http://www.jetbrains.com/resharper/) Resharper Open Source License
6
+Visual SVN (http://www.visualsvn.com/) Visual SVN Open Source License
7
8
Forum Moderators:
9
10
HandBrake-0.9.6.tar.bz2/contrib/libass/module.defs -> HandBrake-0.9.8.tar.bz2/contrib/libass/module.defs
Changed
13
1
2
FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \
3
FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
4
FONTCONFIG_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfontconfig" \
5
- FONTCONFIG_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include" \
6
+ FONTCONFIG_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include"
7
+
8
+ifneq ($(BUILD.system),linux)
9
+LIBASS.CONFIGURE.extra += \
10
FRIBIDI_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfribidi" \
11
FRIBIDI_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include"
12
+endif
13
HandBrake-0.9.8.tar.bz2/contrib/libmkv/A02-audio-out-sampling-freq.patch
Added
30
1
2
+diff --git a/include/libmkv.h b/include/libmkv.h
3
+index 146a91f..f03d608 100644
4
+--- a/include/libmkv.h
5
++++ b/include/libmkv.h
6
+@@ -203,6 +204,7 @@ struct mk_TrackConfig_s {
7
+ } video;
8
+ struct {
9
+ float samplingFreq; /* Sampling Frequency in Hz */
10
++ float outputSamplingFreq; /* Playback Sampling Frequency in Hz (e.g. for AAC w/SBR) */
11
+ unsigned channels; /* Number of channels for this track */
12
+ unsigned bitDepth; /* Bits per sample (PCM) */
13
+ } audio;
14
+diff --git a/src/tracks.c b/src/tracks.c
15
+index f9c7e48..a2a60ca 100644
16
+--- a/src/tracks.c
17
++++ b/src/tracks.c
18
+@@ -174,6 +174,11 @@ mk_Track *mk_createTrack(mk_Writer *w, mk_TrackConfig *tc)
19
+ /* SamplingFrequency */
20
+ if (mk_writeFloat(v, MATROSKA_ID_AUDIOSAMPLINGFREQ, tc->extra.audio.samplingFreq) < 0)
21
+ return NULL;
22
++ if (tc->extra.audio.outputSamplingFreq) {
23
++ /* Output SamplingFrequency */
24
++ if (mk_writeFloat(v, MATROSKA_ID_AUDIOOUTSAMPLINGFREQ, tc->extra.audio.outputSamplingFreq) < 0)
25
++ return NULL;
26
++ }
27
+ /* Channels */
28
+ if (mk_writeUInt(v, MATROSKA_ID_AUDIOCHANNELS, tc->extra.audio.channels) < 0)
29
+ return NULL;
30
HandBrake-0.9.6.tar.bz2/gtk/configure.ac -> HandBrake-0.9.8.tar.bz2/gtk/configure.ac
Changed
19
1
2
mingw_flag=yes
3
;;
4
*)
5
+ case "$host_os" in
6
+ linux*)
7
+ pkg_gudev="gudev-1.0"
8
+ ;;
9
+ esac
10
if test "x$gst_disable" = "xyes" ; then
11
- GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0 libnotify dbus-glib-1 gudev-1.0"
12
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
13
else
14
- GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify dbus-glib-1 gudev-1.0"
15
+ GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
16
fi
17
mingw_flag=no
18
;;
19
HandBrake-0.9.6.tar.bz2/gtk/module.rules -> HandBrake-0.9.8.tar.bz2/gtk/module.rules
Changed
10
1
2
$(GTK.CONFIGURE.extra) \
3
PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig \
4
CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \
5
- LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O) " \
6
+ LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \
7
--prefix=$(PREFIX) \
8
--with-hb=$(call fn.ABSOLUTE,$(BUILD/))
9
$(TOUCH.exe) $@
10
HandBrake-0.9.6.tar.bz2/gtk/src/audiohandler.c -> HandBrake-0.9.8.tar.bz2/gtk/src/audiohandler.c
Changed
46
1
2
{
3
gint mask = 0;
4
5
- if (!ghb_settings_get_boolean(settings, "AdvancedAutoPassthru"))
6
- {
7
- mask = HB_ACODEC_MP3 |
8
- HB_ACODEC_FFAAC |
9
- HB_ACODEC_AC3 |
10
- HB_ACODEC_DCA |
11
- HB_ACODEC_DCA_HD;
12
- return mask;
13
- }
14
if (ghb_settings_get_boolean(settings, "AudioAllowMP3Pass"))
15
{
16
mask |= HB_ACODEC_MP3;
17
18
19
default:
20
{
21
- if (ghb_settings_get_boolean(settings, "AdvancedAutoPassthru"))
22
- fallback = ghb_settings_combo_int(settings,
23
- "AudioEncoderFallback");
24
+ fallback = ghb_settings_combo_int(settings, "AudioEncoderFallback");
25
}
26
}
27
if ( mux == HB_MUX_MP4 )
28
29
}
30
if ( mux == HB_MUX_MKV )
31
{
32
- mask = HB_ACODEC_LAME |
33
- HB_ACODEC_FFAAC |
34
+ mask =
35
+ HB_ACODEC_FAAC |
36
+ HB_ACODEC_LAME |
37
+ HB_ACODEC_VORBIS |
38
HB_ACODEC_AC3 |
39
- HB_ACODEC_DCA |
40
- HB_ACODEC_DCA_HD;
41
+ HB_ACODEC_FFAAC |
42
+ HB_ACODEC_FFFLAC;
43
}
44
if (!(fallback & mask ))
45
{
46
HandBrake-0.9.6.tar.bz2/gtk/src/callbacks.c -> HandBrake-0.9.8.tar.bz2/gtk/src/callbacks.c
Changed
146
1
2
#if !defined(_WIN32)
3
#include <poll.h>
4
#define G_UDEV_API_IS_SUBJECT_TO_CHANGE 1
5
+#if defined(__linux__)
6
#include <gudev/gudev.h>
7
+#endif
8
#include <dbus/dbus-glib.h>
9
#include <dbus/dbus-glib-lowlevel.h>
10
11
12
#endif
13
14
#include <gdk/gdkx.h>
15
+#ifndef NOTIFY_CHECK_VERSION
16
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
17
+#endif
18
#else
19
#define WINVER 0x0500
20
#include <winsock2.h>
21
22
ghb_idle_scan(signal_user_data_t *ud)
23
{
24
gchar *path;
25
- gint preview_count;
26
-
27
- show_scan_progress(ud);
28
path = ghb_settings_get_string( ud->settings, "scan_source");
29
- prune_logs(ud);
30
-
31
- preview_count = ghb_settings_get_int(ud->settings, "preview_count");
32
- start_scan(ud, path, 0, preview_count);
33
+ ghb_do_scan(ud, path, 0, TRUE);
34
g_free(path);
35
return FALSE;
36
}
37
38
status_str = searching_status_string(ud, &status.queue);
39
label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
40
gtk_label_set_text (label, status_str);
41
+ if (ghb_settings_get_boolean(ud->settings, "show_status"))
42
+ {
43
#if !GTK_CHECK_VERSION(2, 16, 0)
44
- GtkStatusIcon *si;
45
+ GtkStatusIcon *si;
46
47
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
48
- gtk_status_icon_set_tooltip(si, status_str);
49
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
50
+ gtk_status_icon_set_tooltip(si, status_str);
51
#endif
52
#if defined(_USE_APP_IND)
53
- char * ai_status_str= g_strdup_printf(
54
- "%.2f%%",
55
- 100.0 * status.queue.progress);
56
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
57
- g_free(ai_status_str);
58
+ char * ai_status_str= g_strdup_printf(
59
+ "%.2f%%",
60
+ 100.0 * status.queue.progress);
61
+ app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
62
+ g_free(ai_status_str);
63
#endif
64
+ }
65
gtk_label_set_text (work_status, status_str);
66
gtk_progress_bar_set_fraction (progress, status.queue.progress);
67
g_free(status_str);
68
69
status_str = working_status_string(ud, &status.queue);
70
label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
71
gtk_label_set_text (label, status_str);
72
+ if (ghb_settings_get_boolean(ud->settings, "show_status"))
73
+ {
74
#if defined(_USE_APP_IND)
75
- char * ai_status_str= g_strdup_printf(
76
- "%.2f%%",
77
- 100.0 * status.queue.progress);
78
- app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
79
- g_free(ai_status_str);
80
+ char * ai_status_str= g_strdup_printf(
81
+ "%.2f%%",
82
+ 100.0 * status.queue.progress);
83
+ app_indicator_set_label( ud->ai, ai_status_str, "99.99%");
84
+ g_free(ai_status_str);
85
#else
86
#if !GTK_CHECK_VERSION(2, 16, 0)
87
- GtkStatusIcon *si;
88
+ GtkStatusIcon *si;
89
90
- si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
91
- gtk_status_icon_set_tooltip(si, status_str);
92
+ si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
93
+ gtk_status_icon_set_tooltip(si, status_str);
94
#endif
95
#endif
96
+ }
97
gtk_label_set_text (work_status, status_str);
98
gtk_progress_bar_set_fraction (progress, status.queue.progress);
99
g_free(status_str);
100
101
return dvd_devices;
102
}
103
104
-#if !defined(_WIN32)
105
+#if defined(__linux__)
106
static GUdevClient *udev_ctx = NULL;
107
#endif
108
109
gboolean
110
ghb_is_cd(GDrive *gd)
111
{
112
-#if !defined(_WIN32)
113
+#if defined(__linux__)
114
gchar *device;
115
GUdevDevice *udd;
116
117
118
void
119
ghb_udev_init()
120
{
121
-#if !defined(_WIN32)
122
+#if defined(__linux__)
123
udev_ctx = g_udev_client_new(NULL);
124
#endif
125
}
126
127
if (host == NULL || appcast == NULL)
128
return NULL;
129
130
- query = g_strdup_printf( "GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n",
131
+ query = g_strdup_printf("GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n",
132
appcast, host);
133
134
ioc = ghb_net_open(ud, host, 80);
135
if (ioc == NULL)
136
- return NULL;
137
+ goto free_resources;
138
139
g_io_channel_write_chars(ioc, query, strlen(query), &len, &gerror);
140
g_io_channel_flush(ioc, &gerror);
141
+
142
+free_resources:
143
g_free(query);
144
g_free(host);
145
g_free(appcast);
146
HandBrake-0.9.6.tar.bz2/gtk/src/create_resources.c -> HandBrake-0.9.8.tar.bz2/gtk/src/create_resources.c
Changed
9
1
2
3
gval = ghb_resource_parse_file(file);
4
ghb_plist_write_file(dst, gval);
5
+ fclose(file);
6
return 0;
7
}
8
9
HandBrake-0.9.6.tar.bz2/gtk/src/ghb.desktop -> HandBrake-0.9.8.tar.bz2/gtk/src/ghb.desktop
Changed
9
1
2
Exec=ghb
3
Icon=hb-icon
4
Terminal=false
5
-Encoding=UTF-8
6
Type=Application
7
Categories=GTK;AudioVideo;Video;
8
MimeType=application/ogg;application/x-extension-mp4;application/x-flac;application/x-matroska;application/x-ogg;audio/ac3;audio/mp4;audio/mpeg;audio/ogg;audio/x-flac;audio/x-matroska;audio/x-mp3;audio/x-mpeg;audio/x-vorbis;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/quicktime;video/vnd.divx;video/x-avi;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ogm+ogg;video/x-theora+ogg;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;
9
HandBrake-0.9.6.tar.bz2/gtk/src/hb-backend.c -> HandBrake-0.9.8.tar.bz2/gtk/src/hb-backend.c
Changed
26
1
2
{
3
list = hb_get_titles( h_scan );
4
count = hb_list_count( list );
5
- if (count > 100) count = 100;
6
}
7
if (titles) g_strfreev(titles);
8
if (title_opts.map) g_free(title_opts.map);
9
10
if (h_scan == NULL) return 0;
11
list = hb_get_titles( h_scan );
12
count = hb_list_count( list );
13
- if (count > 100) count = 100;
14
if (count < 1) return 0;
15
title = (hb_title_t*)hb_list_item(list, 0);
16
feature = title->job->feature;
17
18
b++;
19
break;
20
default:
21
- *a = *b;
22
+ *a = *b & 0x7f;
23
a++; b++;
24
break;
25
}
26
HandBrake-0.9.6.tar.bz2/gtk/src/internal_defaults.xml -> HandBrake-0.9.8.tar.bz2/gtk/src/internal_defaults.xml
Changed
10
1
2
<key>AudioAllowDTSHDPass</key>
3
<true />
4
<key>AudioEncoderFallback</key>
5
- <string>ac3</string>
6
+ <string>ffac3</string>
7
<key>AudioList</key>
8
<array>
9
<dict>
10
HandBrake-0.9.6.tar.bz2/gtk/src/makedeps.py -> HandBrake-0.9.8.tar.bz2/gtk/src/makedeps.py
Changed
10
1
2
DepEntry("PictureAutoCrop", "PictureLeftCrop", "FALSE", False, False),
3
DepEntry("PictureAutoCrop", "PictureRightCrop", "FALSE", False, False),
4
DepEntry("VideoEncoder", "x264_tab", "x264", False, True),
5
- DepEntry("VideoEncoder", "lavc_mpeg4_tab", "ffmpeg|ffmpeg2", False, True),
6
+ DepEntry("VideoEncoder", "lavc_mpeg4_tab", "ffmpeg|ffmpeg4|ffmpeg2", False, True),
7
DepEntry("VideoEncoder", "Mp4iPodCompatible", "x264", False, False),
8
DepEntry("AudioTrackQualityEnable", "AudioTrackQuality", "FALSE", True, False),
9
DepEntry("AudioTrackQualityEnable", "AudioTrackQualityValue", "FALSE", True, False),
10
HandBrake-0.9.6.tar.bz2/gtk/src/presets.c -> HandBrake-0.9.8.tar.bz2/gtk/src/presets.c
Changed
32
1
2
val = ghb_array_get_nth(path, ii);
3
name = g_value_get_string(val);
4
indices[ii] = presets_find_element(nested, name);
5
- if (indices[ii] == -1) return NULL;
6
+ if (indices[ii] == -1) {
7
+ g_free(indices);
8
+ return NULL;
9
+ }
10
dict = ghb_array_get_nth(nested, indices[ii]);
11
folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder"));
12
nested = NULL;
13
14
if (presets == NULL)
15
{
16
g_warning("Failed to find parent folder when adding child.");
17
+ g_free(more_indices);
18
return;
19
}
20
count = ghb_array_len(presets);
21
22
{"24", "24"},
23
{"25 (PAL Film/Video)", "25"},
24
{"29.97 (NTSC Video)", "29.97"},
25
+ {"30", "30"},
26
+ {"50", "50"},
27
+ {"59.94", "59.94"},
28
+ {"60", "60"},
29
{NULL, NULL}
30
};
31
32
HandBrake-0.9.6.tar.bz2/gtk/src/queuehandler.c -> HandBrake-0.9.8.tar.bz2/gtk/src/queuehandler.c
Changed
35
1
2
if (strcmp("source", fps) == 0)
3
{
4
g_free(fps);
5
- if (ghb_settings_combo_int(settings, "PictureDetelecine"))
6
- fps = g_strdup("Same As Source (vfr detelecine)");
7
+ if (ghb_settings_get_boolean(settings, "VideoFramerateCFR"))
8
+ fps = g_strdup("Same As Source (constant)");
9
else
10
fps = g_strdup("Same As Source (variable)");
11
}
12
else
13
{
14
- gchar *tmp;
15
- tmp = g_strdup_printf("%s (constant frame rate)", fps);
16
- g_free(fps);
17
- fps = tmp;
18
+ if (ghb_settings_get_boolean(settings, "VideoFrameratePFR"))
19
+ {
20
+ gchar *tmp;
21
+ tmp = g_strdup_printf("Peak %s (may be lower)", fps);
22
+ g_free(fps);
23
+ fps = tmp;
24
+ }
25
+ else
26
+ {
27
+ gchar *tmp;
28
+ tmp = g_strdup_printf("%s (constant frame rate)", fps);
29
+ g_free(fps);
30
+ fps = tmp;
31
+ }
32
}
33
source_width = ghb_settings_get_int(settings, "source_width");
34
source_height = ghb_settings_get_int(settings, "source_height");
35
HandBrake-0.9.6.tar.bz2/gtk/src/standard_presets.xml -> HandBrake-0.9.8.tar.bz2/gtk/src/standard_presets.xml
Changed
161
1
2
<key>PictureTopCrop</key>
3
<integer>0</integer>
4
<key>PictureWidth</key>
5
- <integer>1024</integer>
6
+ <integer>1280</integer>
7
<key>PresetDescription</key>
8
- <string>HandBrake's preset for the iPad (1st gen) is optimized for viewing on its 1024x768 display.</string>
9
+ <string>HandBrake's preset for the iPad (all generations) is optimized for a good balance between quality and filesize.</string>
10
<key>PresetName</key>
11
<string>iPad</string>
12
<key>Subtitles</key>
13
14
<array>
15
<dict>
16
<key>AudioBitrate</key>
17
+ <string>160</string>
18
+ <key>AudioEncoder</key>
19
+ <string>AAC (faac)</string>
20
+ <key>AudioMixdown</key>
21
+ <string>Dolby Pro Logic II</string>
22
+ <key>AudioSamplerate</key>
23
+ <string>Auto</string>
24
+ <key>AudioTrack</key>
25
+ <integer>1</integer>
26
+ <key>AudioTrackDRCSlider</key>
27
+ <real>0.0</real>
28
+ </dict>
29
+ <dict>
30
+ <key>AudioBitrate</key>
31
+ <string>160</string>
32
+ <key>AudioEncoder</key>
33
+ <string>AC3 Passthru</string>
34
+ <key>AudioMixdown</key>
35
+ <string>None</string>
36
+ <key>AudioSamplerate</key>
37
+ <string>Auto</string>
38
+ <key>AudioTrack</key>
39
+ <integer>1</integer>
40
+ <key>AudioTrackDRCSlider</key>
41
+ <real>0.0</real>
42
+ </dict>
43
+ </array>
44
+ <key>ChapterMarkers</key>
45
+ <integer>1</integer>
46
+ <key>Default</key>
47
+ <integer>0</integer>
48
+ <key>FileFormat</key>
49
+ <string>MP4 file</string>
50
+ <key>Folder</key>
51
+ <false/>
52
+ <key>Mp4LargeFile</key>
53
+ <integer>1</integer>
54
+ <key>PictureAutoCrop</key>
55
+ <integer>1</integer>
56
+ <key>PictureBottomCrop</key>
57
+ <integer>0</integer>
58
+ <key>PictureDeblock</key>
59
+ <integer>0</integer>
60
+ <key>PictureDecomb</key>
61
+ <integer>3</integer>
62
+ <key>PictureDecombDeinterlace</key>
63
+ <integer>1</integer>
64
+ <key>PictureDeinterlace</key>
65
+ <integer>0</integer>
66
+ <key>PictureDenoise</key>
67
+ <integer>0</integer>
68
+ <key>PictureDetelecine</key>
69
+ <integer>0</integer>
70
+ <key>PictureHeight</key>
71
+ <integer>0</integer>
72
+ <key>PictureKeepRatio</key>
73
+ <integer>0</integer>
74
+ <key>PictureLeftCrop</key>
75
+ <integer>0</integer>
76
+ <key>PictureModulus</key>
77
+ <integer>2</integer>
78
+ <key>PicturePAR</key>
79
+ <integer>2</integer>
80
+ <key>PictureRightCrop</key>
81
+ <integer>0</integer>
82
+ <key>PictureTopCrop</key>
83
+ <integer>0</integer>
84
+ <key>PictureWidth</key>
85
+ <integer>1920</integer>
86
+ <key>PresetDescription</key>
87
+ <string>HandBrake's preset for the Apple TV (3rd gen) is optimized for up to 1080p playback.</string>
88
+ <key>PresetName</key>
89
+ <string>AppleTV 3</string>
90
+ <key>Subtitles</key>
91
+ <string>None</string>
92
+ <key>Type</key>
93
+ <integer>0</integer>
94
+ <key>UsesPictureFilters</key>
95
+ <integer>1</integer>
96
+ <key>UsesPictureSettings</key>
97
+ <integer>1</integer>
98
+ <key>VideoAvgBitrate</key>
99
+ <string>2500</string>
100
+ <key>VideoEncoder</key>
101
+ <string>H.264 (x264)</string>
102
+ <key>VideoFramerate</key>
103
+ <string>30</string>
104
+ <key>VideoFramerateMode</key>
105
+ <string>pfr</string>
106
+ <key>VideoGrayScale</key>
107
+ <integer>0</integer>
108
+ <key>VideoQualitySlider</key>
109
+ <real>20</real>
110
+ <key>VideoQualityType</key>
111
+ <integer>2</integer>
112
+ <key>VideoTwoPass</key>
113
+ <integer>0</integer>
114
+ <key>x264Option</key>
115
+ <string>b-adapt=2</string>
116
+ </dict>
117
+ <dict>
118
+ <key>AudioList</key>
119
+ <array>
120
+ <dict>
121
+ <key>AudioBitrate</key>
122
<string>128</string>
123
<key>AudioEncoder</key>
124
<string>AAC (faac)</string>
125
126
<key>Folder</key>
127
<true/>
128
<key>PresetBuildNumber</key>
129
- <integer>2011072401</integer>
130
+ <integer>2012041101</integer>
131
<key>PresetName</key>
132
<string>Devices</string>
133
<key>Type</key>
134
135
<key>PictureDenoise</key>
136
<integer>0</integer>
137
<key>PictureDetelecine</key>
138
- <integer>2</integer>
139
+ <integer>0</integer>
140
<key>PictureHeight</key>
141
<integer>0</integer>
142
<key>PictureKeepRatio</key>
143
144
<key>Folder</key>
145
<true/>
146
<key>PresetBuildNumber</key>
147
- <integer>2011072401</integer>
148
+ <integer>2012041101</integer>
149
<key>PresetName</key>
150
<string>Regular</string>
151
<key>Type</key>
152
153
<key>Folder</key>
154
<true/>
155
<key>PresetBuildNumber</key>
156
- <integer>2011072401</integer>
157
+ <integer>2012041101</integer>
158
<key>PresetName</key>
159
<string>Legacy</string>
160
<key>Type</key>
161
HandBrake-0.9.6.tar.bz2/libhb/common.c -> HandBrake-0.9.8.tar.bz2/libhb/common.c
Changed
11
1
2
hb_rate_t hb_video_rates[] =
3
{ { "5", 5400000 }, { "10", 2700000 }, { "12", 2250000 },
4
{ "15", 1800000 }, { "23.976", 1126125 }, { "24", 1125000 },
5
- { "25", 1080000 }, { "29.97", 900900 } };
6
+ { "25", 1080000 }, { "29.97", 900900 }, { "30", 900000 },
7
+ { "50", 540000 }, { "59.94", 450450 }, { "60", 450000 } };
8
int hb_video_rates_count = sizeof( hb_video_rates ) /
9
sizeof( hb_rate_t );
10
11
HandBrake-0.9.6.tar.bz2/libhb/deca52.c -> HandBrake-0.9.8.tar.bz2/libhb/deca52.c
Changed
17
1
2
buf = hb_buffer_init( size );
3
memcpy( buf->data, pv->frame, size );
4
buf->start = pts;
5
+ buf->duration = frame_dur;
6
pts += frame_dur;
7
buf->stop = pts;
8
pv->next_expected_pts = pts;
9
10
/* 6 blocks per frame, 256 samples per block, channelsused channels */
11
buf = hb_buffer_init( 6 * 256 * pv->out_discrete_channels * sizeof( float ) );
12
buf->start = pts;
13
+ buf->duration = frame_dur;
14
pts += frame_dur;
15
buf->stop = pts;
16
pv->next_expected_pts = pts;
17
HandBrake-0.9.6.tar.bz2/libhb/decavcodec.c -> HandBrake-0.9.8.tar.bz2/libhb/decavcodec.c
Changed
38
1
2
int pos = 0;
3
int loop_limit = 256;
4
5
- if ( pts != -1 )
6
+ // If we are givn a pts, use it.
7
+ // But don't loose partial ticks.
8
+ if ( pts != -1 && (int64_t)pv->pts_next != pts )
9
pv->pts_next = pts;
10
while ( pos < size )
11
{
12
13
{
14
int isamp = av_get_bytes_per_sample( context->sample_fmt );
15
nsamples = out_size / isamp;
16
- double pts_next = pv->pts_next + nsamples * pv->duration;
17
+ double duration = nsamples * pv->duration;
18
+ double pts_next = pv->pts_next + duration;
19
20
// DTS-HD can be passed through to mkv
21
if( audio->config.out.codec & HB_ACODEC_PASS_FLAG )
22
23
buf = hb_buffer_init( avp.size );
24
memcpy( buf->data, avp.data, avp.size );
25
buf->start = pv->pts_next;
26
+ buf->duration = duration;
27
buf->stop = pts_next;
28
hb_list_add( pv->list, buf );
29
pv->pts_next = pts_next;
30
31
hb_buffer_t * buf;
32
buf = downmixAudio( audio, pv, buffer, context->channels, nsamples );
33
buf->start = pv->pts_next;
34
+ buf->duration = duration;
35
buf->stop = pts_next;
36
hb_list_add( pv->list, buf );
37
38
HandBrake-0.9.6.tar.bz2/libhb/decdca.c -> HandBrake-0.9.8.tar.bz2/libhb/decdca.c
Changed
23
1
2
buf = hb_buffer_init( pv->size );
3
memcpy( buf->data, pv->frame, pv->size );
4
buf->start = pts;
5
+ buf->duration = frame_dur;
6
pv->next_pts = pts + frame_dur;
7
buf->stop = pv->next_pts;
8
pv->sync = 0;
9
10
11
/* num_blocks blocks per frame, 256 samples per block, channelsused channels */
12
int nsamp = num_blocks * 256;
13
+ frame_dur = (double)nsamp / (double)pv->rate * 90000.;
14
buf = hb_buffer_init( nsamp * pv->out_discrete_channels * sizeof( float ) );
15
16
buf->start = pts;
17
- pv->next_pts = pts + (double)nsamp / (double)pv->rate * 90000.;
18
+ buf->duration = frame_dur;
19
+ pv->next_pts = pts + frame_dur;
20
buf->stop = pv->next_pts;
21
22
for( i = 0; i < num_blocks; i++ )
23
HandBrake-0.9.6.tar.bz2/libhb/declpcm.c -> HandBrake-0.9.8.tar.bz2/libhb/declpcm.c
Changed
9
1
2
out = hb_buffer_init( pv->samples * sizeof( float ) );
3
4
out->start = pv->next_pts;
5
+ out->duration = pv->duration;
6
pv->next_pts += pv->duration;
7
out->stop = pv->next_pts;
8
9
HandBrake-0.9.6.tar.bz2/libhb/decomb.c -> HandBrake-0.9.8.tar.bz2/libhb/decomb.c
Changed
54
1
2
for( i = 0; i < 3; i++ )
3
{
4
int is_chroma = !!i;
5
- int w = ((width + 31) & (~31))>>is_chroma;
6
- int h = ((height+6+ 31) & (~31))>>is_chroma;
7
+ int w = ((width >>is_chroma) + 31) & (~31);
8
+ int h = ((height>>is_chroma)+6+ 31) & (~31);
9
10
pv->ref_stride[i] = w;
11
12
13
for( i = 0; i < 3; i++ )
14
{
15
int is_chroma = !!i;
16
- int w = ((pv->width[0] + 31) & (~31))>>is_chroma;
17
- int h = ((pv->height[0]+6+ 31) & (~31))>>is_chroma;
18
+ int w = ((width >>is_chroma) + 31) & (~31);
19
+ int h = ((height>>is_chroma)+6+ 31) & (~31);
20
21
pv->mask[i] = calloc( 1, w*h*sizeof(uint8_t) ) + 3*w;
22
pv->mask_filtered[i] = calloc( 1, w*h*sizeof(uint8_t) ) + 3*w;
23
24
if( pv->mode & MODE_EEDI2 )
25
{
26
/* Allocate half-height eedi2 buffers */
27
- height = pv->height[0] / 2;
28
+ int half_h = height / 2;
29
for( i = 0; i < 3; i++ )
30
{
31
int is_chroma = !!i;
32
- int w = ((width + 31) & (~31))>>is_chroma;
33
- int h = ((height+6+ 31) & (~31))>>is_chroma;
34
+ int w = ((width>>is_chroma) + 31) & (~31);
35
+ int h = ((half_h>>is_chroma)+ 6 + 31) & (~31);
36
37
for( j = 0; j < 4; j++ )
38
{
39
40
}
41
42
/* Allocate full-height eedi2 buffers */
43
- height = pv->height[0];
44
for( i = 0; i < 3; i++ )
45
{
46
int is_chroma = !!i;
47
- int w = ((width + 31) & (~31))>>is_chroma;
48
- int h = ((height+6+ 31) & (~31))>>is_chroma;
49
+ int w = ((width >>is_chroma) + 31) & (~31);
50
+ int h = ((height>>is_chroma)+6+ 31) & (~31);
51
52
for( j = 0; j < 5; j++ )
53
{
54
HandBrake-0.9.6.tar.bz2/libhb/deinterlace.c -> HandBrake-0.9.8.tar.bz2/libhb/deinterlace.c
Changed
58
1
2
avpicture_fill( &pv->pic_out, pv->buf_out[0]->data,
3
pix_fmt, width, height );
4
5
- avpicture_deinterlace( &pv->pic_out, &pv->pic_in,
6
- pix_fmt, width, height );
7
+ if ( ( width & 7 ) || ( height & 7 ) )
8
+ {
9
+ // avpicture_deinterlace requires 8 pixel aligned dimensions
10
+ // so we are going to have to do some buffer copying
11
+ int aligned_width = ((width + 7) & ~7);
12
+ int aligned_height = ((height + 7) & ~7);
13
+ uint8_t * buf1, * buf2;
14
+ AVPicture pic_in, pic_out;
15
+ int i, p;
16
+
17
+ buf1 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P,
18
+ aligned_width, aligned_height ) );
19
+ buf2 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P,
20
+ aligned_width, aligned_height ) );
21
+ avpicture_fill( &pic_in, buf1, PIX_FMT_YUV420P,
22
+ aligned_width, aligned_height );
23
+ avpicture_fill( &pic_out, buf2, PIX_FMT_YUV420P,
24
+ aligned_width, aligned_height );
25
+ for (p = 0; p < 3; p++)
26
+ {
27
+ int h = !p ? height : height >> 1;
28
+ for (i = 0; i < h; i++)
29
+ {
30
+ memcpy(pic_in.data[p] + pic_in.linesize[p] * i,
31
+ pv->pic_in.data[p] + pv->pic_in.linesize[p] * i,
32
+ pv->pic_in.linesize[p]);
33
+ }
34
+ }
35
+ avpicture_deinterlace( &pic_out, &pic_in,
36
+ pix_fmt, aligned_width, aligned_height );
37
+ for (p = 0; p < 3; p++)
38
+ {
39
+ int h = !p ? height : height >> 1;
40
+ for (i = 0; i < h; i++)
41
+ {
42
+ memcpy(pv->pic_out.data[p] + pv->pic_out.linesize[p] * i,
43
+ pic_out.data[p] + pic_out.linesize[p] * i,
44
+ pv->pic_out.linesize[p]);
45
+ }
46
+ }
47
+ avpicture_free( &pic_in );
48
+ avpicture_free( &pic_out );
49
+ }
50
+ else
51
+ {
52
+ avpicture_deinterlace( &pv->pic_out, &pv->pic_in,
53
+ pix_fmt, width, height );
54
+ }
55
56
hb_buffer_copy_settings( pv->buf_out[0], buf_in );
57
58
HandBrake-0.9.6.tar.bz2/libhb/demuxmpeg.c -> HandBrake-0.9.8.tar.bz2/libhb/demuxmpeg.c
Changed
17
1
2
buf = tmp;
3
continue;
4
}
5
+ else
6
+ {
7
+ // Some streams have no PCRs. In these cases, we
8
+ // will only get an "PCR" update if a large change
9
+ // in DTS or PTS is detected. So we need to update
10
+ // our scr_delta with each valid timestamp so that
11
+ // fdelta does not continually grow.
12
+ state->scr_delta = buf->start - state->last_scr;
13
+ }
14
if ( state->last_pts >= 0 )
15
{
16
fdelta = buf->start - state->last_pts;
17
HandBrake-0.9.6.tar.bz2/libhb/dvd.c -> HandBrake-0.9.8.tar.bz2/libhb/dvd.c
Changed
19
1
2
fail:
3
if( d->vmg ) ifoClose( d->vmg );
4
if( d->reader ) DVDClose( d->reader );
5
- free( d );
6
+ free( e );
7
return NULL;
8
}
9
10
11
12
hb_log("pgc_id: %d, pgn: %d: pgc: %p", pgc_id, pgn, d->pgc);
13
14
- if( !d->pgc )
15
+ if( !d->pgc || !d->pgc->program_map )
16
{
17
hb_error( "scan: pgc not valid, skipping" );
18
goto fail;
19
HandBrake-0.9.6.tar.bz2/libhb/hb.c -> HandBrake-0.9.8.tar.bz2/libhb/hb.c
Changed
279
1
2
hb_job_t * job = title->job;
3
char filename[1024];
4
FILE * file;
5
- uint8_t * buf1, * buf2, * buf3, * buf4, * pen;
6
+ uint8_t * buf1, * buf2, * buf3, * pen;
7
uint32_t swsflags;
8
- AVPicture pic_in, pic_preview, pic_deint, pic_crop, pic_scale;
9
+ AVPicture pic_in, pic_preview, pic_deint, pic_crop;
10
struct SwsContext * context;
11
- int i;
12
- int deint_width = ((title->width + 7) >> 3) << 3;
13
- int rgb_width = ((job->width + 7) >> 3) << 3;
14
+ int i, p;
15
+ int aligned_width = ((title->width + 7) & ~7);
16
+ int aligned_height = ((title->height + 7) & ~7);
17
int preview_size;
18
19
swsflags = SWS_LANCZOS | SWS_ACCURATE_RND;
20
21
- buf1 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height ) );
22
- buf2 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, deint_width, title->height ) );
23
- buf3 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, rgb_width, job->height ) );
24
- buf4 = av_malloc( avpicture_get_size( PIX_FMT_RGB32, rgb_width, job->height ) );
25
+ buf1 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, aligned_width, aligned_height ) );
26
+ buf2 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, aligned_width, aligned_height ) );
27
+ buf3 = av_malloc( avpicture_get_size( PIX_FMT_RGB32, job->width, job->height ) );
28
avpicture_fill( &pic_in, buf1, PIX_FMT_YUV420P,
29
- title->width, title->height );
30
+ aligned_width, aligned_height );
31
avpicture_fill( &pic_deint, buf2, PIX_FMT_YUV420P,
32
- deint_width, title->height );
33
- avpicture_fill( &pic_scale, buf3, PIX_FMT_YUV420P,
34
- rgb_width, job->height );
35
- avpicture_fill( &pic_preview, buf4, PIX_FMT_RGB32,
36
- rgb_width, job->height );
37
+ aligned_width, aligned_height );
38
+ avpicture_fill( &pic_preview, buf3, PIX_FMT_RGB32,
39
+ job->width, job->height );
40
41
// Allocate the AVPicture frames and fill in
42
43
44
return;
45
}
46
47
- fread( buf1, avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height), 1, file );
48
+ for (p = 0; p < 3; p++)
49
+ {
50
+ int w = !p ? title->width : title->width >> 1;
51
+ int h = !p ? title->height : title->height >> 1;
52
+ pen = pic_in.data[p];
53
+ for (i = 0; i < h; i++)
54
+ {
55
+ fread( pen, w, 1, file );
56
+ pen += pic_in.linesize[p];
57
+ }
58
+ }
59
fclose( file );
60
61
if( job->deinterlace )
62
{
63
// Deinterlace and crop
64
- avpicture_deinterlace( &pic_deint, &pic_in, PIX_FMT_YUV420P, title->width, title->height );
65
+ avpicture_deinterlace( &pic_deint, &pic_in, PIX_FMT_YUV420P, aligned_width, aligned_height );
66
av_picture_crop( &pic_crop, &pic_deint, PIX_FMT_YUV420P, job->crop[0], job->crop[2] );
67
}
68
else
69
70
context = hb_sws_get_context(title->width - (job->crop[2] + job->crop[3]),
71
title->height - (job->crop[0] + job->crop[1]),
72
PIX_FMT_YUV420P,
73
- job->width, job->height, PIX_FMT_YUV420P,
74
+ job->width, job->height, PIX_FMT_RGB32,
75
swsflags);
76
77
// Scale
78
sws_scale(context,
79
(const uint8_t* const *)pic_crop.data, pic_crop.linesize,
80
0, title->height - (job->crop[0] + job->crop[1]),
81
- pic_scale.data, pic_scale.linesize);
82
-
83
- // Free context
84
- sws_freeContext( context );
85
-
86
- // Get preview context
87
- context = hb_sws_get_context(rgb_width, job->height, PIX_FMT_YUV420P,
88
- rgb_width, job->height, PIX_FMT_RGB32,
89
- swsflags);
90
-
91
- // Create preview
92
- sws_scale(context,
93
- (const uint8_t* const *)pic_scale.data, pic_scale.linesize,
94
- 0, job->height,
95
pic_preview.data, pic_preview.linesize);
96
97
// Free context
98
99
pen = buffer;
100
for( i = 0; i < job->height; i++ )
101
{
102
- memcpy( pen, buf4 + preview_size * i, 4 * job->width );
103
+ memcpy( pen, buf3 + preview_size * i, 4 * job->width );
104
pen += 4 * job->width;
105
}
106
107
// Clean up
108
avpicture_free( &pic_preview );
109
- avpicture_free( &pic_scale );
110
avpicture_free( &pic_deint );
111
avpicture_free( &pic_in );
112
}
113
114
* @param prog_diff Sensitivity for detecting different colors on progressive frames
115
* @param prog_threshold Sensitivity for flagging progressive frames as combed
116
*/
117
-int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold )
118
+int hb_detect_comb( hb_buffer_t * buf, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold )
119
{
120
+ int width = buf->width;
121
+ int height = buf->height;
122
int j, k, n, off, cc_1, cc_2, cc[3];
123
// int flag[3] ; // debugging flag
124
uint16_t s1, s2, s3, s4;
125
126
int mod = job->modulus ? job->modulus : 16;
127
double aspect = title->aspect;
128
129
- int pixel_aspect_width = job->anamorphic.par_width;
130
- int pixel_aspect_height = job->anamorphic.par_height;
131
+ int64_t pixel_aspect_width = job->anamorphic.par_width;
132
+ int64_t pixel_aspect_height = job->anamorphic.par_height;
133
134
/* If a source was really NTSC or PAL and the user specified ITU PAR
135
values, replace the standard PAR values with the ITU broadcast ones. */
136
137
*output_height = MULTIPLE_MOD( cropped_height, 2 );
138
// adjust the source PAR for new width/height
139
// new PAR = source PAR * ( old width / new_width ) * ( new_height / old_height )
140
- pixel_aspect_width = title->pixel_aspect_width * cropped_width * (*output_height);
141
- pixel_aspect_height = title->pixel_aspect_height * (*output_width) * cropped_height;
142
+ pixel_aspect_width = (int64_t)title->pixel_aspect_width * cropped_width * (*output_height);
143
+ pixel_aspect_height = (int64_t)title->pixel_aspect_height * (*output_width) * cropped_height;
144
break;
145
146
case 2:
147
148
/* The film AR is the source's display width / cropped source height.
149
The output display width is the output height * film AR.
150
The output PAR is the output display width / output storage width. */
151
- int64_t par_w, par_h;
152
- par_w = (int64_t)height * cropped_width * pixel_aspect_width;
153
- par_h = (int64_t)width * cropped_height * pixel_aspect_height;
154
- hb_limit_rational64( &par_w, &par_h, par_w, par_h, 65535);
155
- pixel_aspect_width = par_w;
156
- pixel_aspect_height = par_h;
157
+ pixel_aspect_width = (int64_t)height * cropped_width * pixel_aspect_width;
158
+ pixel_aspect_height = (int64_t)width * cropped_height * pixel_aspect_height;
159
160
/* Pass the results back to the caller */
161
*output_width = width;
162
163
if( job->anamorphic.dar_width && job->anamorphic.dar_height )
164
{
165
/* We need to adjust the PAR to produce this aspect. */
166
- pixel_aspect_width = height * job->anamorphic.dar_width / job->anamorphic.dar_height;
167
+ pixel_aspect_width = (int64_t)height * job->anamorphic.dar_width / job->anamorphic.dar_height;
168
pixel_aspect_height = width;
169
}
170
else
171
172
if( job->anamorphic.keep_display_aspect )
173
{
174
/* We can ignore the possibility of a PAR change */
175
- pixel_aspect_width = height * ( (double)source_display_width / (double)cropped_height );
176
+ pixel_aspect_width = (int64_t)height * ( (double)source_display_width / (double)cropped_height );
177
pixel_aspect_height = width;
178
}
179
else
180
181
}
182
183
/* While x264 is smart enough to reduce fractions on its own, libavcodec
184
- needs some help with the math, so lose superfluous factors. */
185
+ * needs some help with the math, so lose superfluous factors. */
186
+ hb_limit_rational64( &pixel_aspect_width, &pixel_aspect_height,
187
+ pixel_aspect_width, pixel_aspect_height, 65535 );
188
hb_reduce( output_par_width, output_par_height,
189
pixel_aspect_width, pixel_aspect_height );
190
}
191
192
hb_title_t * title, * title_copy;
193
hb_chapter_t * chapter, * chapter_copy;
194
hb_audio_t * audio;
195
- hb_subtitle_t * subtitle, * subtitle_copy;
196
+ hb_subtitle_t * subtitle;
197
hb_attachment_t * attachment;
198
int i;
199
char audio_lang[4];
200
201
*/
202
memset( audio_lang, 0, sizeof( audio_lang ) );
203
204
- if ( job->indepth_scan ) {
205
+ if( job->indepth_scan )
206
+ {
207
208
- /*
209
- * Find the first audio language that is being encoded
210
- */
211
- for( i = 0; i < hb_list_count(job->list_audio); i++ )
212
+ /* Find the first audio language that is being encoded, then add all the
213
+ * matching subtitles for that language. */
214
+ for( i = 0; i < hb_list_count( job->list_audio ); i++ )
215
{
216
if( ( audio = hb_list_item( job->list_audio, i ) ) )
217
{
218
- strncpy(audio_lang, audio->config.lang.iso639_2, sizeof(audio_lang));
219
+ strncpy( audio_lang, audio->config.lang.iso639_2, sizeof( audio_lang ) );
220
break;
221
}
222
}
223
- }
224
-
225
- /*
226
- * If doing a subtitle scan then add all the matching subtitles for this
227
- * language.
228
- */
229
- if ( job->indepth_scan )
230
- {
231
- for( i=0; i < hb_list_count( title->list_subtitle ); i++ )
232
+ for( i = 0; i < hb_list_count( title->list_subtitle ); i++ )
233
{
234
subtitle = hb_list_item( title->list_subtitle, i );
235
if( strcmp( subtitle->iso639_2, audio_lang ) == 0 &&
236
subtitle->source == VOBSUB )
237
{
238
- /*
239
- * Matched subtitle language with audio language, so
240
+ /* Matched subtitle language with audio language, so
241
* add this to our list to scan.
242
*
243
* We will update the subtitle list on the second pass
244
- * later after the first pass has completed.
245
- */
246
- subtitle_copy = malloc( sizeof( hb_subtitle_t ) );
247
- memcpy( subtitle_copy, subtitle, sizeof( hb_subtitle_t ) );
248
- hb_list_add( title_copy->list_subtitle, subtitle_copy );
249
+ * later after the first pass has completed. */
250
+ hb_list_add( title_copy->list_subtitle, hb_subtitle_copy( subtitle ) );
251
}
252
}
253
- } else {
254
+ }
255
+ else
256
+ {
257
/*
258
* Not doing a subtitle scan in this pass, but maybe we are in the
259
* first pass?
260
*/
261
if( job->pass != 1 )
262
{
263
- /*
264
- * Copy all of them from the input job, to the title_copy/job_copy.
265
- */
266
- for( i = 0; i < hb_list_count(job->list_subtitle); i++ ) {
267
+ /* Copy all subtitles from the input job to title_copy/job_copy. */
268
+ for( i = 0; i < hb_list_count( job->list_subtitle ); i++ )
269
+ {
270
if( ( subtitle = hb_list_item( job->list_subtitle, i ) ) )
271
{
272
- subtitle_copy = malloc( sizeof( hb_subtitle_t ) );
273
- memcpy( subtitle_copy, subtitle, sizeof( hb_subtitle_t ) );
274
- hb_list_add( title_copy->list_subtitle, subtitle_copy );
275
+ hb_list_add( title_copy->list_subtitle, hb_subtitle_copy( subtitle ) );
276
}
277
}
278
}
279
HandBrake-0.9.6.tar.bz2/libhb/hb.h -> HandBrake-0.9.8.tar.bz2/libhb/hb.h
Changed
10
1
2
/* hb_detect_comb()
3
Analyze a frame for interlacing artifacts, returns true if they're found.
4
Taken from Thomas Oestreich's 32detect filter in the Transcode project. */
5
-int hb_detect_comb( hb_buffer_t * buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold );
6
+int hb_detect_comb( hb_buffer_t * buf, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold );
7
8
void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * );
9
void hb_get_preview( hb_handle_t *, hb_title_t *, int,
10
HandBrake-0.9.6.tar.bz2/libhb/internal.h -> HandBrake-0.9.8.tar.bz2/libhb/internal.h
Changed
24
1
2
3
int id; // ID of the track that the packet comes from
4
int64_t start; // Video and subtitle packets: start time of frame/subtitle
5
+ double duration; // Actual duration, may be fractional ticks
6
int64_t stop; // Video and subtitle packets: stop time of frame/subtitle
7
int64_t pcr;
8
uint8_t discontinuity;
9
10
// if we do "/2". The code here matches the calculation for
11
// PIX_FMT_YUV420P in ffmpeg's avpicture_fill() which is required
12
// for most of HB's filters to work right.
13
- return hb_buffer_init( width * height + ( ( width+1 ) >> 1 ) *
14
- ( ( height+1 ) >> 1 ) * 2 );
15
+ hb_buffer_t * b = hb_buffer_init( width * height + ( ( width+1 ) >> 1 ) *
16
+ ( ( height+1 ) >> 1 ) * 2 );
17
+ b->width = width;
18
+ b->height = height;
19
+
20
+ return b;
21
}
22
23
// this routine 'moves' data from src to dst by interchanging 'data',
24
HandBrake-0.9.6.tar.bz2/libhb/muxmkv.c -> HandBrake-0.9.8.tar.bz2/libhb/muxmkv.c
Changed
51
1
2
hb_error( "Could not create output file, Disk Full?" );
3
job->mux_data = NULL;
4
*job->die = 1;
5
+ free(track);
6
return 0;
7
}
8
9
10
/* Taken from x264 muxers.c */
11
avcC_len = 5 + 1 + 2 + job->config.h264.sps_length + 1 + 2 + job->config.h264.pps_length;
12
avcC = malloc(avcC_len);
13
- if (avcC == NULL)
14
+ if (avcC == NULL) {
15
+ free(track);
16
return -1;
17
+ }
18
19
avcC[0] = 1;
20
avcC[1] = job->config.h264.sps[1]; /* AVCProfileIndication */
21
22
default:
23
*job->die = 1;
24
hb_error("muxmkv: Unknown video codec: %x", job->vcodec);
25
+ free(track);
26
return 0;
27
}
28
29
30
// MKV lang codes should be ISO-639-2/B
31
lang = lang_for_code2( audio->config.lang.iso639_2 );
32
track->language = lang->iso639_2b ? lang->iso639_2b : lang->iso639_2;
33
- track->extra.audio.samplingFreq = (float)audio->config.out.samplerate;
34
+ // sample rate
35
+ if ((audio->config.out.codec == HB_ACODEC_CA_HAAC) ||
36
+ (audio->config.out.codec == HB_ACODEC_AAC_PASS &&
37
+ audio->config.in.samples_per_frame > 1024))
38
+ {
39
+ // For HE-AAC, write outputSamplingFreq too
40
+ // samplingFreq is half of outputSamplingFreq
41
+ track->extra.audio.outputSamplingFreq = (float)audio->config.out.samplerate;
42
+ track->extra.audio.samplingFreq = track->extra.audio.outputSamplingFreq / 2.;
43
+ }
44
+ else
45
+ {
46
+ track->extra.audio.samplingFreq = (float)audio->config.out.samplerate;
47
+ }
48
if (audio->config.out.codec & HB_ACODEC_PASS_FLAG)
49
{
50
track->extra.audio.channels = HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT(audio->config.in.channel_layout);
51
HandBrake-0.9.6.tar.bz2/libhb/platform/macosx/encca_aac.c -> HandBrake-0.9.8.tar.bz2/libhb/platform/macosx/encca_aac.c
Changed
608
1
2
3
enum AAC_MODE { AAC_MODE_LC, AAC_MODE_HE };
4
5
-int encCoreAudioInitLC( hb_work_object_t *, hb_job_t * );
6
-int encCoreAudioInitHE( hb_work_object_t *, hb_job_t * );
7
-int encCoreAudioInit( hb_work_object_t *, hb_job_t *, enum AAC_MODE mode );
8
-int encCoreAudioWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
9
-void encCoreAudioClose( hb_work_object_t * );
10
+int encCoreAudioInitLC(hb_work_object_t*, hb_job_t*);
11
+int encCoreAudioInitHE(hb_work_object_t*, hb_job_t*);
12
+int encCoreAudioInit(hb_work_object_t*, hb_job_t*, enum AAC_MODE mode);
13
+int encCoreAudioWork(hb_work_object_t*, hb_buffer_t**, hb_buffer_t**);
14
+void encCoreAudioClose(hb_work_object_t*);
15
16
hb_work_object_t hb_encca_aac =
17
{
18
19
20
struct hb_work_private_s
21
{
22
+ uint8_t *buf;
23
hb_job_t *job;
24
+ hb_list_t *list;
25
26
AudioConverterRef converter;
27
- uint8_t *obuf;
28
- uint8_t *buf;
29
- hb_list_t *list;
30
unsigned long isamples, isamplesiz, omaxpacket, nchannels;
31
uint64_t pts, ibytes;
32
Float64 osamplerate;
33
+
34
int layout;
35
hb_chan_map_t *ichanmap;
36
};
37
38
{
39
int len = 0;
40
int count = 4;
41
- while (count--) {
42
+ while (count--)
43
+ {
44
int c = *(*buffer)++;
45
len = (len << 7) | (c & 0x7f);
46
if (!(c & 0x80))
47
48
// based off of mov_read_esds from mov.c in ffmpeg's libavformat
49
static long ReadESDSDescExt(void* descExt, UInt8 **buffer, UInt32 *size, int versionFlags)
50
{
51
- UInt8 *esds = (UInt8 *) descExt;
52
+ UInt8 *esds = (UInt8*)descExt;
53
int tag, len;
54
*size = 0;
55
56
if (versionFlags)
57
- esds += 4; // version + flags
58
+ esds += 4; // version + flags
59
readDescr(&esds, &tag);
60
- esds += 2; // ID
61
+ esds += 2; // ID
62
if (tag == MP4ESDescrTag)
63
- esds++; // priority
64
+ esds++; // priority
65
66
readDescr(&esds, &tag);
67
- if (tag == MP4DecConfigDescrTag) {
68
- esds++; // object type id
69
- esds++; // stream type
70
- esds += 3; // buffer size db
71
- esds += 4; // max bitrate
72
- esds += 4; // average bitrate
73
+ if (tag == MP4DecConfigDescrTag)
74
+ {
75
+ esds++; // object type id
76
+ esds++; // stream type
77
+ esds += 3; // buffer size db
78
+ esds += 4; // max bitrate
79
+ esds += 4; // average bitrate
80
81
len = readDescr(&esds, &tag);
82
- if (tag == MP4DecSpecificDescrTag) {
83
+ if (tag == MP4DecSpecificDescrTag)
84
+ {
85
*buffer = calloc(1, len + 8);
86
- if (*buffer) {
87
+ if (*buffer)
88
+ {
89
memcpy(*buffer, esds, len);
90
*size = len;
91
}
92
93
***********************************************************************
94
*
95
**********************************************************************/
96
-int encCoreAudioInitLC( hb_work_object_t * w, hb_job_t * job )
97
+int encCoreAudioInitLC(hb_work_object_t *w, hb_job_t *job)
98
{
99
- return encCoreAudioInit( w, job, AAC_MODE_LC );
100
+ return encCoreAudioInit(w, job, AAC_MODE_LC);
101
}
102
103
-int encCoreAudioInitHE( hb_work_object_t * w, hb_job_t * job )
104
+int encCoreAudioInitHE(hb_work_object_t *w, hb_job_t *job)
105
{
106
- return encCoreAudioInit( w, job, AAC_MODE_HE );
107
+ return encCoreAudioInit(w, job, AAC_MODE_HE);
108
}
109
110
/***********************************************************************
111
112
***********************************************************************
113
*
114
**********************************************************************/
115
-int encCoreAudioInit( hb_work_object_t * w, hb_job_t * job, enum AAC_MODE mode )
116
+int encCoreAudioInit(hb_work_object_t *w, hb_job_t *job, enum AAC_MODE mode)
117
{
118
- hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
119
- hb_audio_t * audio = w->audio;
120
+ hb_work_private_t *pv = calloc(1, sizeof(hb_work_private_t));
121
+ hb_audio_t *audio = w->audio;
122
AudioStreamBasicDescription input, output;
123
- UInt32 tmp, tmpsiz = sizeof( tmp );
124
+ UInt32 tmp, tmpsiz = sizeof(tmp);
125
OSStatus err;
126
127
w->private_data = pv;
128
pv->job = job;
129
130
// pass the number of channels used into the private work data
131
- pv->nchannels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT( audio->config.out.mixdown );
132
+ pv->nchannels =
133
+ HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
134
135
- bzero( &input, sizeof( AudioStreamBasicDescription ) );
136
- input.mSampleRate = ( Float64 ) audio->config.out.samplerate;
137
+ bzero(&input, sizeof(AudioStreamBasicDescription));
138
+ input.mSampleRate = (Float64)audio->config.out.samplerate;
139
input.mFormatID = kAudioFormatLinearPCM;
140
- input.mFormatFlags = kLinearPCMFormatFlagIsFloat | kAudioFormatFlagsNativeEndian;
141
+ input.mFormatFlags = (kLinearPCMFormatFlagIsFloat|kAudioFormatFlagsNativeEndian);
142
input.mBytesPerPacket = 4 * pv->nchannels;
143
input.mFramesPerPacket = 1;
144
input.mBytesPerFrame = input.mBytesPerPacket * input.mFramesPerPacket;
145
input.mChannelsPerFrame = pv->nchannels;
146
input.mBitsPerChannel = 32;
147
148
- bzero( &output, sizeof( AudioStreamBasicDescription ) );
149
- switch ( mode )
150
+ bzero(&output, sizeof(AudioStreamBasicDescription));
151
+ switch (mode)
152
{
153
case AAC_MODE_HE:
154
output.mFormatID = kAudioFormatMPEG4AAC_HE;
155
156
output.mFormatID = kAudioFormatMPEG4AAC;
157
break;
158
}
159
- output.mSampleRate = ( Float64 ) audio->config.out.samplerate;
160
+ output.mSampleRate = (Float64)audio->config.out.samplerate;
161
output.mChannelsPerFrame = pv->nchannels;
162
- // let CoreAudio decide the rest...
163
+ // let CoreAudio decide the rest
164
165
// initialise encoder
166
- err = AudioConverterNew( &input, &output, &pv->converter );
167
- if( err != noErr)
168
+ err = AudioConverterNew(&input, &output, &pv->converter);
169
+ if (err != noErr)
170
{
171
// Retry without the samplerate
172
- bzero( &output, sizeof( AudioStreamBasicDescription ) );
173
- switch ( mode )
174
+ bzero(&output, sizeof(AudioStreamBasicDescription));
175
+ switch (mode)
176
{
177
case AAC_MODE_HE:
178
output.mFormatID = kAudioFormatMPEG4AAC_HE;
179
180
}
181
output.mChannelsPerFrame = pv->nchannels;
182
183
- err = AudioConverterNew( &input, &output, &pv->converter );
184
+ err = AudioConverterNew(&input, &output, &pv->converter);
185
186
- if( err != noErr)
187
+ if (err != noErr)
188
{
189
- hb_log( "Error creating an AudioConverter err=%"PRId64" %"PRIu64, (int64_t)err, (uint64_t)output.mBytesPerFrame );
190
+ hb_log("Error creating an AudioConverter err=%"PRId64" output.mBytesPerFrame=%"PRIu64"",
191
+ (int64_t)err, (uint64_t)output.mBytesPerFrame);
192
*job->die = 1;
193
- return 0;
194
+ return -1;
195
}
196
}
197
198
// set encoder quality to maximum
199
tmp = kAudioConverterQuality_Max;
200
- AudioConverterSetProperty( pv->converter, kAudioConverterCodecQuality,
201
- sizeof( tmp ), &tmp );
202
+ AudioConverterSetProperty(pv->converter, kAudioConverterCodecQuality,
203
+ sizeof(tmp), &tmp);
204
205
- if( audio->config.out.bitrate > 0 )
206
+ if (audio->config.out.bitrate > 0)
207
{
208
// set encoder bitrate control mode to constrained variable
209
tmp = kAudioCodecBitRateControlMode_VariableConstrained;
210
- AudioConverterSetProperty( pv->converter, kAudioCodecPropertyBitRateControlMode,
211
- sizeof( tmp ), &tmp );
212
+ AudioConverterSetProperty(pv->converter, kAudioCodecPropertyBitRateControlMode,
213
+ sizeof(tmp), &tmp);
214
215
// get available bitrates
216
AudioValueRange *bitrates;
217
ssize_t bitrateCounts;
218
- err = AudioConverterGetPropertyInfo( pv->converter, kAudioConverterApplicableEncodeBitRates,
219
- &tmpsiz, NULL);
220
- bitrates = malloc( tmpsiz );
221
- err = AudioConverterGetProperty( pv->converter, kAudioConverterApplicableEncodeBitRates,
222
- &tmpsiz, bitrates);
223
- bitrateCounts = tmpsiz / sizeof( AudioValueRange );
224
+ err = AudioConverterGetPropertyInfo(pv->converter, kAudioConverterApplicableEncodeBitRates,
225
+ &tmpsiz, NULL);
226
+ bitrates = malloc(tmpsiz);
227
+ err = AudioConverterGetProperty(pv->converter, kAudioConverterApplicableEncodeBitRates,
228
+ &tmpsiz, bitrates);
229
+ bitrateCounts = tmpsiz / sizeof(AudioValueRange);
230
231
// set bitrate
232
tmp = audio->config.out.bitrate * 1000;
233
- if( tmp < bitrates[0].mMinimum )
234
+ if (tmp < bitrates[0].mMinimum)
235
tmp = bitrates[0].mMinimum;
236
- if( tmp > bitrates[bitrateCounts-1].mMinimum )
237
+ if (tmp > bitrates[bitrateCounts-1].mMinimum)
238
tmp = bitrates[bitrateCounts-1].mMinimum;
239
- free( bitrates );
240
- if( tmp != audio->config.out.bitrate * 1000 )
241
- hb_log( "encca_aac: sanitizing track %d audio bitrate %d to %"PRIu32"",
242
- audio->config.out.track, audio->config.out.bitrate, tmp/1000 );
243
- AudioConverterSetProperty( pv->converter, kAudioConverterEncodeBitRate,
244
- sizeof( tmp ), &tmp );
245
+ free(bitrates);
246
+ if (tmp != audio->config.out.bitrate * 1000)
247
+ hb_log("encca_aac: sanitizing track %d audio bitrate %d to %"PRIu32"",
248
+ audio->config.out.track, audio->config.out.bitrate, tmp / 1000);
249
+ AudioConverterSetProperty(pv->converter, kAudioConverterEncodeBitRate,
250
+ sizeof(tmp), &tmp);
251
}
252
- else if( audio->config.out.quality >= 0 )
253
+ else if (audio->config.out.quality >= 0)
254
{
255
- if( mode != AAC_MODE_LC )
256
+ if (mode != AAC_MODE_LC)
257
{
258
- hb_log( "encCoreAudioInit: internal error, VBR set but not applicable" );
259
+ hb_log("encCoreAudioInit: internal error, VBR set but not applicable");
260
return 1;
261
}
262
// set encoder bitrate control mode to variable
263
tmp = kAudioCodecBitRateControlMode_Variable;
264
- AudioConverterSetProperty( pv->converter, kAudioCodecPropertyBitRateControlMode,
265
- sizeof( tmp ), &tmp );
266
+ AudioConverterSetProperty(pv->converter, kAudioCodecPropertyBitRateControlMode,
267
+ sizeof(tmp), &tmp);
268
269
// set quality
270
tmp = audio->config.out.quality;
271
- AudioConverterSetProperty( pv->converter, kAudioCodecPropertySoundQualityForVBR,
272
- sizeof( tmp ), &tmp );
273
+ AudioConverterSetProperty(pv->converter, kAudioCodecPropertySoundQualityForVBR,
274
+ sizeof(tmp), &tmp);
275
}
276
else
277
{
278
- hb_log( "encCoreAudioInit: internal error, bitrate/quality not set" );
279
+ hb_log("encCoreAudioInit: internal error, bitrate/quality not set");
280
return 1;
281
}
282
283
// get real input
284
- tmpsiz = sizeof( input );
285
- AudioConverterGetProperty( pv->converter,
286
- kAudioConverterCurrentInputStreamDescription,
287
- &tmpsiz, &input );
288
+ tmpsiz = sizeof(input);
289
+ AudioConverterGetProperty(pv->converter,
290
+ kAudioConverterCurrentInputStreamDescription,
291
+ &tmpsiz, &input);
292
// get real output
293
- tmpsiz = sizeof( output );
294
- AudioConverterGetProperty( pv->converter,
295
- kAudioConverterCurrentOutputStreamDescription,
296
- &tmpsiz, &output );
297
+ tmpsiz = sizeof(output);
298
+ AudioConverterGetProperty(pv->converter,
299
+ kAudioConverterCurrentOutputStreamDescription,
300
+ &tmpsiz, &output);
301
302
// set sizes
303
pv->isamplesiz = input.mBytesPerPacket;
304
- pv->isamples = audio->config.out.samples_per_frame = output.mFramesPerPacket;
305
+ pv->isamples = output.mFramesPerPacket;
306
pv->osamplerate = output.mSampleRate;
307
+ audio->config.out.samples_per_frame = pv->isamples;
308
309
// set channel map and layout (for remapping)
310
pv->ichanmap = audio->config.in.channel_map;
311
- switch( audio->config.out.mixdown )
312
+ switch (audio->config.out.mixdown)
313
{
314
case HB_AMIXDOWN_MONO:
315
pv->layout = HB_INPUT_CH_LAYOUT_MONO;
316
317
}
318
319
// get maximum output size
320
- AudioConverterGetProperty( pv->converter,
321
- kAudioConverterPropertyMaximumOutputPacketSize,
322
- &tmpsiz, &tmp );
323
+ AudioConverterGetProperty(pv->converter,
324
+ kAudioConverterPropertyMaximumOutputPacketSize,
325
+ &tmpsiz, &tmp);
326
pv->omaxpacket = tmp;
327
328
// get magic cookie (elementary stream descriptor)
329
tmp = HB_CONFIG_MAX_SIZE;
330
- AudioConverterGetProperty( pv->converter,
331
- kAudioConverterCompressionMagicCookie,
332
- &tmp, w->config->extradata.bytes );
333
+ AudioConverterGetProperty(pv->converter,
334
+ kAudioConverterCompressionMagicCookie,
335
+ &tmp, w->config->extradata.bytes);
336
// CoreAudio returns a complete ESDS, but we only need
337
// the DecoderSpecific info.
338
UInt8* buffer = NULL;
339
ReadESDSDescExt(w->config->extradata.bytes, &buffer, &tmpsiz, 0);
340
w->config->extradata.length = tmpsiz;
341
- memmove( w->config->extradata.bytes, buffer,
342
- w->config->extradata.length );
343
+ memmove(w->config->extradata.bytes, buffer, w->config->extradata.length);
344
345
pv->list = hb_list_init();
346
pv->buf = NULL;
347
348
***********************************************************************
349
*
350
**********************************************************************/
351
-void encCoreAudioClose( hb_work_object_t * w )
352
+void encCoreAudioClose(hb_work_object_t *w)
353
{
354
- hb_work_private_t * pv = w->private_data;
355
+ hb_work_private_t *pv = w->private_data;
356
357
- if( pv->converter )
358
+ if (pv != NULL)
359
{
360
- AudioConverterDispose( pv->converter );
361
- hb_list_empty( &pv->list );
362
- free( pv->obuf );
363
- free( pv->buf );
364
- free( pv );
365
+ if (pv->converter)
366
+ {
367
+ AudioConverterDispose(pv->converter);
368
+ }
369
+ if (pv->buf != NULL)
370
+ {
371
+ free(pv->buf);
372
+ }
373
+ hb_list_empty(&pv->list);
374
+ free(pv);
375
w->private_data = NULL;
376
}
377
}
378
379
/* Called whenever necessary by AudioConverterFillComplexBuffer */
380
-static OSStatus inInputDataProc( AudioConverterRef converter, UInt32 *npackets,
381
- AudioBufferList *buffers,
382
- AudioStreamPacketDescription** ignored,
383
- void *userdata )
384
+static OSStatus inInputDataProc(AudioConverterRef converter, UInt32 *npackets,
385
+ AudioBufferList *buffers,
386
+ AudioStreamPacketDescription **ignored,
387
+ void *userdata)
388
{
389
hb_work_private_t *pv = userdata;
390
391
- if( pv->ibytes == 0 )
392
+ if (!pv->ibytes)
393
{
394
*npackets = 0;
395
- hb_log( "CoreAudio: no data to use in inInputDataProc" );
396
return 1;
397
}
398
399
- if( pv->buf != NULL )
400
- free( pv->buf );
401
+ if (pv->buf != NULL)
402
+ {
403
+ free(pv->buf);
404
+ }
405
406
- uint64_t pts, pos;
407
- buffers->mBuffers[0].mDataByteSize = MIN( *npackets * pv->isamplesiz, pv->ibytes );
408
- buffers->mBuffers[0].mData = pv->buf = calloc( 1, buffers->mBuffers[0].mDataByteSize );
409
+ buffers->mBuffers[0].mDataByteSize = MIN(pv->ibytes,
410
+ pv->isamplesiz * *npackets);
411
+ pv->buf = calloc(1, buffers->mBuffers[0].mDataByteSize);
412
+ buffers->mBuffers[0].mData = pv->buf;
413
414
- if( hb_list_bytes( pv->list ) >= buffers->mBuffers[0].mDataByteSize )
415
+ if (hb_list_bytes(pv->list) >= buffers->mBuffers[0].mDataByteSize)
416
{
417
- hb_list_getbytes( pv->list, buffers->mBuffers[0].mData,
418
- buffers->mBuffers[0].mDataByteSize, &pts, &pos );
419
+ hb_list_getbytes(pv->list, buffers->mBuffers[0].mData,
420
+ buffers->mBuffers[0].mDataByteSize, NULL, NULL);
421
}
422
else
423
{
424
- hb_log( "CoreAudio: Not enough data, exiting inInputDataProc" );
425
*npackets = 0;
426
return 1;
427
}
428
429
- if( pv->ichanmap != &hb_qt_chan_map )
430
- {
431
- hb_layout_remap( pv->ichanmap, &hb_qt_chan_map, pv->layout,
432
- (float*)buffers->mBuffers[0].mData,
433
- buffers->mBuffers[0].mDataByteSize / pv->isamplesiz );
434
- }
435
-
436
*npackets = buffers->mBuffers[0].mDataByteSize / pv->isamplesiz;
437
-
438
pv->ibytes -= buffers->mBuffers[0].mDataByteSize;
439
440
+ if (pv->ichanmap != &hb_qt_chan_map)
441
+ {
442
+ hb_layout_remap(pv->ichanmap, &hb_qt_chan_map, pv->layout,
443
+ (float*)buffers->mBuffers[0].mData, *npackets);
444
+ }
445
+
446
return noErr;
447
}
448
449
450
***********************************************************************
451
*
452
**********************************************************************/
453
-static hb_buffer_t * Encode( hb_work_object_t * w )
454
+static hb_buffer_t* Encode(hb_work_object_t *w)
455
{
456
- hb_work_private_t * pv = w->private_data;
457
+ hb_work_private_t *pv = w->private_data;
458
UInt32 npackets = 1;
459
460
/* check if we need more data */
461
- if( ( pv->ibytes = hb_list_bytes( pv->list ) ) < pv->isamples * pv->isamplesiz )
462
+ if ((pv->ibytes = hb_list_bytes(pv->list)) < pv->isamples * pv->isamplesiz)
463
+ {
464
return NULL;
465
+ }
466
467
- hb_buffer_t * obuf;
468
+ hb_buffer_t *obuf;
469
AudioStreamPacketDescription odesc = { 0 };
470
- AudioBufferList obuflist = { .mNumberBuffers = 1,
471
- .mBuffers = { { .mNumberChannels = pv->nchannels } },
472
- };
473
+ AudioBufferList obuflist =
474
+ {
475
+ .mNumberBuffers = 1,
476
+ .mBuffers = { { .mNumberChannels = pv->nchannels } },
477
+ };
478
479
- obuf = hb_buffer_init( pv->omaxpacket );
480
+ obuf = hb_buffer_init(pv->omaxpacket);
481
obuflist.mBuffers[0].mDataByteSize = obuf->size;
482
obuflist.mBuffers[0].mData = obuf->data;
483
484
- OSStatus err = AudioConverterFillComplexBuffer( pv->converter, inInputDataProc, pv,
485
- &npackets, &obuflist, &odesc );
486
- if( err ) {
487
- hb_log( "CoreAudio: Not enough data" );
488
- return NULL;
489
+ OSStatus err = AudioConverterFillComplexBuffer(pv->converter,
490
+ inInputDataProc, pv,
491
+ &npackets, &obuflist, &odesc);
492
+
493
+ if (err != noErr && err != 1)
494
+ {
495
+ hb_log("encCoreAudio: unexpected error in AudioConverterFillComplexBuffer()");
496
}
497
- if( odesc.mDataByteSize == 0 || npackets == 0 ) {
498
- hb_log( "CoreAudio: 0 packets returned " );
499
+ // only drop the output buffer if it's actually empty
500
+ if (!npackets || odesc.mDataByteSize <= 0)
501
+ {
502
+ hb_log("encCoreAudio: 0 packets returned");
503
return NULL;
504
}
505
506
- obuf->start = pv->pts;
507
+ obuf->size = odesc.mDataByteSize;
508
+ obuf->start = pv->pts;
509
pv->pts += 90000LL * pv->isamples / pv->osamplerate;
510
- obuf->stop = pv->pts;
511
- obuf->size = odesc.mDataByteSize;
512
+ obuf->stop = pv->pts;
513
obuf->frametype = HB_FRAME_AUDIO;
514
515
return obuf;
516
}
517
518
-static hb_buffer_t *Flush( hb_work_object_t *w, hb_buffer_t *bufin )
519
+static hb_buffer_t* Flush(hb_work_object_t *w, hb_buffer_t *bufin)
520
{
521
hb_work_private_t *pv = w->private_data;
522
523
// pad whatever data we have out to four input frames.
524
- int nbytes = hb_list_bytes( pv->list );
525
+ int nbytes = hb_list_bytes(pv->list);
526
int pad = pv->isamples * pv->isamplesiz - nbytes;
527
- if ( pad > 0 )
528
+ if (pad > 0)
529
{
530
- hb_buffer_t *tmp = hb_buffer_init( pad );
531
- memset( tmp->data, 0, pad );
532
- hb_list_add( pv->list, tmp );
533
+ hb_buffer_t *tmp = hb_buffer_init(pad);
534
+ memset(tmp->data, 0, pad);
535
+ hb_list_add(pv->list, tmp);
536
}
537
538
hb_buffer_t *bufout = NULL, *buf = NULL;
539
- while ( hb_list_bytes( pv->list ) >= pv->isamples * pv->isamplesiz )
540
+ while (hb_list_bytes(pv->list) >= pv->isamples * pv->isamplesiz)
541
{
542
- hb_buffer_t *b = Encode( w );
543
- if ( b )
544
+ hb_buffer_t *b = Encode(w);
545
+ if (b != NULL)
546
{
547
- if ( bufout == NULL )
548
+ if (bufout == NULL)
549
{
550
bufout = b;
551
}
552
553
}
554
}
555
// add the eof marker to the end of our buf chain
556
- if ( buf )
557
+ if (buf != NULL)
558
+ {
559
buf->next = bufin;
560
+ }
561
else
562
+ {
563
bufout = bufin;
564
+ }
565
return bufout;
566
}
567
568
569
***********************************************************************
570
*
571
**********************************************************************/
572
-int encCoreAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
573
- hb_buffer_t ** buf_out )
574
+int encCoreAudioWork(hb_work_object_t *w, hb_buffer_t **buf_in,
575
+ hb_buffer_t **buf_out)
576
{
577
- hb_work_private_t * pv = w->private_data;
578
- hb_buffer_t * buf;
579
+ hb_work_private_t *pv = w->private_data;
580
+ hb_buffer_t *buf;
581
582
- if( (*buf_in)->size <= 0 )
583
+ if ((*buf_in)->size <= 0)
584
{
585
// EOF on input. Finish encoding what we have buffered then send
586
// it & the eof downstream.
587
- *buf_out = Flush( w, *buf_in );
588
+ *buf_out = Flush(w, *buf_in);
589
*buf_in = NULL;
590
return HB_WORK_DONE;
591
}
592
593
- hb_list_add( pv->list, *buf_in );
594
+ hb_list_add(pv->list, *buf_in);
595
*buf_in = NULL;
596
597
- *buf_out = buf = Encode( w );
598
+ *buf_out = buf = Encode(w);
599
600
- while( buf )
601
+ while (buf != NULL)
602
{
603
- buf->next = Encode( w );
604
+ buf->next = Encode(w);
605
buf = buf->next;
606
}
607
608
HandBrake-0.9.6.tar.bz2/libhb/ports.c -> HandBrake-0.9.8.tar.bz2/libhb/ports.c
Changed
9
1
2
if (iResult != 0)
3
{
4
hb_log("WSAStartup failed: %d", iResult);
5
+ free(n);
6
return NULL;
7
}
8
winsock_init = 1;
9
HandBrake-0.9.6.tar.bz2/libhb/ports.h -> HandBrake-0.9.8.tar.bz2/libhb/ports.h
Changed
10
1
2
#elif defined( SYS_DARWIN )
3
# define HB_LOW_PRIORITY 0
4
# define HB_NORMAL_PRIORITY 31
5
-#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS )
6
+#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) || defined ( __FreeBSD_kernel__ )
7
# define HB_LOW_PRIORITY 0
8
# define HB_NORMAL_PRIORITY 0
9
#elif defined( SYS_CYGWIN )
10
HandBrake-0.9.6.tar.bz2/libhb/reader.c -> HandBrake-0.9.8.tar.bz2/libhb/reader.c
Changed
96
1
2
int start_found; // found pts_to_start point
3
int64_t pts_to_start;
4
uint64_t st_first;
5
+ hb_fifo_t * fifos[100];
6
};
7
8
/***********************************************************************
9
* Local prototypes
10
**********************************************************************/
11
-static hb_fifo_t ** GetFifoForId( hb_job_t * job, int id );
12
+static hb_fifo_t ** GetFifoForId( hb_work_private_t * r, int id );
13
static void UpdateState( hb_work_private_t * r, int64_t start);
14
15
/***********************************************************************
16
17
if ( buf->start > 0 )
18
{
19
pts_to_start += buf->start;
20
- r->pts_to_start += buf->start;
21
- r->job->pts_to_start += buf->start;
22
}
23
}
24
25
26
while( ( buf = hb_list_item( list, 0 ) ) )
27
{
28
hb_list_rem( list, buf );
29
- fifos = GetFifoForId( r->job, buf->id );
30
+ fifos = GetFifoForId( r, buf->id );
31
32
if ( fifos && ! r->saw_video && !r->job->indepth_scan )
33
{
34
35
***********************************************************************
36
*
37
**********************************************************************/
38
-static hb_fifo_t ** GetFifoForId( hb_job_t * job, int id )
39
+static hb_fifo_t ** GetFifoForId( hb_work_private_t * r, int id )
40
{
41
+ hb_job_t * job = r->job;
42
hb_title_t * title = job->title;
43
hb_audio_t * audio;
44
hb_subtitle_t * subtitle;
45
int i, n, count;
46
- static hb_fifo_t * fifos[100];
47
48
- memset(fifos, 0, sizeof(fifos));
49
+ memset(r->fifos, 0, sizeof(r->fifos));
50
51
if( id == title->video_id )
52
{
53
54
}
55
else
56
{
57
- fifos[0] = job->fifo_mpeg2;
58
- return fifos;
59
+ r->fifos[0] = job->fifo_mpeg2;
60
+ return r->fifos;
61
}
62
}
63
64
65
* we are scanning and looking for forced subs, then pass them up
66
* to decode whether the sub is a forced one.
67
*/
68
- fifos[n++] = subtitle->fifo_in;
69
+ r->fifos[n++] = subtitle->fifo_in;
70
}
71
}
72
}
73
if ( n != 0 )
74
{
75
- return fifos;
76
+ return r->fifos;
77
}
78
79
if( !job->indepth_scan )
80
81
audio = hb_list_item( title->list_audio, i );
82
if( id == audio->id )
83
{
84
- fifos[n++] = audio->priv.fifo_in;
85
+ r->fifos[n++] = audio->priv.fifo_in;
86
}
87
}
88
89
if( n != 0 )
90
{
91
- return fifos;
92
+ return r->fifos;
93
}
94
}
95
96
HandBrake-0.9.6.tar.bz2/libhb/render.c -> HandBrake-0.9.8.tar.bz2/libhb/render.c
Changed
33
1
2
{
3
out->stop = cfr_stop;
4
}
5
+ pv->out_last_stop = out->stop;
6
}
7
else
8
{
9
10
// each of which is a frame time long.
11
double excess_dur = (double)out->stop - cfr_stop;
12
out->stop = cfr_stop;
13
- for ( ; excess_dur >= pv->frame_rate; excess_dur -= cfr_stop )
14
+ pv->out_last_stop = out->stop;
15
+ for ( ; excess_dur >= pv->frame_rate; excess_dur -= pv->frame_rate )
16
{
17
/* next frame too far ahead - dup current frame */
18
hb_buffer_t *dup = hb_buffer_init( out->size );
19
20
dup->start = cfr_stop;
21
cfr_stop += pv->frame_rate;
22
dup->stop = cfr_stop;
23
+ pv->out_last_stop = dup->stop;
24
out = insert_buffer_in_chain( out, dup );
25
++pv->dups;
26
++pv->count_frames;
27
}
28
}
29
- pv->out_last_stop = out->stop;
30
out = out->next;
31
}
32
}
33
HandBrake-0.9.6.tar.bz2/libhb/scan.c -> HandBrake-0.9.8.tar.bz2/libhb/scan.c
Changed
106
1
2
#include "a52dec/a52.h"
3
#include "dca.h"
4
5
-#define HB_MAX_PREVIEWS 30 // 30 previews = every 5 minutes of a 2.5 hour video
6
-
7
typedef struct
8
{
9
hb_handle_t * h;
10
11
12
typedef struct {
13
int n;
14
- int t[HB_MAX_PREVIEWS];
15
- int b[HB_MAX_PREVIEWS];
16
- int l[HB_MAX_PREVIEWS];
17
- int r[HB_MAX_PREVIEWS];
18
+ int *t;
19
+ int *b;
20
+ int *l;
21
+ int *r;
22
} crop_record_t;
23
24
+static crop_record_t * crop_record_init( int max_previews )
25
+{
26
+ crop_record_t *crops = calloc( 1, sizeof(*crops) );
27
+
28
+ crops->t = calloc( max_previews, sizeof(int) );
29
+ crops->b = calloc( max_previews, sizeof(int) );
30
+ crops->l = calloc( max_previews, sizeof(int) );
31
+ crops->r = calloc( max_previews, sizeof(int) );
32
+
33
+ return crops;
34
+}
35
+
36
+static void crop_record_free( crop_record_t *crops )
37
+{
38
+ free( crops->t );
39
+ free( crops->b );
40
+ free( crops->l );
41
+ free( crops->r );
42
+ free( crops );
43
+}
44
+
45
static void record_crop( crop_record_t *crops, int t, int b, int l, int r )
46
{
47
crops->t[crops->n] = t;
48
49
int doubled_frame_count = 0;
50
int interlaced_preview_count = 0;
51
info_list_t * info_list = calloc( data->preview_count+1, sizeof(*info_list) );
52
- crop_record_t *crops = calloc( 1, sizeof(*crops) );
53
+ crop_record_t *crops = crop_record_init( data->preview_count );
54
55
list_es = hb_list_init();
56
57
58
if ( *data->die )
59
{
60
free( info_list );
61
- free( crops );
62
+ crop_record_free( crops );
63
return 0;
64
}
65
if (data->bd)
66
67
}
68
69
/* Check preview for interlacing artifacts */
70
- if( hb_detect_comb( vid_buf, vid_info.width, vid_info.height, 10, 30, 9, 10, 30, 9 ) )
71
+ if( hb_detect_comb( vid_buf, 10, 30, 9, 10, 30, 9 ) )
72
{
73
hb_deep_log( 2, "Interlacing detected in preview frame %i", i+1);
74
interlaced_preview_count++;
75
76
title->height = vid_info.height;
77
if ( vid_info.rate && vid_info.rate_base )
78
{
79
+ // if the frame rate is very close to one of our "common" framerates,
80
+ // assume it actually is said frame rate; e.g. some 24000/1001 sources
81
+ // may have a rate_base of 1126124 (instead of 1126125)
82
+ for( i = 0; i < hb_video_rates_count; i++ )
83
+ {
84
+ if( is_close_to( vid_info.rate_base, hb_video_rates[i].rate, 100 ) )
85
+ {
86
+ vid_info.rate_base = hb_video_rates[i].rate;
87
+ break;
88
+ }
89
+ }
90
title->rate = vid_info.rate;
91
title->rate_base = vid_info.rate_base;
92
- if( is_close_to( vid_info.rate_base, 900900, 100 ) )
93
+ if( vid_info.rate_base == 900900 )
94
{
95
if( pulldown_count >= npreviews / 4 )
96
{
97
98
title->detected_interlacing = 0;
99
}
100
}
101
- free( crops );
102
+ crop_record_free( crops );
103
free( info_list );
104
105
while( ( buf_es = hb_list_item( list_es, 0 ) ) )
106
HandBrake-0.9.6.tar.bz2/libhb/stream.c -> HandBrake-0.9.8.tar.bz2/libhb/stream.c
Changed
144
1
2
#include "hbffmpeg.h"
3
#include "lang.h"
4
#include "a52dec/a52.h"
5
-#include "mp4v2/mp4v2.h"
6
#include "libbluray/bluray.h"
7
8
#define min(a, b) a < b ? a : b
9
10
static off_t align_to_next_packet(hb_stream_t *stream);
11
static int64_t pes_timestamp( const uint8_t *pes );
12
13
-static void hb_ts_stream_init(hb_stream_t *stream);
14
+static int hb_ts_stream_init(hb_stream_t *stream);
15
static hb_buffer_t * hb_ts_stream_decode(hb_stream_t *stream);
16
static void hb_init_audio_list(hb_stream_t *stream, hb_title_t *title);
17
-static void hb_ts_stream_find_pids(hb_stream_t *stream);
18
+static int hb_ts_stream_find_pids(hb_stream_t *stream);
19
20
static void hb_ps_stream_init(hb_stream_t *stream);
21
static hb_buffer_t * hb_ps_stream_decode(hb_stream_t *stream);
22
23
" offset %d bytes", psize, offset);
24
stream->packetsize = psize;
25
stream->hb_stream_type = transport;
26
- hb_ts_stream_init(stream);
27
- return 1;
28
+ if (hb_ts_stream_init(stream) == 0)
29
+ return 1;
30
}
31
- if ( hb_stream_check_for_ps(stream) != 0 )
32
+ else if ( hb_stream_check_for_ps(stream) != 0 )
33
{
34
hb_log("file is MPEG Program Stream");
35
stream->hb_stream_type = program;
36
37
*
38
**********************************************************************/
39
40
-static void hb_ts_stream_init(hb_stream_t *stream)
41
+static int hb_ts_stream_init(hb_stream_t *stream)
42
{
43
int i;
44
45
46
stream->ts.packet = malloc( stream->packetsize );
47
48
// Find the audio and video pids in the stream
49
- hb_ts_stream_find_pids(stream);
50
+ if (hb_ts_stream_find_pids(stream) < 0)
51
+ {
52
+ return -1;
53
+ }
54
55
// hb_ts_resolve_pid_types reads some data, so the TS buffers
56
// are needed here.
57
58
hb_stream_delete_ts_entry(stream, i);
59
}
60
}
61
+ return 0;
62
}
63
64
static void hb_ps_stream_init(hb_stream_t *stream)
65
66
pes_info->dts = pes_info->pts;
67
}
68
}
69
+ // A user encountered a stream that has garbage DTS timestamps.
70
+ // DTS should never be > PTS. Such broken timestamps leads to
71
+ // HandBrake computing negative buffer start times.
72
+ if (pes_info->dts > pes_info->pts)
73
+ {
74
+ pes_info->dts = pes_info->pts;
75
+ }
76
77
if ( has_escr )
78
bits_skip(&bb_hdr, 8 * 6);
79
80
if ( decode_ps_map( stream, buf->data, buf->size ) )
81
{
82
hb_log("Found program stream map");
83
- goto done;
84
+ // Normally, we could quit here since the program
85
+ // stream map *should* map all streams. But once
86
+ // again Tivo breaks things by not always creating
87
+ // complete maps. So continue processing...
88
}
89
else
90
{
91
92
}
93
hb_stream_seek( stream, 0.2 );
94
}
95
-done:
96
hb_buffer_close( &buf );
97
}
98
99
100
}
101
102
103
-static void hb_ts_stream_find_pids(hb_stream_t *stream)
104
+static int hb_ts_stream_find_pids(hb_stream_t *stream)
105
{
106
// To be different from every other broadcaster in the world, New Zealand TV
107
// changes PMTs (and thus video & audio PIDs) when 'programs' change. Since
108
109
110
if ((pid == 0x0000) && (stream->ts_number_pat_entries == 0))
111
{
112
- decode_PAT(buf, stream);
113
- continue;
114
+ decode_PAT(buf, stream);
115
+ continue;
116
}
117
118
int pat_index = 0;
119
120
if (stream->pat_info[pat_index].program_number != 0 &&
121
pid == stream->pat_info[pat_index].program_map_PID)
122
{
123
- if (build_program_map(buf, stream) > 0)
124
- break;
125
+ if (build_program_map(buf, stream) > 0)
126
+ {
127
+ break;
128
+ }
129
}
130
}
131
// Keep going until we have a complete set of PIDs
132
if ( ts_index_of_video( stream ) >= 0 )
133
break;
134
}
135
+ if ( ts_index_of_video( stream ) < 0 )
136
+ return -1;
137
update_ts_streams( stream, stream->pmt_info.PCR_PID, 0, -1, P, NULL );
138
- }
139
+ return 0;
140
+}
141
142
143
// convert a PES PTS or DTS to an int64
144
HandBrake-0.9.6.tar.bz2/libhb/sync.c -> HandBrake-0.9.8.tar.bz2/libhb/sync.c
Changed
27
1
2
chapter = hb_list_item( title->list_chapter, i - 1 );
3
duration += chapter->duration;
4
}
5
- duration += 90000;
6
- /* 1 second safety so we're sure we won't miss anything */
7
}
8
sync->count_frames_max = duration * title->rate / title->rate_base / 90000;
9
}
10
11
hb_sync_audio_t *sync )
12
{
13
int64_t start = (int64_t)sync->next_start;
14
- double duration = buf->stop - buf->start;
15
+
16
+ // Can't count of buf->s.stop - buf->s.start for accurate duration
17
+ // due to integer rounding, so use buf->s.duration when it is set
18
+ // (which should be always if I didn't miss anything)
19
+ double duration;
20
+ if ( buf->duration > 0 )
21
+ duration = buf->duration;
22
+ else
23
+ duration = buf->stop - buf->start;
24
25
if ( !( audio->config.out.codec & HB_ACODEC_PASS_FLAG ) )
26
{
27
HandBrake-0.9.6.tar.bz2/macosx/Controller.m -> HandBrake-0.9.8.tar.bz2/macosx/Controller.m
Changed
143
1
2
[queueFileJob setObject:[NSNumber numberWithInt:[fPictureController grayscale]] forKey:@"VideoGrayScale"];
3
4
/* Auto Passthru */
5
- if ([fAudioAutoPassthruBox isHidden])
6
- {
7
- // every passthru is allowed, fallback is AC3
8
- [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAACPass"];
9
- [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAC3Pass"];
10
- [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSHDPass"];
11
- [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSPass"];
12
- [queueFileJob setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowMP3Pass"];
13
- // just in case we need it for display purposes
14
- [queueFileJob setObject:@"AC3 (ffmpeg)" forKey: @"AudioEncoderFallback"];
15
- // actual fallback encoder
16
- [queueFileJob setObject:[NSNumber numberWithInt:HB_ACODEC_AC3] forKey: @"JobAudioEncoderFallback"];
17
-
18
- }
19
- else
20
- {
21
- [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"];
22
- [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"];
23
- [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"];
24
- [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"];
25
- [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"];
26
- // just in case we need it for display purposes
27
- [queueFileJob setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"];
28
- // actual fallback encoder
29
- [queueFileJob setObject:[NSNumber numberWithInt:[[fAudioFallbackPopUp selectedItem] tag]] forKey: @"JobAudioEncoderFallback"];
30
- }
31
+ [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"];
32
+ [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"];
33
+ [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"];
34
+ [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"];
35
+ [queueFileJob setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"];
36
+ // just in case we need it for display purposes
37
+ [queueFileJob setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"];
38
+ // actual fallback encoder
39
+ [queueFileJob setObject:[NSNumber numberWithInt:[[fAudioFallbackPopUp selectedItem] tag]] forKey: @"JobAudioEncoderFallback"];
40
41
/* Audio */
42
[self writeToActivityLog: "createQueueFileItem: Getting Audio from prepareAudioForQueueFileJob ..."];
43
44
45
46
/* Auto Passthru */
47
- if ([fAudioAutoPassthruBox isHidden])
48
+ job->acodec_copy_mask = 0;
49
+ if ([fAudioAllowAACPassCheck state] == NSOnState)
50
{
51
- // every passthru is allowed, fallback is AC3
52
- job->acodec_copy_mask = HB_ACODEC_PASS_MASK;
53
- job->acodec_fallback = HB_ACODEC_AC3;
54
+ job->acodec_copy_mask |= HB_ACODEC_FFAAC;
55
}
56
- else
57
+ if ([fAudioAllowAC3PassCheck state] == NSOnState)
58
{
59
- job->acodec_copy_mask = 0;
60
- if ([fAudioAllowAACPassCheck state] == NSOnState)
61
- {
62
- job->acodec_copy_mask |= HB_ACODEC_FFAAC;
63
- }
64
- if ([fAudioAllowAC3PassCheck state] == NSOnState)
65
- {
66
- job->acodec_copy_mask |= HB_ACODEC_AC3;
67
- }
68
- if ([fAudioAllowDTSHDPassCheck state] == NSOnState)
69
- {
70
- job->acodec_copy_mask |= HB_ACODEC_DCA_HD;
71
- }
72
- if ([fAudioAllowDTSPassCheck state] == NSOnState)
73
- {
74
- job->acodec_copy_mask |= HB_ACODEC_DCA;
75
- }
76
- if ([fAudioAllowMP3PassCheck state] == NSOnState)
77
- {
78
- job->acodec_copy_mask |= HB_ACODEC_MP3;
79
- }
80
- job->acodec_fallback = [[fAudioFallbackPopUp selectedItem] tag];
81
+ job->acodec_copy_mask |= HB_ACODEC_AC3;
82
+ }
83
+ if ([fAudioAllowDTSHDPassCheck state] == NSOnState)
84
+ {
85
+ job->acodec_copy_mask |= HB_ACODEC_DCA_HD;
86
+ }
87
+ if ([fAudioAllowDTSPassCheck state] == NSOnState)
88
+ {
89
+ job->acodec_copy_mask |= HB_ACODEC_DCA;
90
}
91
+ if ([fAudioAllowMP3PassCheck state] == NSOnState)
92
+ {
93
+ job->acodec_copy_mask |= HB_ACODEC_MP3;
94
+ }
95
+ job->acodec_fallback = [[fAudioFallbackPopUp selectedItem] tag];
96
97
/* Audio tracks and mixdowns */
98
[fAudioDelegate prepareAudioForJob: job];
99
100
/* Turbo 1st pass for 2 Pass Encoding */
101
[fVidTurboPassCheck setState:[[chosenPreset objectForKey:@"VideoTurboTwoPass"] intValue]];
102
103
- /* Auto Passthru */
104
- /* If the preset has Auto Passthru fields, use them;
105
- * else assume every passthru is allowed and the fallback is AC3 */
106
+ /* Auto Passthru: if the preset has Auto Passthru fields, use them.
107
+ * Otherwise assume every passthru is allowed and the fallback is AC3 */
108
id tempObject;
109
if ((tempObject = [chosenPreset objectForKey:@"AudioAllowAACPass"]) != nil)
110
{
111
112
[preset setObject:[NSNumber numberWithInt:[fPictureController grayscale]] forKey:@"VideoGrayScale"];
113
114
/* Auto Pasthru */
115
- if ([fAudioAutoPassthruBox isHidden])
116
- {
117
- // every passthru is allowed, fallback is AC3
118
- [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAACPass"];
119
- [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowAC3Pass"];
120
- [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSHDPass"];
121
- [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowDTSPass"];
122
- [preset setObject:[NSNumber numberWithInt:1] forKey: @"AudioAllowMP3Pass"];
123
- [preset setObject:@"AC3 (ffmpeg)" forKey: @"AudioEncoderFallback"];
124
- }
125
- else
126
- {
127
- [preset setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"];
128
- [preset setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"];
129
- [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"];
130
- [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"];
131
- [preset setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"];
132
- [preset setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"];
133
- }
134
+ [preset setObject:[NSNumber numberWithInt:[fAudioAllowAACPassCheck state]] forKey: @"AudioAllowAACPass"];
135
+ [preset setObject:[NSNumber numberWithInt:[fAudioAllowAC3PassCheck state]] forKey: @"AudioAllowAC3Pass"];
136
+ [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSHDPassCheck state]] forKey: @"AudioAllowDTSHDPass"];
137
+ [preset setObject:[NSNumber numberWithInt:[fAudioAllowDTSPassCheck state]] forKey: @"AudioAllowDTSPass"];
138
+ [preset setObject:[NSNumber numberWithInt:[fAudioAllowMP3PassCheck state]] forKey: @"AudioAllowMP3Pass"];
139
+ [preset setObject:[fAudioFallbackPopUp titleOfSelectedItem] forKey: @"AudioEncoderFallback"];
140
141
/* Audio */
142
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
143
HandBrake-0.9.6.tar.bz2/macosx/HBPresets.h -> HandBrake-0.9.8.tar.bz2/macosx/HBPresets.h
Changed
22
1
2
/* HBPresets.h $
3
-
4
- This file is part of the HandBrake source code.
5
- Homepage: <http://handbrake.fr/>.
6
- It may be used under the terms of the GNU General Public License. */
7
+
8
+ This file is part of the HandBrake source code.
9
+ Homepage: <http://handbrake.fr/>.
10
+ It may be used under the terms of the GNU General Public License. */
11
12
#import <Cocoa/Cocoa.h>
13
14
15
- (NSDictionary *)createiPhone4Preset;
16
- (NSDictionary *)createAppleTv2Preset;
17
- (NSDictionary *)createAppleTVPreset;
18
+- (NSDictionary *)createAppleTv3Preset;
19
- (NSDictionary *)createAppleUniversalPreset;
20
- (NSDictionary *)createClassicPreset;
21
- (NSDictionary *)createiPhonePreset;
22
HandBrake-0.9.6.tar.bz2/macosx/HBPresets.m -> HandBrake-0.9.8.tar.bz2/macosx/HBPresets.m
Changed
1295
1
2
/* HBPresets.m $
3
-
4
- This file is part of the HandBrake source code.
5
- Homepage: <http://handbrake.fr/>.
6
- It may be used under the terms of the GNU General Public License. */
7
+
8
+ This file is part of the HandBrake source code.
9
+ Homepage: <http://handbrake.fr/>.
10
+ It may be used under the terms of the GNU General Public License. */
11
12
#import "HBPresets.h"
13
14
15
- (id)init
16
{
17
self = [super init];
18
- return self;
19
+ return self;
20
}
21
22
/* Called by -addFactoryPresets in Controller.mm */
23
24
- (NSDictionary *)createDevicesPresetFolder
25
{
26
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
27
-/*Set whether or not this is a folder, 1 is bool for folder*/
28
+ /*Set whether or not this is a folder, 1 is bool for folder*/
29
[preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
30
-
31
-
32
+
33
+
34
/* Get the New Preset Name from the field in the AddPresetPanel */
35
[preset setObject:@"Devices" forKey:@"PresetName"];
36
-
37
+
38
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
39
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
40
-
41
+
42
/*Set whether or not this is default, at creation set to 0*/
43
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
44
45
46
[childrenArray addObject:[self createiPadPreset]];
47
[childrenArray addObject:[self createAppleTVPreset]];
48
[childrenArray addObject:[self createAppleTv2Preset]];
49
+ [childrenArray addObject:[self createAppleTv3Preset]];
50
[childrenArray addObject:[self createAndroidMidPreset]];
51
[childrenArray addObject:[self createAndroidHighPreset]];
52
-
53
+
54
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
55
56
[childrenArray autorelease];
57
-
58
-
59
-
60
+
61
+
62
+
63
[preset autorelease];
64
return preset;
65
}
66
67
- (NSDictionary *)createRegularPresetFolder
68
{
69
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
70
-/*Set whether or not this is a folder, 1 is bool for folder*/
71
+ /*Set whether or not this is a folder, 1 is bool for folder*/
72
[preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
73
-
74
-
75
+
76
+
77
/* Get the New Preset Name from the field in the AddPresetPanel */
78
[preset setObject:@"Regular" forKey:@"PresetName"];
79
-
80
+
81
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
82
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
83
-
84
+
85
/*Set whether or not this is default, at creation set to 0*/
86
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
87
88
89
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
90
91
[childrenArray autorelease];
92
-
93
-
94
-
95
+
96
+
97
+
98
[preset autorelease];
99
return preset;
100
}
101
102
- (NSDictionary *)createLegacyPresetFolder
103
{
104
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
105
-/*Set whether or not this is a folder, 1 is bool for folder*/
106
+ /*Set whether or not this is a folder, 1 is bool for folder*/
107
[preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"];
108
-
109
-
110
+
111
+
112
/* Get the New Preset Name from the field in the AddPresetPanel */
113
[preset setObject:@"Legacy" forKey:@"PresetName"];
114
-
115
+
116
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
117
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
118
-
119
+
120
/*Set whether or not this is default, at creation set to 0*/
121
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
122
123
124
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
125
126
[childrenArray autorelease];
127
-
128
-
129
-
130
+
131
+
132
+
133
[preset autorelease];
134
return preset;
135
}
136
137
- (NSDictionary *)createAppleTVPreset
138
{
139
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
140
-
141
+
142
/* Get the New Preset Name from the field in the AddPresetPanel */
143
[preset setObject:@"AppleTV" forKey:@"PresetName"];
144
-
145
+
146
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
147
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
148
/*Set whether or not this is a folder, 1 is bool for folder*/
149
[preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
150
/*Set whether or not this is default, at creation set to 0*/
151
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
152
-
153
+
154
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
155
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
156
-
157
+
158
/* Get the New Preset Description from the field in the AddPresetPanel */
159
[preset setObject:@"HandBrake's settings for the AppleTV and 2009's iPhone and iPod Touch lineup. Provides a good balance between quality and file size, and pushes the devices to their limits. Includes Dolby Digital 5.1 AC3 sound for the AppleTV." forKey:@"PresetDescription"];
160
-
161
+
162
/* File Format */
163
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
164
-
165
+
166
/* 64-bit MP4 file */
167
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
168
-
169
+
170
/* Chapter Markers*/
171
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
172
-
173
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
174
+
175
/* Video encoder */
176
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
177
-
178
+
179
/* x264 Option String (We can use this to tweak the appleTV output)*/
180
[preset setObject:@"cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500" forKey:@"x264Option"];
181
-
182
+
183
/* Video quality */
184
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
185
[preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
186
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
187
-
188
+
189
/* Video framerate */
190
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
191
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
192
-
193
+
194
/* GrayScale */
195
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
196
-
197
+
198
/* 2 Pass Encoding */
199
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
200
-
201
+
202
/* Basic Picture Settings */
203
/* Use Max Picture settings for whatever the dvd is.*/
204
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
205
206
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
207
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
208
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
209
-
210
+
211
/* Explicitly set the filters for built-in presets */
212
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
213
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
214
215
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
216
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
217
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
218
-
219
+
220
/* Set crop settings here */
221
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
222
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
223
224
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
225
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
226
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
227
-
228
+
229
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
230
* not listed will be set to "None" and not encoded */
231
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
232
233
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
234
[audioTrack1Array autorelease];
235
[audioListArray addObject:audioTrack1Array];
236
-
237
+
238
/* Track 2 */
239
NSMutableDictionary *audioTrack2Array = [[NSMutableDictionary alloc] init];
240
[audioTrack2Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
241
242
[audioTrack2Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
243
[audioTrack2Array autorelease];
244
[audioListArray addObject:audioTrack2Array];
245
-
246
+
247
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
248
-
249
+
250
/* Subtitles*/
251
[preset setObject:@"None" forKey:@"Subtitles"];
252
-
253
+
254
[preset autorelease];
255
return preset;
256
}
257
258
- (NSDictionary *)createAppleUniversalPreset
259
{
260
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
261
-
262
+
263
/* Get the New Preset Name from the field in the AddPresetPanel */
264
[preset setObject:@"Universal" forKey:@"PresetName"];
265
-
266
+
267
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
268
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
269
/*Set whether or not this is a folder, 1 is bool for folder*/
270
[preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
271
/*Set whether or not this is default, at creation set to 0*/
272
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
273
-
274
+
275
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
276
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
277
-
278
+
279
/* Get the New Preset Description from the field in the AddPresetPanel */
280
[preset setObject:@"HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod (6G and up), iPhone, AppleTV, and Macs" forKey:@"PresetDescription"];
281
-
282
+
283
/* File Format */
284
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
285
-
286
+
287
/* 64-bit MP4 file */
288
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"];
289
-
290
+
291
/* Chapter Markers*/
292
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
293
-
294
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
295
+
296
/* Video encoder */
297
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
298
-
299
+
300
/* x264 Option String (We can use this to tweak the appleTV output)*/
301
[preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6" forKey:@"x264Option"];
302
-
303
+
304
/* Video quality */
305
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
306
[preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
307
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
308
-
309
+
310
/* Video framerate */
311
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
312
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
313
-
314
+
315
/* GrayScale */
316
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
317
-
318
+
319
/* 2 Pass Encoding */
320
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
321
-
322
+
323
/* Basic Picture Settings */
324
/* Use Max Picture settings for whatever the dvd is.*/
325
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
326
327
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
328
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
329
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
330
-
331
+
332
/* Explicitly set the filters for built-in presets */
333
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
334
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
335
336
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
337
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
338
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
339
-
340
+
341
/* Set crop settings here */
342
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
343
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
344
345
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
346
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
347
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
348
-
349
+
350
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
351
* not listed will be set to "None" and not encoded */
352
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
353
354
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
355
[audioTrack1Array autorelease];
356
[audioListArray addObject:audioTrack1Array];
357
-
358
+
359
/* Track 2 */
360
NSMutableDictionary *audioTrack2Array = [[NSMutableDictionary alloc] init];
361
[audioTrack2Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
362
363
[audioTrack2Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
364
[audioTrack2Array autorelease];
365
[audioListArray addObject:audioTrack2Array];
366
-
367
+
368
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
369
-
370
+
371
/* Subtitles*/
372
[preset setObject:@"None" forKey:@"Subtitles"];
373
-
374
+
375
[preset autorelease];
376
return preset;
377
}
378
379
- (NSDictionary *)createiPadPreset
380
{
381
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
382
-
383
+
384
/* Get the New Preset Name from the field in the AddPresetPanel */
385
[preset setObject:@"iPad" forKey:@"PresetName"];
386
-
387
+
388
/*Set whether or not this is a user preset where 0 is factory, 1 is user*/
389
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
390
/*Set whether or not this is a folder, 1 is bool for folder*/
391
[preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
392
/*Set whether or not this is default, at creation set to 0*/
393
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
394
-
395
+
396
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
397
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
398
-
399
+
400
/* Get the New Preset Description from the field in the AddPresetPanel */
401
- [preset setObject:@"HandBrake's preset for the iPad (1st gen) is optimized for viewing on its 1024x768 display." forKey:@"PresetDescription"];
402
-
403
+ [preset setObject:@"HandBrake's preset for the iPad (all generations) is optimized for a good balance between quality and filesize." forKey:@"PresetDescription"];
404
+
405
/* File Format */
406
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
407
-
408
+
409
/* 64-bit MP4 file */
410
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
411
-
412
+
413
/* Chapter Markers*/
414
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
415
-
416
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
417
+
418
/* Video encoder */
419
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
420
-
421
+
422
/* x264 Option String (We can use this to tweak the output)*/
423
[preset setObject:@"" forKey:@"x264Option"];
424
-
425
+
426
/* Video quality */
427
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
428
[preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
429
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
430
-
431
+
432
/* Video framerate */
433
[preset setObject:@"29.97 (NTSC Video)" forKey:@"VideoFramerate"];
434
[preset setObject:@"pfr" forKey:@"VideoFramerateMode"];
435
436
/* GrayScale */
437
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
438
-
439
+
440
/* 2 Pass Encoding */
441
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
442
-
443
+
444
/* Basic Picture Settings */
445
/* Use Max Picture settings for whatever the dvd is.*/
446
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
447
- [preset setObject:[NSNumber numberWithInt:1024] forKey:@"PictureWidth"];
448
+ [preset setObject:[NSNumber numberWithInt:1280] forKey:@"PictureWidth"];
449
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
450
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
451
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
452
-
453
+
454
/* Explicitly set the filters for built-in presets */
455
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
456
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
457
458
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
459
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
460
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
461
-
462
+
463
/* Set crop settings here */
464
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
465
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
466
467
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
468
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
469
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
470
-
471
+
472
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
473
* not listed will be set to "None" and not encoded */
474
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
475
476
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
477
[audioTrack1Array autorelease];
478
[audioListArray addObject:audioTrack1Array];
479
-
480
+
481
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
482
-
483
+
484
/* Subtitles*/
485
[preset setObject:@"None" forKey:@"Subtitles"];
486
-
487
+
488
[preset autorelease];
489
return preset;
490
}
491
492
return preset;
493
}
494
495
-- (NSDictionary *)createClassicPreset
496
+- (NSDictionary *)createAppleTv3Preset
497
{
498
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
499
-
500
+
501
/* Get the New Preset Name from the field in the AddPresetPanel */
502
- [preset setObject:@"Classic" forKey:@"PresetName"];
503
-
504
- /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
505
+ [preset setObject:@"AppleTV 3" forKey:@"PresetName"];
506
+
507
+ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/
508
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
509
-
510
+ /*Set whether or not this is a folder, 1 is bool for folder*/
511
+ [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"];
512
/*Set whether or not this is default, at creation set to 0*/
513
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
514
-
515
+
516
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
517
- [preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"];
518
-
519
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
520
+
521
/* Get the New Preset Description from the field in the AddPresetPanel */
522
- [preset setObject:@"HandBrake's traditional, faster, lower-quality settings." forKey:@"PresetDescription"];
523
-
524
+ [preset setObject:@"HandBrake's preset for the Apple TV (3rd gen) is optimized for up to 1080p playback." forKey:@"PresetDescription"];
525
+
526
/* File Format */
527
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
528
-
529
+
530
+ /* 64-bit MP4 file */
531
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
532
+
533
/* Chapter Markers*/
534
- [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
535
-
536
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
537
+
538
/* Video encoder */
539
- [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"];
540
-
541
- /* x264 Option String */
542
- [preset setObject:@"" forKey:@"x264Option"];
543
-
544
+ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
545
+
546
+ /* x264 Option String (We can use this to tweak the output)*/
547
+ [preset setObject:@"b-adapt=2" forKey:@"x264Option"];
548
+
549
/* Video quality */
550
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
551
- [preset setObject:@"1000" forKey:@"VideoAvgBitrate"];
552
-
553
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
554
+ [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
555
+ [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
556
+
557
/* Video framerate */
558
- [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
559
- [preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
560
-
561
+ [preset setObject:@"30" forKey:@"VideoFramerate"];
562
+ [preset setObject:@"pfr" forKey:@"VideoFramerateMode"];
563
+
564
/* GrayScale */
565
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
566
-
567
+
568
/* 2 Pass Encoding */
569
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
570
-
571
- /*Picture Settings*/
572
+
573
+ /* Basic Picture Settings */
574
/* Use Max Picture settings for whatever the dvd is.*/
575
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
576
- [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
577
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
578
+ [preset setObject:[NSNumber numberWithInt:1920] forKey:@"PictureWidth"];
579
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
580
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
581
- [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
582
-
583
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
584
+
585
+ /* We use Loose Anamorphic with a Modulus of 2 */
586
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
587
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"];
588
+
589
/* Explicitly set the filters for built-in presets */
590
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
591
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecombDeinterlace"];
592
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
593
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
594
- [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
595
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
596
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
597
-
598
+ /* Note: decided to use Fast Decomb. This makes this the only device preset using
599
+ * decomb that we have. Fast Decomb is better than no decomb imo and has basically no
600
+ * speed hit on progressive sources. Once Default decomb is sped up, we can switch */
601
+ [preset setObject:[NSNumber numberWithInt:3] forKey:@"PictureDecomb"];
602
+
603
/* Set crop settings here */
604
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
605
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
606
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
607
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
608
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
609
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
610
-
611
+
612
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
613
* not listed will be set to "None" and not encoded */
614
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
615
616
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
617
[audioTrack1Array autorelease];
618
[audioListArray addObject:audioTrack1Array];
619
+
620
+ /* Track 2 */
621
+ NSMutableDictionary *audioTrack2Array = [[NSMutableDictionary alloc] init];
622
+ [audioTrack2Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
623
+ [audioTrack2Array setObject:@"AC3 Passthru" forKey:@"AudioEncoder"];
624
+ [audioTrack2Array setObject:@"None" forKey:@"AudioMixdown"];
625
+ [audioTrack2Array setObject:@"Auto" forKey:@"AudioSamplerate"];
626
+ [audioTrack2Array setObject:@"160" forKey:@"AudioBitrate"];
627
+ /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use
628
+ * the sources bitrate, however we need to initially set the value to something so
629
+ * the macgui doesnt barf, so 160 seems as good as anything */
630
+ [audioTrack2Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
631
+ [audioTrack2Array autorelease];
632
+ [audioListArray addObject:audioTrack2Array];
633
+
634
+
635
+ [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
636
+
637
+ /* Subtitles*/
638
+ [preset setObject:@"None" forKey:@"Subtitles"];
639
+
640
+ [preset autorelease];
641
+ return preset;
642
+}
643
644
- [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
645
-
646
- /* Subtitles*/
647
- [preset setObject:@"None" forKey:@"Subtitles"];
648
-
649
- [preset autorelease];
650
- return preset;
651
-}
652
-
653
-- (NSDictionary *)createHighProfilePreset
654
-{
655
- NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
656
-
657
- /* Get the New Preset Name from the field in the AddPresetPanel */
658
- [preset setObject:@"High Profile" forKey:@"PresetName"];
659
660
+- (NSDictionary *)createClassicPreset
661
+{
662
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
663
+
664
+ /* Get the New Preset Name from the field in the AddPresetPanel */
665
+ [preset setObject:@"Classic" forKey:@"PresetName"];
666
+
667
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
668
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
669
-
670
+
671
/*Set whether or not this is default, at creation set to 0*/
672
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
673
-
674
+
675
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
676
[preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"];
677
+
678
+ /* Get the New Preset Description from the field in the AddPresetPanel */
679
+ [preset setObject:@"HandBrake's traditional, faster, lower-quality settings." forKey:@"PresetDescription"];
680
+
681
+ /* File Format */
682
+ [preset setObject:@"MP4 file" forKey:@"FileFormat"];
683
+
684
+ /* Chapter Markers*/
685
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
686
+
687
+ /* Video encoder */
688
+ [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"];
689
+
690
+ /* x264 Option String */
691
+ [preset setObject:@"" forKey:@"x264Option"];
692
+
693
+ /* Video quality */
694
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
695
+ [preset setObject:@"1000" forKey:@"VideoAvgBitrate"];
696
+
697
+ /* Video framerate */
698
+ [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
699
+ [preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
700
+
701
+ /* GrayScale */
702
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
703
+
704
+ /* 2 Pass Encoding */
705
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
706
+
707
+ /*Picture Settings*/
708
+ /* Use Max Picture settings for whatever the dvd is.*/
709
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
710
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
711
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
712
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
713
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
714
+
715
+ /* Explicitly set the filters for built-in presets */
716
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
717
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
718
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
719
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
720
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
721
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
722
+
723
+ /* Set crop settings here */
724
+ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
725
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
726
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
727
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
728
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
729
+
730
+ /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
731
+ * not listed will be set to "None" and not encoded */
732
+ NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
733
+
734
+ /* Track 1 */
735
+ NSMutableDictionary *audioTrack1Array = [[NSMutableDictionary alloc] init];
736
+ [audioTrack1Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
737
+ [audioTrack1Array setObject:@"AAC (faac)" forKey:@"AudioEncoder"];
738
+ [audioTrack1Array setObject:@"Dolby Pro Logic II" forKey:@"AudioMixdown"];
739
+ [audioTrack1Array setObject:@"Auto" forKey:@"AudioSamplerate"];
740
+ [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"];
741
+ [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
742
+ [audioTrack1Array autorelease];
743
+ [audioListArray addObject:audioTrack1Array];
744
+
745
+ [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
746
+
747
+ /* Subtitles*/
748
+ [preset setObject:@"None" forKey:@"Subtitles"];
749
+
750
+ [preset autorelease];
751
+ return preset;
752
+}
753
754
+- (NSDictionary *)createHighProfilePreset
755
+{
756
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
757
+
758
+ /* Get the New Preset Name from the field in the AddPresetPanel */
759
+ [preset setObject:@"High Profile" forKey:@"PresetName"];
760
+
761
+ /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
762
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
763
+
764
+ /*Set whether or not this is default, at creation set to 0*/
765
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
766
+
767
+ /*Get the whether or not to apply pic settings in the AddPresetPanel*/
768
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"];
769
+
770
/* Get the New Preset Description from the field in the AddPresetPanel */
771
[preset setObject:@"HandBrake's general-purpose preset for High Profile H.264 video, with all the bells and whistles." forKey:@"PresetDescription"];
772
-
773
+
774
/* File Format */
775
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
776
-
777
+
778
/* 64-bit MP4 file */
779
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"];
780
-
781
+
782
/* Chapter Markers*/
783
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
784
-
785
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
786
+
787
/* Video encoder */
788
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
789
-
790
+
791
/* x264 Option String */
792
[preset setObject:@"b-adapt=2:rc-lookahead=50" forKey:@"x264Option"];
793
-
794
+
795
/* Video quality */
796
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
797
[preset setObject:@"1800" forKey:@"VideoAvgBitrate"];
798
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
799
-
800
+
801
/* Video framerate */
802
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
803
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
804
-
805
+
806
/* GrayScale */
807
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
808
-
809
+
810
/* 2 Pass Encoding */
811
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
812
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"];
813
-
814
+
815
/*Picture Settings*/
816
/* Use Max Picture settings for whatever the dvd is.*/
817
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
818
819
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
820
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
821
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"];
822
-
823
+
824
/* Explicitly set the filters for built-in presets */
825
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
826
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecombDeinterlace"];
827
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
828
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
829
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
830
- [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureDetelecine"];
831
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
832
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureDecomb"];
833
-
834
+
835
/* Set crop settings here */
836
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
837
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
838
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
839
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
840
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
841
-
842
+
843
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
844
* not listed will be set to "None" and not encoded */
845
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
846
847
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
848
[audioTrack1Array autorelease];
849
[audioListArray addObject:audioTrack1Array];
850
-
851
+
852
/* Track 2 */
853
NSMutableDictionary *audioTrack2Array = [[NSMutableDictionary alloc] init];
854
[audioTrack2Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"];
855
856
[audioTrack2Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
857
[audioTrack2Array autorelease];
858
[audioListArray addObject:audioTrack2Array];
859
-
860
+
861
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
862
-
863
+
864
/* Subtitles*/
865
[preset setObject:@"None" forKey:@"Subtitles"];
866
-
867
+
868
[preset autorelease];
869
return preset;
870
}
871
872
- (NSDictionary *)createiPhonePreset
873
{
874
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
875
-
876
+
877
/* Get the New Preset Name from the field in the AddPresetPanel */
878
[preset setObject:@"iPhone & iPod Touch" forKey:@"PresetName"];
879
-
880
+
881
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
882
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
883
-
884
+
885
/*Set whether or not this is default, at creation set to 0*/
886
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
887
-
888
+
889
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
890
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
891
-
892
+
893
/* Get the New Preset Description from the field in the AddPresetPanel */
894
[preset setObject:@"HandBrake's settings for all iPhones and iPod Touches going back to the original iPhone 2G." forKey:@"PresetDescription"];
895
-
896
+
897
/* File Format */
898
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
899
-
900
+
901
/* Chapter Markers*/
902
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
903
-
904
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
905
+
906
/* Video encoder */
907
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
908
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"];
909
/* x264 Option String */
910
[preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"];
911
-
912
+
913
/* Video quality */
914
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
915
[preset setObject:@"960" forKey:@"VideoAvgBitrate"];
916
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
917
-
918
+
919
/* Video framerate */
920
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
921
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
922
-
923
+
924
/* GrayScale */
925
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
926
-
927
+
928
/* 2 Pass Encoding */
929
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
930
-
931
+
932
/*Picture Settings*/
933
/* Use a width of 480 for the iPhone*/
934
[preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"];
935
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
936
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
937
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
938
-
939
+
940
/* Explicitly set the filters for built-in presets */
941
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
942
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
943
944
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
945
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
946
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
947
-
948
+
949
/* Set crop settings here */
950
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
951
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
952
953
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
954
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
955
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
956
-
957
+
958
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
959
* not listed will be set to "None" and not encoded */
960
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
961
962
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
963
[audioTrack1Array autorelease];
964
[audioListArray addObject:audioTrack1Array];
965
-
966
+
967
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
968
-
969
+
970
/* Subtitles*/
971
[preset setObject:@"None" forKey:@"Subtitles"];
972
-
973
+
974
[preset autorelease];
975
return preset;
976
}
977
978
- (NSDictionary *)createIpodHighPreset
979
{
980
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
981
-
982
+
983
/* Get the New Preset Name from the field in the AddPresetPanel */
984
[preset setObject:@"iPod Legacy" forKey:@"PresetName"];
985
-
986
+
987
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
988
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
989
-
990
+
991
/*Set whether or not this is default, at creation set to 0*/
992
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
993
-
994
+
995
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
996
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
997
-
998
+
999
/* Get the New Preset Description from the field in the AddPresetPanel */
1000
[preset setObject:@"HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod. This is the iPod High-Rez preset from 0.9.2." forKey:@"PresetDescription"];
1001
-
1002
+
1003
/* File Format */
1004
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
1005
-
1006
+
1007
/* Chapter Markers*/
1008
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1009
-
1010
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1011
+
1012
/* Video encoder */
1013
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
1014
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"];
1015
/* x264 Option String */
1016
[preset setObject:@"level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"];
1017
-
1018
+
1019
/* Video quality */
1020
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
1021
[preset setObject:@"1500" forKey:@"VideoAvgBitrate"];
1022
-
1023
+
1024
/* Video framerate */
1025
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
1026
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
1027
-
1028
+
1029
/* GrayScale */
1030
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
1031
-
1032
+
1033
/* 2 Pass Encoding */
1034
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
1035
-
1036
+
1037
/*Picture Settings*/
1038
/* Use a width of 640 for iPod TV-out */
1039
[preset setObject:[NSNumber numberWithInt:640] forKey:@"PictureWidth"];
1040
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
1041
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
1042
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
1043
-
1044
+
1045
/* Explicitly set the filters for built-in presets */
1046
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
1047
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
1048
1049
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
1050
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
1051
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
1052
-
1053
+
1054
/* Set crop settings here */
1055
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
1056
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
1057
1058
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
1059
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
1060
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
1061
-
1062
+
1063
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
1064
* not listed will be set to "None" and not encoded */
1065
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
1066
1067
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
1068
[audioTrack1Array autorelease];
1069
[audioListArray addObject:audioTrack1Array];
1070
-
1071
+
1072
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
1073
-
1074
+
1075
/* Subtitles*/
1076
[preset setObject:@"None" forKey:@"Subtitles"];
1077
-
1078
+
1079
[preset autorelease];
1080
return preset;
1081
}
1082
1083
- (NSDictionary *)createIpodLowPreset
1084
{
1085
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
1086
-
1087
+
1088
/* Get the New Preset Name from the field in the AddPresetPanel */
1089
[preset setObject:@"iPod" forKey:@"PresetName"];
1090
-
1091
+
1092
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
1093
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
1094
-
1095
+
1096
/*Set whether or not this is default, at creation set to 0*/
1097
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
1098
-
1099
+
1100
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
1101
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
1102
-
1103
+
1104
/* Get the New Preset Description from the field in the AddPresetPanel */
1105
[preset setObject:@"HandBrake's low resolution settings for the iPod (5G and up). Optimized for great playback on the iPod screen, with smaller file size." forKey:@"PresetDescription"];
1106
-
1107
+
1108
/* File Format */
1109
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
1110
-
1111
+
1112
/* Chapter Markers*/
1113
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1114
-
1115
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1116
+
1117
/* Video encoder */
1118
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
1119
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"];
1120
/* x264 Option String */
1121
[preset setObject:@"level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"];
1122
-
1123
+
1124
/* Video quality */
1125
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
1126
[preset setObject:@"700" forKey:@"VideoAvgBitrate"];
1127
-
1128
+
1129
/* Video framerate */
1130
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
1131
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
1132
-
1133
+
1134
/* GrayScale */
1135
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
1136
-
1137
+
1138
/* 2 Pass Encoding */
1139
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
1140
-
1141
+
1142
/*Picture Settings*/
1143
/* Use a width of 320 for the iPod screen */
1144
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
1145
1146
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
1147
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
1148
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"];
1149
-
1150
+
1151
/* Explicitly set the filters for built-in presets */
1152
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
1153
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
1154
1155
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
1156
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
1157
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
1158
-
1159
+
1160
/* Set crop settings here */
1161
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
1162
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
1163
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
1164
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
1165
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
1166
-
1167
+
1168
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
1169
* not listed will be set to "None" and not encoded */
1170
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
1171
1172
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
1173
[audioTrack1Array autorelease];
1174
[audioListArray addObject:audioTrack1Array];
1175
-
1176
+
1177
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
1178
-
1179
+
1180
/* Subtitles*/
1181
[preset setObject:@"None" forKey:@"Subtitles"];
1182
-
1183
+
1184
[preset autorelease];
1185
return preset;
1186
}
1187
1188
- (NSDictionary *)createNormalPreset
1189
{
1190
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
1191
-
1192
+
1193
/* Get the New Preset Name from the field in the AddPresetPanel */
1194
[preset setObject:@"Normal" forKey:@"PresetName"];
1195
-
1196
+
1197
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
1198
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
1199
-
1200
+
1201
/*Set whether or not this is default, at creation set to 0*/
1202
[preset setObject:[NSNumber numberWithInt:1] forKey:@"Default"];
1203
-
1204
+
1205
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
1206
[preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"];
1207
-
1208
+
1209
/* Get the New Preset Description from the field in the AddPresetPanel */
1210
[preset setObject:@"HandBrake's normal, default settings." forKey:@"PresetDescription"];
1211
-
1212
+
1213
/* File Format */
1214
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
1215
-
1216
+
1217
/* Chapter Markers*/
1218
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1219
-
1220
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
1221
+
1222
/* Video encoder */
1223
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
1224
-
1225
+
1226
/* x264 Option String */
1227
[preset setObject:@"ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0" forKey:@"x264Option"];
1228
-
1229
+
1230
/* Video quality */
1231
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
1232
[preset setObject:@"1500" forKey:@"VideoAvgBitrate"];
1233
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
1234
-
1235
+
1236
/* Video framerate */
1237
[preset setObject:@"Same as source" forKey:@"VideoFramerate"];
1238
[preset setObject:@"vfr" forKey:@"VideoFramerateMode"];
1239
-
1240
+
1241
/* GrayScale */
1242
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
1243
-
1244
+
1245
/* 2 Pass Encoding */
1246
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
1247
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"];
1248
-
1249
+
1250
/*Picture Settings*/
1251
/* Use Max Picture settings for whatever the dvd is.*/
1252
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
1253
1254
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
1255
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
1256
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
1257
-
1258
+
1259
/* Explicitly set the filters for built-in presets */
1260
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"];
1261
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
1262
1263
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"];
1264
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
1265
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
1266
-
1267
+
1268
/* Set crop settings here */
1269
/* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
1270
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
1271
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
1272
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
1273
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
1274
-
1275
+
1276
/* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track
1277
* not listed will be set to "None" and not encoded */
1278
NSMutableArray *audioListArray = [[NSMutableArray alloc] init];
1279
1280
[audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"];
1281
[audioTrack1Array autorelease];
1282
[audioListArray addObject:audioTrack1Array];
1283
-
1284
+
1285
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
1286
-
1287
+
1288
/* Subtitles*/
1289
[preset setObject:@"None" forKey:@"Subtitles"];
1290
-
1291
+
1292
[preset autorelease];
1293
return preset;
1294
}
1295
HandBrake-0.9.6.tar.bz2/make/configure.py -> HandBrake-0.9.8.tar.bz2/make/configure.py
Changed
19
1
2
self.root = 'svn://nowhere.com/project'
3
self.branch = 'unknown'
4
self.uuid = '00000000-0000-0000-0000-000000000000';
5
- self.rev = 4474
6
+ self.rev = 4860
7
self.date = '0000-00-00 00:00:00 -0000'
8
self.official = 0
9
self.type = 'unofficial'
10
11
12
self.vmajor = 0
13
self.vminor = 9
14
- self.vpoint = 6
15
+ self.vpoint = 8
16
17
def _action( self ):
18
## add architecture to URL only for Mac
19
HandBrake-0.9.6.tar.bz2/make/include/contrib.defs -> HandBrake-0.9.8.tar.bz2/make/include/contrib.defs
Changed
10
1
2
$(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="$$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra)"
3
endif
4
$(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="$$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra)"
5
- $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="$$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver)"
6
+ $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="$$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe)"
7
$(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig"
8
9
$(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH
10
HandBrake-0.9.6.tar.bz2/make/include/gcc.defs -> HandBrake-0.9.8.tar.bz2/make/include/gcc.defs
Changed
22
1
2
GCC.args.l = -l$(1)
3
GCC.args.end = -Wl,--end-group
4
5
-GCC.args.extra =
6
+GCC.args.extra = $(CFLAGS) $(CPPFLAGS)
7
GCC.args.extra.h_o =
8
GCC.args.extra.c_o =
9
-GCC.args.extra.dylib =
10
-GCC.args.extra.exe =
11
+GCC.args.extra.dylib = $(LDFLAGS)
12
+GCC.args.extra.exe = $(LDFLAGS)
13
GCC.args.extra.hpp_o =
14
GCC.args.extra.cpp_o =
15
-GCC.args.extra.dylib++ =
16
-GCC.args.extra.exe++ =
17
+GCC.args.extra.dylib++ = $(LDFLAGS)
18
+GCC.args.extra.exe++ = $(LDFLAGS)
19
20
###############################################################################
21
22
HandBrake-0.9.6.tar.bz2/make/include/main.defs -> HandBrake-0.9.8.tar.bz2/make/include/main.defs
Changed
13
1
2
MODULES += gtk
3
endif
4
5
+ifeq (1-gnu,$(FEATURE.gtk)-$(BUILD.system))
6
+ ## build gtk when gtk+gnu
7
+ MODULES += gtk
8
+endif
9
+
10
ifeq (1,$(FEATURE.local_yasm))
11
MODULES += contrib/yasm
12
endif
13
HandBrake-0.9.8.tar.bz2/make/variant/gnu.defs
Added
13
1
2
+TARGET.dylib.ext = .so
3
+
4
+GCC.start = 1
5
+GCC.end = 1
6
+GCC.args.dylib = -shared
7
+GCC.args.pic = 1
8
+
9
+GCC.args.g.none = -g0
10
+GCC.args.g.min = -g1
11
+GCC.args.g.std = -g2
12
+GCC.args.g.max = -g3
13
HandBrake-0.9.8.tar.bz2/make/variant/kfreebsd.defs
Added
13
1
2
+TARGET.dylib.ext = .so
3
+
4
+GCC.start = 1
5
+GCC.end = 1
6
+GCC.args.dylib = -shared
7
+GCC.args.pic = 1
8
+
9
+GCC.args.g.none = -g0
10
+GCC.args.g.min = -g1
11
+GCC.args.g.std = -g2
12
+GCC.args.g.max = -g3
13
HandBrake-0.9.6.tar.bz2/scripts/manicure.rb -> HandBrake-0.9.8.tar.bz2/scripts/manicure.rb
Changed
578
1
2
audioEncoders << "lame"
3
when /FLAC/
4
audioEncoders << "ffflac"
5
+ when /Auto Pass/
6
+ audioEncoders << "copy"
7
end
8
9
#Mixdowns
10
case audioTrack["AudioMixdown"]
11
- when /Mono/
12
- audioMixdowns << "mono"
13
- when /Stereo/
14
- audioMixdowns << "stereo"
15
- when /Dolby Surround/
16
- audioMixdowns << "dpl1"
17
- when /Dolby Pro Logic II/
18
- audioMixdowns << "dpl2"
19
- when /discrete/
20
- audioMixdowns << "6ch"
21
- when /None/
22
- audioMixdowns << "auto"
23
+ when /Mono/
24
+ audioMixdowns << "mono"
25
+ when /Stereo/
26
+ audioMixdowns << "stereo"
27
+ when /Dolby Surround/
28
+ audioMixdowns << "dpl1"
29
+ when /Dolby Pro Logic II/
30
+ audioMixdowns << "dpl2"
31
+ when /discrete/
32
+ audioMixdowns << "6ch"
33
+ when /None/
34
+ audioMixdowns << "auto"
35
end
36
37
#Samplerates
38
39
commandString << " -6 " << audioMixdowns
40
commandString << " -R " << audioSamplerates
41
commandString << " -D " << audioTrackDRCs
42
+
43
+ #Auto Passthru Mask
44
+ audioCopyMask = ""
45
+
46
+ if hash["AudioAllowAACPass"].to_i == 1
47
+ audioCopyMask << "aac"
48
+ end
49
+ if hash["AudioAllowAC3Pass"].to_i == 1
50
+ if audioCopyMask.size > 0
51
+ audioCopyMask << ","
52
+ end
53
+ audioCopyMask << "ac3"
54
+ end
55
+ if hash["AudioAllowDTSHDPass"].to_i == 1
56
+ if audioCopyMask.size > 0
57
+ audioCopyMask << ","
58
+ end
59
+ audioCopyMask << "dtshd"
60
+ end
61
+ if hash["AudioAllowDTSPass"].to_i == 1
62
+ if audioCopyMask.size > 0
63
+ audioCopyMask << ","
64
+ end
65
+ audioCopyMask << "dts"
66
+ end
67
+ if hash["AudioAllowMP3Pass"].to_i == 1
68
+ if audioCopyMask.size > 0
69
+ audioCopyMask << ","
70
+ end
71
+ audioCopyMask << "mp3"
72
+ end
73
+
74
+ if audioCopyMask.size > 0
75
+ commandString << " --audio-copy-mask " << audioCopyMask
76
+ end
77
+
78
+ #Auto Passthru Fallback
79
+ audioEncoderFallback = ""
80
+
81
+ case hash["AudioEncoderFallback"]
82
+ when /AC3/
83
+ audioEncoderFallback << "ffac3"
84
+ when "AAC (ffmpeg)"
85
+ audioEncoderFallback << "ffaac"
86
+ when /AAC/
87
+ audioEncoderFallback << "faac"
88
+ when /Vorbis/
89
+ audioEncoderFallback << "vorbis"
90
+ when /MP3/
91
+ audioEncoderFallback << "lame"
92
+ when /FLAC/
93
+ audioEncoderFallback << "ffflac"
94
+ end
95
+
96
+ if audioEncoderFallback.size > 0
97
+ commandString << " --audio-fallback " << audioEncoderFallback
98
+ end
99
100
#Container
101
commandString << " -f "
102
103
commandString << " -4"
104
end
105
106
+ #MP4 Optimize for HTTP Streaming
107
+ if hash["Mp4HttpOptimize"].to_i == 1
108
+ commandString << " -O"
109
+ end
110
+
111
#Cropping
112
if hash["PictureAutoCrop"] == 0
113
commandString << " --crop "
114
115
commandString << " --denoise=\"strong\""
116
end
117
118
+ case hash["PictureDecomb"]
119
+ when 1
120
+ commandString << " --decomb=\\\"" << hash["PictureDecombCustom"].to_s << "\\\""
121
+ when 2
122
+ commandString << " --decomb"
123
+ when 3
124
+ commandString << " --decomb=\\\"7:2:6:9:1:80\\\""
125
+ end
126
+
127
if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
128
if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
129
- if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
130
131
end
132
133
134
commandString << " --custom-anamorphic"
135
end
136
137
+ #Modulus
138
+ if hash["PictureModulus"]
139
+ commandString << " --modulus " << hash["PictureModulus"].to_s
140
+ end
141
+
142
#Booleans
143
if hash["ChapterMarkers"] == 1 then commandString << " -m" end
144
if hash["VideoGrayScale"] == 1 then commandString << " -g" end
145
146
audioEncoders << "lame"
147
when /FLAC/
148
audioEncoders << "ffflac"
149
+ when /Auto Pass/
150
+ audioEncoders << "copy"
151
end
152
153
#Mixdowns
154
case audioTrack["AudioMixdown"]
155
- when /Mono/
156
- audioMixdowns << "mono"
157
- when /Stereo/
158
- audioMixdowns << "stereo"
159
- when /Dolby Surround/
160
- audioMixdowns << "dpl1"
161
- when /Dolby Pro Logic II/
162
- audioMixdowns << "dpl2"
163
- when /discrete/
164
- audioMixdowns << "6ch"
165
- when /None/
166
- audioMixdowns << "auto"
167
+ when /Mono/
168
+ audioMixdowns << "mono"
169
+ when /Stereo/
170
+ audioMixdowns << "stereo"
171
+ when /Dolby Surround/
172
+ audioMixdowns << "dpl1"
173
+ when /Dolby Pro Logic II/
174
+ audioMixdowns << "dpl2"
175
+ when /discrete/
176
+ audioMixdowns << "6ch"
177
+ when /None/
178
+ audioMixdowns << "auto"
179
end
180
181
#Samplerates
182
183
commandString << " -R " << audioSamplerates
184
commandString << " -D " << audioTrackDRCs
185
186
+ #Auto Passthru Mask
187
+ audioCopyMask = ""
188
+
189
+ if hash["AudioAllowAACPass"].to_i == 1
190
+ audioCopyMask << "aac"
191
+ end
192
+ if hash["AudioAllowAC3Pass"].to_i == 1
193
+ if audioCopyMask.size > 0
194
+ audioCopyMask << ","
195
+ end
196
+ audioCopyMask << "ac3"
197
+ end
198
+ if hash["AudioAllowDTSHDPass"].to_i == 1
199
+ if audioCopyMask.size > 0
200
+ audioCopyMask << ","
201
+ end
202
+ audioCopyMask << "dtshd"
203
+ end
204
+ if hash["AudioAllowDTSPass"].to_i == 1
205
+ if audioCopyMask.size > 0
206
+ audioCopyMask << ","
207
+ end
208
+ audioCopyMask << "dts"
209
+ end
210
+ if hash["AudioAllowMP3Pass"].to_i == 1
211
+ if audioCopyMask.size > 0
212
+ audioCopyMask << ","
213
+ end
214
+ audioCopyMask << "mp3"
215
+ end
216
+
217
+ if audioCopyMask.size > 0
218
+ commandString << " --audio-copy-mask " << audioCopyMask
219
+ end
220
+
221
+ #Auto Passthru Fallback
222
+ audioEncoderFallback = ""
223
+
224
+ case hash["AudioEncoderFallback"]
225
+ when /AC3/
226
+ audioEncoderFallback << "ffac3"
227
+ when "AAC (ffmpeg)"
228
+ audioEncoderFallback << "ffaac"
229
+ when /AAC/
230
+ audioEncoderFallback << "faac"
231
+ when /Vorbis/
232
+ audioEncoderFallback << "vorbis"
233
+ when /MP3/
234
+ audioEncoderFallback << "lame"
235
+ when /FLAC/
236
+ audioEncoderFallback << "ffflac"
237
+ end
238
+
239
+ if audioEncoderFallback.size > 0
240
+ commandString << " --audio-fallback " << audioEncoderFallback
241
+ end
242
+
243
#Container
244
commandString << " -f "
245
case hash["FileFormat"]
246
247
commandString << " -4"
248
end
249
250
+ #MP4 Optimize for HTTP Streaming
251
+ if hash["Mp4HttpOptimize"].to_i == 1
252
+ commandString << " -O"
253
+ end
254
+
255
#Cropping
256
if hash["PictureAutoCrop"] == 0
257
commandString << " --crop "
258
259
commandString << " --denoise=\"strong\""
260
end
261
262
+ case hash["PictureDecomb"]
263
+ when 1
264
+ commandString << " --decomb=\\\"" << hash["PictureDecombCustom"].to_s << "\\\""
265
+ when 2
266
+ commandString << " --decomb"
267
+ when 3
268
+ commandString << " --decomb=\\\"7:2:6:9:1:80\\\""
269
+ end
270
+
271
if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
272
if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
273
- if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
274
+
275
end
276
277
#Anamorphic
278
279
commandString << " --custom-anamorphic"
280
end
281
282
+ #Modulus
283
+ if hash["PictureModulus"]
284
+ commandString << " --modulus " << hash["PictureModulus"].to_s
285
+ end
286
+
287
#Booleans
288
if hash["ChapterMarkers"] == 1 then commandString << " -m" end
289
if hash["VideoGrayScale"] == 1 then commandString << " -g" end
290
291
commandString << "job->largeFileSize = 1;\n "
292
end
293
294
+ #MP4 Optimize for HTTP Streaming
295
+ if hash["Mp4HttpOptimize"].to_i == 1
296
+ commandString << "job->mp4_optimize = 1;\n "
297
+ end
298
+
299
#Video encoder
300
if hash["VideoEncoder"] != "MPEG-4 (FFmpeg)"
301
commandString << "vcodec = "
302
303
audioEncoders << "lame"
304
when /FLAC/
305
audioEncoders << "ffflac"
306
+ when /Auto Pass/
307
+ audioEncoders << "copy"
308
end
309
310
#Mixdowns
311
case audioTrack["AudioMixdown"]
312
- when /Mono/
313
- audioMixdowns << "mono"
314
- when /Stereo/
315
- audioMixdowns << "stereo"
316
- when /Dolby Surround/
317
- audioMixdowns << "dpl1"
318
- when /Dolby Pro Logic II/
319
- audioMixdowns << "dpl2"
320
- when /discrete/
321
- audioMixdowns << "6ch"
322
- when /None/
323
- audioMixdowns << "auto"
324
+ when /Mono/
325
+ audioMixdowns << "mono"
326
+ when /Stereo/
327
+ audioMixdowns << "stereo"
328
+ when /Dolby Surround/
329
+ audioMixdowns << "dpl1"
330
+ when /Dolby Pro Logic II/
331
+ audioMixdowns << "dpl2"
332
+ when /discrete/
333
+ audioMixdowns << "6ch"
334
+ when /None/
335
+ audioMixdowns << "auto"
336
end
337
338
#Samplerates
339
340
commandString << "\");\n "
341
commandString << "}\n "
342
343
+ #Auto Passthru Mask
344
+ if hash["AudioAllowAACPass"]
345
+ commandString << "if( allowed_audio_copy == -1 )\n "
346
+ commandString << "{\n "
347
+ commandString << " allowed_audio_copy = 0;\n "
348
+ if hash["AudioAllowAACPass"].to_i == 1
349
+ commandString << " allowed_audio_copy |= HB_ACODEC_AAC_PASS;\n "
350
+ end
351
+ if hash["AudioAllowAC3Pass"].to_i == 1
352
+ commandString << " allowed_audio_copy |= HB_ACODEC_AC3_PASS;\n "
353
+ end
354
+ if hash["AudioAllowDTSHDPass"].to_i == 1
355
+ commandString << " allowed_audio_copy |= HB_ACODEC_DCA_HD_PASS;\n "
356
+ end
357
+ if hash["AudioAllowDTSPass"].to_i == 1
358
+ commandString << " allowed_audio_copy |= HB_ACODEC_DCA_PASS;\n "
359
+ end
360
+ if hash["AudioAllowMP3Pass"].to_i == 1
361
+ commandString << " allowed_audio_copy |= HB_ACODEC_MP3_PASS;\n "
362
+ end
363
+ commandString << " allowed_audio_copy &= HB_ACODEC_PASS_MASK;\n "
364
+ commandString << "}\n "
365
+ end
366
+
367
+ #Auto Passthru Fallback
368
+ audioEncoderFallback = ""
369
+
370
+ case hash["AudioEncoderFallback"]
371
+ when /AC3/
372
+ audioEncoderFallback << "HB_ACODEC_AC3"
373
+ when "AAC (ffmpeg)"
374
+ audioEncoderFallback << "HB_ACODEC_FFAAC"
375
+ when /AAC/
376
+ audioEncoderFallback << "HB_ACODEC_FAAC"
377
+ when /Vorbis/
378
+ audioEncoderFallback << "HB_ACODEC_VORBIS"
379
+ when /MP3/
380
+ audioEncoderFallback << "HB_ACODEC_LAME"
381
+ when /FLAC/
382
+ audioEncoderFallback << "HB_ACODEC_FFFLAC"
383
+ end
384
+
385
+ if audioEncoderFallback.size > 0
386
+ commandString << "if( !acodec_fallback )\n "
387
+ commandString << "{\n "
388
+ commandString << " acodec_fallback = " << audioEncoderFallback
389
+ commandString << ";\n "
390
+ commandString << "}\n "
391
+ end
392
+
393
#Cropping
394
if hash["PictureAutoCrop"] == 0
395
commandString << "job->crop[0] = " << hash["PictureTopCrop"].to_s << ";\n "
396
397
commandString << "denoise_opt = \"7:7:5:5\";\n "
398
end
399
400
+ case hash["PictureDecomb"]
401
+ when 1
402
+ commandString << "decomb = 1;\n "
403
+ commandString << "decomb_opt = strdup(\"" << hash["PictureDecombCustom"].to_s << "\");\n "
404
+ when 2
405
+ commandString << "decomb = 1;\n "
406
+ when 3
407
+ commandString << "decomb = 1;\n "
408
+ commandString << "decomb_opt = strdup(\"7:2:6:9:1:80\");\n "
409
+ end
410
+
411
if hash["PictureDetelecine"] == 2 then commandString << "detelecine = 1;\n " end
412
if hash["PictureDeblock"] != 0
413
then
414
commandString << "deblock = 1;\n "
415
commandString << "deblock_opt = \"" << hash["PictureDeblock"].to_s << "\";\n "
416
end
417
- if hash["PictureDecomb"] == 2 then commandString << "decomb = 1;\n " end
418
419
end
420
421
422
commandString << "}\n "
423
end
424
425
+ #Modulus
426
+ if hash["PictureModulus"]
427
+ commandString << "modulus = " << hash["PictureModulus"].to_s << ";\n "
428
+ end
429
+
430
#Booleans
431
if hash["ChapterMarkers"] == 1 then commandString << "job->chapter_markers = 1;\n " end
432
if hash["VideoGrayScale"] == 1 then commandString << "job->grayscale = 1;\n " end
433
434
audioEncoders << "lame"
435
when /FLAC/
436
audioEncoders << "ffflac"
437
+ when /Auto Pass/
438
+ audioEncoders << "copy"
439
end
440
441
#Mixdowns
442
case audioTrack["AudioMixdown"]
443
- when /Mono/
444
- audioMixdowns << "mono"
445
- when /Stereo/
446
- audioMixdowns << "stereo"
447
- when /Dolby Surround/
448
- audioMixdowns << "dpl1"
449
- when /Dolby Pro Logic II/
450
- audioMixdowns << "dpl2"
451
- when /discrete/
452
- audioMixdowns << "6ch"
453
- when /None/
454
- audioMixdowns << "auto"
455
+ when /Mono/
456
+ audioMixdowns << "mono"
457
+ when /Stereo/
458
+ audioMixdowns << "stereo"
459
+ when /Dolby Surround/
460
+ audioMixdowns << "dpl1"
461
+ when /Dolby Pro Logic II/
462
+ audioMixdowns << "dpl2"
463
+ when /discrete/
464
+ audioMixdowns << "6ch"
465
+ when /None/
466
+ audioMixdowns << "auto"
467
end
468
469
#Samplerates
470
471
commandString << " -R " << audioSamplerates
472
commandString << " -D " << audioTrackDRCs
473
474
+ #Auto Passthru Mask
475
+ audioCopyMask = ""
476
+
477
+ if hash["AudioAllowAACPass"].to_i == 1
478
+ audioCopyMask << "aac"
479
+ end
480
+ if hash["AudioAllowAC3Pass"].to_i == 1
481
+ if audioCopyMask.size > 0
482
+ audioCopyMask << ","
483
+ end
484
+ audioCopyMask << "ac3"
485
+ end
486
+ if hash["AudioAllowDTSHDPass"].to_i == 1
487
+ if audioCopyMask.size > 0
488
+ audioCopyMask << ","
489
+ end
490
+ audioCopyMask << "dtshd"
491
+ end
492
+ if hash["AudioAllowDTSPass"].to_i == 1
493
+ if audioCopyMask.size > 0
494
+ audioCopyMask << ","
495
+ end
496
+ audioCopyMask << "dts"
497
+ end
498
+ if hash["AudioAllowMP3Pass"].to_i == 1
499
+ if audioCopyMask.size > 0
500
+ audioCopyMask << ","
501
+ end
502
+ audioCopyMask << "mp3"
503
+ end
504
+
505
+ if audioCopyMask.size > 0
506
+ commandString << " --audio-copy-mask " << audioCopyMask
507
+ end
508
+
509
+ #Auto Passthru Fallback
510
+ audioEncoderFallback = ""
511
+
512
+ case hash["AudioEncoderFallback"]
513
+ when /AC3/
514
+ audioEncoderFallback << "ffac3"
515
+ when "AAC (ffmpeg)"
516
+ audioEncoderFallback << "ffaac"
517
+ when /AAC/
518
+ audioEncoderFallback << "faac"
519
+ when /Vorbis/
520
+ audioEncoderFallback << "vorbis"
521
+ when /MP3/
522
+ audioEncoderFallback << "lame"
523
+ when /FLAC/
524
+ audioEncoderFallback << "ffflac"
525
+ end
526
+
527
+ if audioEncoderFallback.size > 0
528
+ commandString << " --audio-fallback " << audioEncoderFallback
529
+ end
530
+
531
#Container
532
commandString << " -f "
533
case hash["FileFormat"]
534
535
commandString << " -4"
536
end
537
538
+ #MP4 Optimize for HTTP Streaming
539
+ if hash["Mp4HttpOptimize"].to_i == 1
540
+ commandString << " -O"
541
+ end
542
+
543
#Cropping
544
if hash["PictureAutoCrop"] == 0
545
commandString << " --crop "
546
547
commandString << " --denoise=\\\"strong\\\""
548
end
549
550
+ case hash["PictureDecomb"]
551
+ when 1
552
+ commandString << " --decomb=\\\"" << hash["PictureDecombCustom"].to_s << "\\\""
553
+ when 2
554
+ commandString << " --decomb"
555
+ when 3
556
+ commandString << " --decomb=\\\"7:2:6:9:1:80\\\""
557
+ end
558
+
559
if hash["PictureDetelecine"] == 2 then commandString << " --detelecine" end
560
if hash["PictureDeblock"] != 0 then commandString << " --deblock=" << hash["PictureDeblock"].to_s end
561
- if hash["PictureDecomb"] == 2 then commandString << " --decomb" end
562
+
563
end
564
565
#Anamorphic
566
567
commandString << " --custom-anamorphic"
568
end
569
570
+ #Modulus
571
+ if hash["PictureModulus"]
572
+ commandString << " --modulus " << hash["PictureModulus"].to_s
573
+ end
574
+
575
#Booleans
576
if hash["ChapterMarkers"] == 1 then commandString << " -m" end
577
if hash["VideoGrayScale"] == 1 then commandString << " -g" end
578
HandBrake-0.9.6.tar.bz2/test/test.c -> HandBrake-0.9.8.tar.bz2/test/test.c
Changed
166
1
2
static hb_list_t * audios = NULL;
3
static hb_audio_config_t * audio = NULL;
4
static int num_audio_tracks = 0;
5
-static int allowed_audio_copy = HB_ACODEC_PASS_MASK;
6
+static int allowed_audio_copy = -1;
7
static char * mixdowns = NULL;
8
static char * dynamic_range_compression = NULL;
9
static char * audio_gain = NULL;
10
11
{
12
dynamic_range_compression = strdup("0.0");
13
}
14
- maxWidth = 1024;
15
+ maxWidth = 1280;
16
if( !anamorphic_mode )
17
{
18
anamorphic_mode = 2;
19
20
job->chapter_markers = 1;
21
22
}
23
+
24
+ if (!strcmp(preset_name, "AppleTV 3"))
25
+ {
26
+ if( !mux )
27
+ {
28
+ mux = HB_MUX_MP4;
29
+ }
30
+ job->largeFileSize = 1;
31
+ vcodec = HB_VCODEC_X264;
32
+ job->vquality = 20.0;
33
+ job->cfr = 2;
34
+ if( !atracks )
35
+ {
36
+ atracks = strdup("1,1");
37
+ }
38
+ if( !acodecs )
39
+ {
40
+ acodecs = strdup("faac,copy:ac3");
41
+ }
42
+ if( !abitrates )
43
+ {
44
+ abitrates = str_split("160,160", ',');
45
+ }
46
+ if( !mixdowns )
47
+ {
48
+ mixdowns = strdup("dpl2,auto");
49
+ }
50
+ if( !arates )
51
+ {
52
+ arates = strdup("Auto,Auto");
53
+ }
54
+ if( !dynamic_range_compression )
55
+ {
56
+ dynamic_range_compression = strdup("0.0,0.0");
57
+ }
58
+ maxWidth = 1920;
59
+ if( !advanced_opts )
60
+ {
61
+ advanced_opts = strdup("b-adapt=2");
62
+ }
63
+ decomb = 1;
64
+ decomb_opt = strdup("7:2:6:9:1:80");
65
+ if( !anamorphic_mode )
66
+ {
67
+ anamorphic_mode = 2;
68
+ }
69
+ modulus = 2;
70
+ job->chapter_markers = 1;
71
+
72
+ }
73
74
if (!strcmp(preset_name, "Android Mid"))
75
{
76
77
{
78
advanced_opts = strdup("b-adapt=2:rc-lookahead=50");
79
}
80
- detelecine = 1;
81
decomb = 1;
82
if( !anamorphic_mode )
83
{
84
85
if( audio->out.codec == HB_ACODEC_AUTO_PASS )
86
{
87
// Auto Passthru
88
- job->acodec_copy_mask = allowed_audio_copy;
89
+ job->acodec_copy_mask = allowed_audio_copy == -1 ? HB_ACODEC_PASS_MASK : allowed_audio_copy;
90
job->acodec_fallback = acodec_fallback ? get_acodec_for_string( acodec_fallback ) : 0;
91
// sanitize the fallback; -1 isn't a valid HB_ACODEC_* value
92
if( job->acodec_fallback == -1 )
93
94
" Separated by commas for more than one subtitle track.\n"
95
" Example: \"1,2,3\" for multiple tracks.\n"
96
" If \"string\" is omitted, the first track is forced.\n"
97
- " --subtitle-burn \"Burn\" the selected subtitle into the video track\n"
98
+ " --subtitle-burned \"Burn\" the selected subtitle into the video track\n"
99
" <number> If \"number\" is omitted, the first track is burned.\n"
100
" \"number\" is an index into the subtitle list\n"
101
" specified with '--subtitle'.\n"
102
103
fprintf( stderr, "%s - %s - %s\n", HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE );
104
105
printf("\n< Devices\n");
106
-
107
+
108
printf("\n + Universal: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6\n");
109
-
110
+
111
printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0\n");
112
-
113
+
114
printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n");
115
-
116
+
117
printf("\n + iPhone 4: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 960 --loose-anamorphic -m\n");
118
-
119
- printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1024 --loose-anamorphic -m\n");
120
-
121
+
122
+ printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m\n");
123
+
124
printf("\n + AppleTV: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n");
125
-
126
+
127
printf("\n + AppleTV 2: -e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m\n");
128
-
129
+
130
+ printf("\n + AppleTV 3: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1920 --decomb=\"7:2:6:9:1:80\" --loose-anamorphic --modulus 2 -m -x b-adapt=2\n");
131
+
132
printf("\n + Android Mid: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n");
133
-
134
+
135
printf("\n + Android High: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 720 --loose-anamorphic -x weightp=0:cabac=0\n");
136
-
137
+
138
printf("\n>\n");
139
-
140
+
141
printf("\n< Regular\n");
142
-
143
+
144
printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 --strict-anamorphic -m -x ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0\n");
145
-
146
- printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --detelecine --decomb --loose-anamorphic -m -x b-adapt=2:rc-lookahead=50\n");
147
-
148
+
149
+ printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --decomb --loose-anamorphic -m -x b-adapt=2:rc-lookahead=50\n");
150
+
151
printf("\n>\n");
152
-
153
+
154
printf("\n< Legacy\n");
155
-
156
+
157
printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4\n");
158
-
159
+
160
printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0\n");
161
-
162
+
163
printf("\n>\n");
164
165
}
166
HandBrake-0.9.6.tar.bz2/win/CS/Controls/AudioPanel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/Controls/AudioPanel.cs
Changed
35
1
2
using System.Collections.Specialized;
3
using System.ComponentModel;
4
using System.Drawing;
5
+ using System.Globalization;
6
using System.Linq;
7
using System.Windows.Forms;
8
9
10
case "drp_audioSample":
11
12
double samplerate;
13
- double.TryParse(drp_audioSample.Text, out samplerate);
14
+ double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate);
15
track.SampleRate = samplerate;
16
break;
17
case "drp_audioBitrate":
18
19
double samplerate;
20
21
int.TryParse(drp_audioBitrate.Text, out bitrate);
22
- double.TryParse(drp_audioSample.Text, out samplerate);
23
+ double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate);
24
25
// Create the Model
26
AudioTrack track = new AudioTrack
27
28
case "DTS-HD Passthru":
29
case "AAC Passthru":
30
case "MP3 Passthru":
31
+ case "Auto Passthru":
32
drp_audioMix.SelectedItem = None;
33
break;
34
}
35
HandBrake-0.9.6.tar.bz2/win/CS/Functions/Main.cs -> HandBrake-0.9.8.tar.bz2/win/CS/Functions/Main.cs
Changed
18
1
2
{
3
// Get the Source Name and remove any invalid characters
4
string sourceName = Path.GetInvalidFileNameChars().Aggregate(mainWindow.SourceName, (current, character) => current.Replace(character.ToString(), string.Empty));
5
- sourceName = Path.GetFileNameWithoutExtension(sourceName);
6
7
// Remove Underscores
8
if (UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNameRemoveUnderscore))
9
10
}
11
catch (Exception e)
12
{
13
- UserSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, string.Empty);
14
+ UserSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, 0);
15
UserSettingService.SetUserSetting(ASUserSettingConstants.HandBrakePlatform, string.Empty);
16
UserSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeVersion, string.Empty);
17
UserSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeExeHash, string.Empty);
18
HandBrake-0.9.6.tar.bz2/win/CS/Functions/QueryGenerator.cs -> HandBrake-0.9.8.tar.bz2/win/CS/Functions/QueryGenerator.cs
Changed
31
1
2
query += string.Format(" --start-at frame:{0} --stop-at frame:{1}", mainWindow.drop_chapterStart.Text, calculatedDuration);
3
break;
4
case 3: // Preview
5
- query += " --previews " + UserSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount) + " ";
6
query += " --start-at-preview " + preview;
7
query += " --stop-at duration:" + duration + " ";
8
break;
9
10
: string.Format(",{0}", Converters.GetCliMixDown(audioTrack.MixDown));
11
12
// Audio Samplerates (-R)
13
- string rate = audioTrack.SampleRate == 0 ? "Auto" : audioTrack.SampleRate.ToString(); // Default to "Auto"
14
+ string rate = audioTrack.SampleRate == 0 ? "Auto" : audioTrack.SampleRate.ToString(Culture); // Default to "Auto"
15
samplerates += string.IsNullOrEmpty(samplerates) ? rate : string.Format(",{0}", rate);
16
17
// Audio Bitrates (-B)
18
19
if (UserSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav))
20
query += " --no-dvdnav";
21
22
+ if (UserSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount) != 10)
23
+ {
24
+ query += string.Format(
25
+ " --previews {0} ", UserSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount));
26
+ }
27
+
28
return query;
29
}
30
31
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
Changed
22
1
2
<OutputPath>bin\x86\Release\</OutputPath>
3
<Optimize>true</Optimize>
4
<DefineConstants>DEBUG;TRACE</DefineConstants>
5
+ <DebugType>full</DebugType>
6
+ <DebugSymbols>true</DebugSymbols>
7
</PropertyGroup>
8
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
9
<PlatformTarget>x64</PlatformTarget>
10
11
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
12
<PlatformTarget>x64</PlatformTarget>
13
<OutputPath>bin\x64\Release\</OutputPath>
14
- <DefineConstants>TRACE</DefineConstants>
15
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
16
<Optimize>true</Optimize>
17
+ <DebugType>full</DebugType>
18
+ <DebugSymbols>true</DebugSymbols>
19
</PropertyGroup>
20
<ItemGroup>
21
<Reference Include="Castle.Core">
22
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
Changed
98
1
2
}
3
4
#region Source
5
+
6
+ /// <summary>
7
+ /// Initializes a new instance of the <see cref="EncodeTask"/> class.
8
+ /// Copy Constructor
9
+ /// </summary>
10
+ /// <param name="task">
11
+ /// The task.
12
+ /// </param>
13
+ public EncodeTask(EncodeTask task)
14
+ {
15
+ this.AdvancedEncoderOptions = task.AdvancedEncoderOptions;
16
+ this.AllowedPassthruOptions = new AllowedPassthru(task.AllowedPassthruOptions);
17
+ this.Anamorphic = task.Anamorphic;
18
+ this.Angle = task.Angle;
19
+
20
+ this.AudioTracks = new ObservableCollection<AudioTrack>();
21
+ foreach (AudioTrack track in task.AudioTracks)
22
+ {
23
+ this.AudioTracks.Add(new AudioTrack(track));
24
+ }
25
+
26
+
27
+ this.ChapterNames = new ObservableCollection<ChapterMarker>();
28
+ foreach (ChapterMarker track in task.ChapterNames)
29
+ {
30
+ this.ChapterNames.Add(new ChapterMarker(track));
31
+ }
32
+
33
+ this.ChapterMarkersFilePath = task.ChapterMarkersFilePath;
34
+ this.Cropping = new Cropping(task.Cropping);
35
+ this.CustomDecomb = task.CustomDecomb;
36
+ this.CustomDeinterlace = task.CustomDeinterlace;
37
+ this.CustomDenoise = task.CustomDenoise;
38
+ this.CustomDetelecine = task.CustomDetelecine;
39
+ this.Deblock = task.Deblock;
40
+ this.Decomb = task.Decomb;
41
+ this.Deinterlace = task.Deinterlace;
42
+ this.Denoise = task.Denoise;
43
+ this.Destination = task.Destination;
44
+ this.Detelecine = task.Detelecine;
45
+ this.DisableLibDvdNav = task.DisableLibDvdNav;
46
+ this.DisplayWidth = task.DisplayWidth;
47
+ this.EndPoint = task.EndPoint;
48
+ this.Framerate = task.Framerate;
49
+ this.FramerateMode = task.FramerateMode;
50
+ this.Grayscale = task.Grayscale;
51
+ this.HasCropping = task.HasCropping;
52
+ this.Height = task.Height;
53
+ this.IncludeChapterMarkers = task.IncludeChapterMarkers;
54
+ this.IPod5GSupport = task.IPod5GSupport;
55
+ this.KeepDisplayAspect = task.KeepDisplayAspect;
56
+ this.LargeFile = task.LargeFile;
57
+ this.MaxHeight = task.MaxHeight;
58
+ this.MaxWidth = task.MaxWidth;
59
+ this.Modulus = task.Modulus;
60
+ this.OptimizeMP4 = task.OptimizeMP4;
61
+ this.OutputFormat = task.OutputFormat;
62
+ this.PixelAspectX = task.PixelAspectX;
63
+ this.PixelAspectY = task.PixelAspectY;
64
+ this.PointToPointMode = task.PointToPointMode;
65
+ this.PresetBuildNumber = task.PresetBuildNumber;
66
+ this.PresetDescription = task.PresetDescription;
67
+ this.PresetName = task.PresetName;
68
+ this.Quality = task.Quality;
69
+ this.Source = task.Source;
70
+ this.StartPoint = task.StartPoint;
71
+
72
+ this.SubtitleTracks = new ObservableCollection<SubtitleTrack>();
73
+ foreach (SubtitleTrack subtitleTrack in task.SubtitleTracks)
74
+ {
75
+ this.SubtitleTracks.Add(new SubtitleTrack(subtitleTrack));
76
+ }
77
+
78
+ this.Title = task.Title;
79
+ this.TurboFirstPass = task.TurboFirstPass;
80
+ this.TwoPass = task.TwoPass;
81
+ this.Type = task.Type;
82
+ this.UsesMaxPictureSettings = task.UsesMaxPictureSettings;
83
+ this.UsesPictureFilters = task.UsesPictureFilters;
84
+ this.UsesPictureSettings = task.UsesPictureSettings;
85
+ this.Verbosity = task.Verbosity;
86
+ this.VideoBitrate = task.VideoBitrate;
87
+ this.VideoEncoder = task.VideoEncoder;
88
+ this.VideoEncodeRateType = task.VideoEncodeRateType;
89
+ this.Width = task.Width;
90
+ this.x264Preset = task.x264Preset;
91
+ this.x264Profile = task.x264Profile;
92
+ this.X264Tune = task.X264Tune;
93
+ }
94
+
95
/// <summary>
96
/// Gets or sets Source.
97
/// </summary>
98
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/AllowedPassthru.cs
Changed
9
1
2
3
/// <summary>
4
/// Initializes a new instance of the <see cref="AllowedPassthru"/> class.
5
+ /// Copy Constructor
6
/// </summary>
7
/// <param name="initialValue">
8
/// The initial value.
9
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
Changed
44
1
2
{
3
using System;
4
using System.ComponentModel;
5
+ using System.Globalization;
6
7
using HandBrake.ApplicationServices.Functions;
8
using HandBrake.ApplicationServices.Parsing;
9
10
this.ScannedTrack = new Audio();
11
}
12
13
+ /// <summary>
14
+ /// Initializes a new instance of the <see cref="AudioTrack"/> class.
15
+ /// Copy Constructor
16
+ /// </summary>
17
+ /// <param name="track">
18
+ /// The track.
19
+ /// </param>
20
+ public AudioTrack(AudioTrack track)
21
+ {
22
+ this.bitrate = track.Bitrate;
23
+ this.drc = track.DRC;
24
+ this.encoder = track.Encoder;
25
+ this.gain = track.Gain;
26
+ this.mixDown = track.MixDown;
27
+ this.sampleRate = track.SampleRate;
28
+ this.scannedTrack = new Audio();
29
+ this.trackName = track.TrackName;
30
+ }
31
+
32
#endregion
33
34
#region Public Properties
35
36
{
37
get
38
{
39
- return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString();
40
+ return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString(CultureInfo.InvariantCulture);
41
}
42
}
43
44
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs
Changed
21
1
2
}
3
4
/// <summary>
5
+ /// Initializes a new instance of the <see cref="ChapterMarker"/> class.
6
+ /// Copy Constructor
7
+ /// </summary>
8
+ /// <param name="chapter">
9
+ /// The chapter.
10
+ /// </param>
11
+ public ChapterMarker(ChapterMarker chapter)
12
+ {
13
+ this.ChapterName = chapter.ChapterName;
14
+ this.ChapterNumber = chapter.ChapterNumber;
15
+ }
16
+
17
+ /// <summary>
18
/// Gets or sets The number of this Chapter, in regards to it's parent Title
19
/// </summary>
20
public int ChapterNumber { get; set; }
21
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs
Changed
40
1
2
3
#endregion
4
5
+ /// <summary>
6
+ /// Initializes a new instance of the <see cref="SubtitleTrack"/> class.
7
+ /// </summary>
8
+ public SubtitleTrack()
9
+ {
10
+ }
11
+
12
+ /// <summary>
13
+ /// Initializes a new instance of the <see cref="SubtitleTrack"/> class.
14
+ /// Copy Constructor
15
+ /// </summary>
16
+ /// <param name="subtitle">
17
+ /// The subtitle.
18
+ /// </param>
19
+ public SubtitleTrack(SubtitleTrack subtitle)
20
+ {
21
+ this.Burned = subtitle.Burned;
22
+ this.Default = subtitle.Default;
23
+ this.Forced = subtitle.Forced;
24
+ this.sourceTrack = subtitle.SourceTrack;
25
+ this.SrtCharCode = subtitle.SrtCharCode;
26
+ this.SrtFileName = subtitle.SrtFileName;
27
+ this.SrtLang = subtitle.SrtLang;
28
+ this.SrtOffset = subtitle.SrtOffset;
29
+ this.SrtPath = subtitle.SrtPath;
30
+ this.SubtitleType = subtitle.SubtitleType;
31
+ this.SourceTrack = subtitle.SourceTrack;
32
+ }
33
+
34
#region Public Properties
35
36
+
37
/// <summary>
38
/// Gets or sets a value indicating whether Burned.
39
/// </summary>
40
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
Changed
10
1
2
public TimeSpan CalculateDuration(int startPoint, int endPoint)
3
{
4
TimeSpan duration = TimeSpan.FromSeconds(0.0);
5
- startPoint++;
6
- endPoint++;
7
if (startPoint != 0 && endPoint != 0 && endPoint <= this.Chapters.Count)
8
{
9
for (int i = startPoint; i <= endPoint; i++)
10
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs
Changed
10
1
2
this.readData = new Parser(this.hbProc.StandardError.BaseStream);
3
this.readData.OnScanProgress += this.OnScanProgress;
4
this.SouceData = Source.Parse(this.readData);
5
- this.SouceData.ScanPath = source;
6
+ this.SouceData.ScanPath = (string)sourcePath;
7
8
// Write the Buffer out to file.
9
using (StreamWriter scanLog = new StreamWriter(dvdInfoPath))
10
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
Changed
134
1
2
Homepage: <http://handbrake.fr>.
3
It may be used under the terms of the GNU General Public License. */
4
5
+using System.Linq;
6
+
7
namespace HandBrake.ApplicationServices.Services
8
{
9
using System;
10
11
{
12
try
13
{
14
+ // Load up the users current settings file.
15
if (File.Exists(this.settingsFile))
16
{
17
using (StreamReader reader = new StreamReader(this.settingsFile))
18
19
this.userSettings = data;
20
}
21
}
22
+ else
23
+ {
24
+ this.userSettings = new SerializableDictionary<string, object>();
25
+ }
26
+
27
+ // Add any missing / new settings
28
+ SerializableDictionary<string, object> defaults = this.GetDefaults();
29
+ foreach (var item in defaults.Where(item => !this.userSettings.Keys.Contains(item.Key)))
30
+ {
31
+ this.userSettings.Add(item.Key, item.Value);
32
+ this.Save();
33
+ }
34
}
35
catch (Exception exc)
36
{
37
- throw new GeneralApplicationException(
38
- "HandBrake has detected corruption in the settings file. User settings will now be reset to defaults.",
39
- "Please restart HandBrake before continuing.",
40
- exc);
41
+ try
42
+ {
43
+ this.userSettings = this.GetDefaults();
44
+ if (File.Exists(this.settingsFile))
45
+ {
46
+ File.Delete(this.settingsFile);
47
+ }
48
+ this.Save();
49
+ }
50
+ catch (Exception)
51
+ {
52
+ }
53
+
54
+ throw;
55
}
56
}
57
58
59
}
60
61
/// <summary>
62
- /// This is just a utility method for creating a defaults xml file. Don't use this!!!
63
+ /// Load Default Settings
64
/// </summary>
65
- private void SetAllDefaults()
66
+ /// <returns>
67
+ /// The get defaults.
68
+ /// </returns>
69
+ private SerializableDictionary<string, object> GetDefaults()
70
{
71
- userSettings = new SerializableDictionary<string, object>();
72
- userSettings[ASUserSettingConstants.X264Step] = 0.25;
73
- userSettings[ASUserSettingConstants.Verbosity] = 1;
74
- userSettings[ASUserSettingConstants.WhenCompleteAction] = "Do Nothing";
75
- userSettings[ASUserSettingConstants.GrowlEncode] = false;
76
- userSettings[ASUserSettingConstants.GrowlQueue] = false;
77
- userSettings[ASUserSettingConstants.ProcessPriority] = "Below Normal";
78
- userSettings[ASUserSettingConstants.PreventSleep] = true;
79
- userSettings[ASUserSettingConstants.ShowCLI] = false;
80
- userSettings[ASUserSettingConstants.SaveLogToCopyDirectory] = false;
81
- userSettings[ASUserSettingConstants.SaveLogWithVideo] = false;
82
- userSettings[ASUserSettingConstants.DisableLibDvdNav] = false;
83
- userSettings[ASUserSettingConstants.SendFile] = false;
84
- userSettings[ASUserSettingConstants.MinScanDuration] = 10;
85
- userSettings[ASUserSettingConstants.HandBrakeBuild] = 0;
86
- userSettings[ASUserSettingConstants.HandBrakeVersion] = string.Empty;
87
- userSettings["updateStatus"] = true;
88
- userSettings["tooltipEnable"] = true;
89
- userSettings["defaultPreset"] = string.Empty;
90
- userSettings["skipversion"] = 0;
91
- userSettings["autoNaming"] = true;
92
- userSettings["autoNamePath"] = string.Empty;
93
- userSettings["appcast_i686"] = "http://handbrake.fr/appcast.i386.xml";
94
- userSettings["appcast_x64"] = "http://handbrake.fr/appcast_unstable.x86_64.xml";
95
- userSettings["autoNameFormat"] = "{source}-{title}";
96
- userSettings["VLC_Path"] = "C:\\Program Files\\VideoLAN\\vlc\\vlc.exe";
97
- userSettings["MainWindowMinimize"] = true;
98
- userSettings["QueryEditorTab"] = false;
99
- userSettings["presetNotification"] = false;
100
- userSettings["trayIconAlerts"] = true;
101
- userSettings["lastUpdateCheckDate"] = DateTime.Today;
102
- userSettings["daysBetweenUpdateCheck"] = 7;
103
- userSettings["useM4v"] = 0;
104
- userSettings["PromptOnUnmatchingQueries"] = true;
105
- userSettings["NativeLanguage"] = "Any";
106
- userSettings["DubMode"] = 255;
107
- userSettings["HandBrakeExeHash"] = string.Empty;
108
- userSettings["previewScanCount"] = 10;
109
- userSettings["clearOldLogs"] = true;
110
- userSettings["AutoNameTitleCase"] = true;
111
- userSettings["AutoNameRemoveUnderscore"] = true;
112
- userSettings["ActivityWindowLastMode"] = 0;
113
- userSettings["useClosedCaption"] = false;
114
- userSettings["batchMinDuration"] = "00:18:00";
115
- userSettings["batchMaxDuration"] = "02:30:00";
116
- userSettings["defaultPlayer"] = false;
117
- userSettings["SelectedLanguages"] = new StringCollection();
118
- userSettings["DubModeAudio"] = 0;
119
- userSettings["DubModeSubtitle"] = 0;
120
- userSettings["addOnlyOneAudioPerLanguage"] = true;
121
- userSettings["MinTitleLength"] = 10;
122
- userSettings["ShowAdvancedAudioPassthruOpts"] = false;
123
+ if (File.Exists("defaultsettings.xml"))
124
+ {
125
+ using (StreamReader reader = new StreamReader("defaultsettings.xml"))
126
+ {
127
+ return (SerializableDictionary<string, object>)serializer.Deserialize(reader);
128
+ }
129
+ }
130
+ return new SerializableDictionary<string, object>();
131
}
132
}
133
}
134
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
Changed
281
1
2
track.SampleRate = value == "Auto" ? 0 : double.Parse(value);
3
break;
4
case "AudioTrack":
5
- //track.SourceTrack = value;
6
+ //track.SourceTrack = value;
7
break;
8
case "AudioTrackDRCSlider":
9
track.DRC = double.Parse(value);
10
11
12
switch (key)
13
{
14
- // Output Settings
15
+ // Output Settings
16
case "FileFormat":
17
parsed.OutputFormat = Converters.GetFileFormat(value.Replace("file", string.Empty).Trim());
18
break;
19
20
parsed.OptimizeMP4 = value == "1";
21
break;
22
case "Mp4LargeFile":
23
- parsed.IPod5GSupport = value == "1";
24
+ parsed.LargeFile = value == "1";
25
break;
26
case "Mp4iPodCompatible":
27
parsed.IPod5GSupport = value == "1";
28
break;
29
30
- // Picture Settings
31
+ // Picture Settings
32
case "PictureAutoCrop":
33
parsed.HasCropping = value != "1";
34
break;
35
36
}
37
break;
38
39
- // Filters
40
+ // Filters
41
case "PictureDeblock":
42
parsed.Deblock = int.Parse(value);
43
break;
44
case "PictureDecomb":
45
parsed.Decomb = Decomb.Off;
46
- // Don't place custom here as it's handled in the filter panel
47
- if (value == "2")
48
+ switch (value)
49
{
50
- parsed.Decomb = Decomb.Default;
51
+ case "1":
52
+ parsed.Decomb = Decomb.Custom;
53
+ break;
54
+ case "2":
55
+ parsed.Decomb = Decomb.Default;
56
+ break;
57
+ case "3":
58
+ parsed.Decomb = Decomb.Fast;
59
+ break;
60
}
61
break;
62
case "PictureDecombCustom":
63
64
case "0":
65
parsed.Deinterlace = Deinterlace.Off;
66
break;
67
- // Don't place custom here as it's handled in the filter panel
68
+ case "1":
69
+ parsed.Deinterlace = Deinterlace.Custom;
70
+ break;
71
case "2":
72
parsed.Deinterlace = Deinterlace.Fast;
73
break;
74
75
case "0":
76
parsed.Denoise = Denoise.Off;
77
break;
78
- // Don't place custom here as it's handled in the filter panel
79
+ case "1":
80
+ parsed.Denoise = Denoise.Custom;
81
+ break;
82
case "2":
83
parsed.Denoise = Denoise.Weak;
84
break;
85
86
parsed.Detelecine = Detelecine.Off;
87
if (value == "1")
88
{
89
+ parsed.Detelecine = Detelecine.Custom;
90
+ }
91
+ if (value == "2")
92
+ {
93
parsed.Detelecine = Detelecine.Default;
94
}
95
break;
96
97
}
98
break;
99
100
- // Video Tab
101
+ // Video Tab
102
case "VideoAvgBitrate":
103
if (!string.IsNullOrEmpty(value))
104
{
105
106
parsed.TwoPass = value == "1";
107
break;
108
109
- // Chapter Markers Tab
110
+ // Chapter Markers Tab
111
case "ChapterMarkers":
112
parsed.IncludeChapterMarkers = value == "1";
113
break;
114
115
- // Advanced x264 tab
116
+ // Advanced x264 tab
117
case "x264Option":
118
parsed.AdvancedEncoderOptions = value;
119
break;
120
121
- // Preset Information
122
+ // Preset Information
123
case "PresetBuildNumber":
124
parsed.PresetBuildNumber = int.Parse(value);
125
break;
126
127
if (!File.Exists(filename))
128
return null;
129
130
- StreamReader sr = File.OpenText(filename);
131
string fromfile = string.Empty;
132
- int fileChar;
133
- while ((fileChar = sr.Read()) != -1)
134
- fromfile += Convert.ToChar(fileChar);
135
+ using (StreamReader sr = File.OpenText(filename))
136
+ {
137
+ int fileChar;
138
+ while ((fileChar = sr.Read()) != -1) fromfile += Convert.ToChar(fileChar);
139
+ }
140
141
XmlDocument doc = new XmlDocument();
142
doc.LoadXml(fromfile);
143
144
public static void Export(string path, Preset preset)
145
{
146
EncodeTask parsed = QueryParserUtility.Parse(preset.Query);
147
- XmlTextWriter xmlWriter = new XmlTextWriter(path, Encoding.UTF8) { Formatting = Formatting.Indented };
148
+ using (XmlTextWriter xmlWriter = new XmlTextWriter(path, Encoding.UTF8) { Formatting = Formatting.Indented })
149
+ {
150
+ // Header
151
+ xmlWriter.WriteStartDocument();
152
+ xmlWriter.WriteDocType(
153
+ "plist", "-//Apple//DTD PLIST 1.0//EN", @"http://www.apple.com/DTDs/PropertyList-1.0.dtd", null);
154
155
- // Header
156
- xmlWriter.WriteStartDocument();
157
- xmlWriter.WriteDocType("plist", "-//Apple//DTD PLIST 1.0//EN",
158
- @"http://www.apple.com/DTDs/PropertyList-1.0.dtd", null);
159
+ xmlWriter.WriteStartElement("plist");
160
+ xmlWriter.WriteStartElement("array");
161
162
- xmlWriter.WriteStartElement("plist");
163
- xmlWriter.WriteStartElement("array");
164
+ // Add New Preset Here. Can write multiple presets here if required in future.
165
+ WritePreset(xmlWriter, parsed, preset);
166
167
- // Add New Preset Here. Can write multiple presets here if required in future.
168
- WritePreset(xmlWriter, parsed, preset);
169
+ // Footer
170
+ xmlWriter.WriteEndElement();
171
+ xmlWriter.WriteEndElement();
172
173
- // Footer
174
- xmlWriter.WriteEndElement();
175
- xmlWriter.WriteEndElement();
176
-
177
- xmlWriter.WriteEndDocument();
178
+ xmlWriter.WriteEndDocument();
179
180
- // Closeout
181
- xmlWriter.Close();
182
+ // Closeout
183
+ xmlWriter.Close();
184
+ }
185
}
186
187
/// <summary>
188
189
AddEncodeElement(xmlWriter, "PictureDecombCustom", "string", string.Empty);
190
break;
191
case Decomb.Default:
192
- AddEncodeElement(xmlWriter, "PictureDecomb", "integer", "1");
193
+ AddEncodeElement(xmlWriter, "PictureDecomb", "integer", "2");
194
AddEncodeElement(xmlWriter, "PictureDecombCustom", "string", string.Empty);
195
break;
196
- default:
197
- AddEncodeElement(xmlWriter, "PictureDecomb", "integer", "2");
198
+ case Decomb.Fast:
199
+ AddEncodeElement(xmlWriter, "PictureDecomb", "integer", "3");
200
+ AddEncodeElement(xmlWriter, "PictureDecombCustom", "string", string.Empty);
201
+ break;
202
+ case Decomb.Custom:
203
+ AddEncodeElement(xmlWriter, "PictureDecomb", "integer", "1");
204
AddEncodeElement(xmlWriter, "PictureDecombCustom", "string", parsed.CustomDecomb);
205
break;
206
}
207
208
AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", string.Empty);
209
break;
210
case Deinterlace.Fast:
211
- AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "1");
212
+ AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "2");
213
AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", string.Empty);
214
break;
215
case Deinterlace.Slow:
216
- AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "2");
217
+ AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "3");
218
AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", string.Empty);
219
break;
220
case Deinterlace.Slower:
221
- AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "3");
222
+ AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "4");
223
AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", string.Empty);
224
break;
225
- default:
226
- AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "4");
227
+ case Deinterlace.Custom:
228
+ AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", "1");
229
AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", parsed.CustomDeinterlace);
230
break;
231
}
232
233
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", string.Empty);
234
break;
235
case Denoise.Weak:
236
- AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "1");
237
+ AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "2");
238
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", string.Empty);
239
break;
240
case Denoise.Medium:
241
- AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "2");
242
+ AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "3");
243
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", string.Empty);
244
break;
245
case Denoise.Strong:
246
- AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "3");
247
+ AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "4");
248
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", string.Empty);
249
break;
250
- default:
251
- AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "4");
252
+ case Denoise.Custom:
253
+ AddEncodeElement(xmlWriter, "PictureDenoise", "integer", "1");
254
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", parsed.CustomDenoise);
255
break;
256
}
257
258
- int detelecine;
259
+ int detelecine = 0;
260
switch (parsed.Detelecine)
261
{
262
case Detelecine.Off:
263
264
case Detelecine.Default:
265
detelecine = 2;
266
break;
267
- default:
268
+ case Detelecine.Custom:
269
detelecine = 1;
270
break;
271
}
272
273
274
xmlWriter.WriteElementString("key", "AudioTrackGainSlider");
275
xmlWriter.WriteElementString("real", audioTrack.Gain.ToString());
276
-
277
+
278
xmlWriter.WriteEndElement();
279
}
280
#endregion
281
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
Changed
13
1
2
query += string.Format("--x264-tune={0} ", task.X264Tune.ToString().ToLower().Replace(" ", string.Empty));
3
}
4
5
+ if (!string.IsNullOrEmpty(task.AdvancedEncoderOptions))
6
+ {
7
+ query += string.Format(" -x {0}", task.AdvancedEncoderOptions);
8
+ }
9
+
10
return query;
11
}
12
13
HandBrake-0.9.6.tar.bz2/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Cropping.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Cropping.cs
Changed
74
1
2
3
namespace HandBrake.Interop.Model
4
{
5
- public class Cropping
6
+ /// <summary>
7
+ /// The Cropping Model
8
+ /// </summary>
9
+ public class Cropping
10
{
11
/// <summary>
12
/// Initializes a new instance of the <see cref="Cropping"/> class.
13
14
}
15
16
/// <summary>
17
+ /// Initializes a new instance of the <see cref="Cropping"/> class.
18
+ /// Copy Constructor
19
+ /// </summary>
20
+ /// <param name="croping">
21
+ /// The croping.
22
+ /// </param>
23
+ public Cropping(Cropping croping)
24
+ {
25
+ this.Top = croping.Top;
26
+ this.Bottom = croping.Bottom;
27
+ this.Left = croping.Left;
28
+ this.Right = croping.Right;
29
+ }
30
+
31
+ /// <summary>
32
/// Initializes a new instance of the <see cref="Cropping"/> class.
33
/// </summary>
34
/// <param name="top">
35
36
this.Right = right;
37
}
38
39
- public int Top { get; set; }
40
- public int Bottom { get; set; }
41
- public int Left { get; set; }
42
- public int Right { get; set; }
43
+ /// <summary>
44
+ /// Gets or sets Top.
45
+ /// </summary>
46
+ public int Top { get; set; }
47
48
- public Cropping Clone()
49
+ /// <summary>
50
+ /// Gets or sets Bottom.
51
+ /// </summary>
52
+ public int Bottom { get; set; }
53
+
54
+ /// <summary>
55
+ /// Gets or sets Left.
56
+ /// </summary>
57
+ public int Left { get; set; }
58
+
59
+ /// <summary>
60
+ /// Gets or sets Right.
61
+ /// </summary>
62
+ public int Right { get; set; }
63
+
64
+ /// <summary>
65
+ /// Clone this model
66
+ /// </summary>
67
+ /// <returns>
68
+ /// A Cloned copy
69
+ /// </returns>
70
+ public Cropping Clone()
71
{
72
return new Cropping
73
{
74
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeCS.csproj -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeCS.csproj
Changed
26
1
2
<PlatformTarget>x86</PlatformTarget>
3
<OutputPath>bin\x86\Release\</OutputPath>
4
<UseVSHostingProcess>false</UseVSHostingProcess>
5
- <DefineConstants>
6
- </DefineConstants>
7
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
8
<Optimize>true</Optimize>
9
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
10
+ <DebugType>full</DebugType>
11
+ <DebugSymbols>true</DebugSymbols>
12
</PropertyGroup>
13
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
14
<PlatformTarget>x64</PlatformTarget>
15
16
<PlatformTarget>x64</PlatformTarget>
17
<OutputPath>bin\x64\Release\</OutputPath>
18
<Optimize>true</Optimize>
19
- <DefineConstants>TRACE</DefineConstants>
20
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
21
+ <DebugType>full</DebugType>
22
+ <DebugSymbols>true</DebugSymbols>
23
</PropertyGroup>
24
<ItemGroup>
25
<Reference Include="Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=x86">
26
HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
Added
157
1
2
+•// --------------------------------------------------------------------------------------------------------------------
3
+// <copyright file="EnumComboConverter.cs" company="HandBrake Project (http://handbrake.fr)">
4
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
5
+// </copyright>
6
+// <summary>
7
+// Defines the EnumComboConverter type.
8
+// </summary>
9
+// --------------------------------------------------------------------------------------------------------------------
10
+
11
+namespace HandBrakeWPF.Converters
12
+{
13
+ using System.Collections.Generic;
14
+ using System.Globalization;
15
+ using System.Windows.Data;
16
+ using System;
17
+
18
+ using HandBrake.ApplicationServices.Functions;
19
+ using HandBrake.Interop.Model.Encoding;
20
+ using HandBrake.Interop.Model.Encoding.x264;
21
+
22
+ /// <summary>
23
+ /// Enum Combo Converter
24
+ /// </summary>
25
+ public sealed class EnumComboConverter : IValueConverter
26
+ {
27
+ /// <summary>
28
+ /// Convert an Enum to it's display value (attribute)
29
+ /// </summary>
30
+ /// <param name="value">
31
+ /// The value.
32
+ /// </param>
33
+ /// <param name="targetType">
34
+ /// The target type.
35
+ /// </param>
36
+ /// <param name="parameter">
37
+ /// The parameter. (A boolean which inverts the output)
38
+ /// </param>
39
+ /// <param name="culture">
40
+ /// The culture.
41
+ /// </param>
42
+ /// <returns>
43
+ /// Visibility property
44
+ /// </returns>
45
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
46
+ {
47
+ // Lists
48
+ if (value is IEnumerable<x264Preset>)
49
+ {
50
+ return EnumHelper<x264Preset>.GetEnumDisplayValues(typeof(x264Preset));
51
+ }
52
+ if (value is IEnumerable<x264Profile>)
53
+ {
54
+ return EnumHelper<x264Profile>.GetEnumDisplayValues(typeof(x264Profile));
55
+ }
56
+ if (value is IEnumerable<x264Tune>)
57
+ {
58
+ return EnumHelper<x264Tune>.GetEnumDisplayValues(typeof(x264Tune));
59
+ }
60
+ if (value is IEnumerable<VideoEncoder>)
61
+ {
62
+ return EnumHelper<VideoEncoder>.GetEnumDisplayValues(typeof(VideoEncoder));
63
+ }
64
+ if (value is IEnumerable<Mixdown>)
65
+ {
66
+ return EnumHelper<Mixdown>.GetEnumDisplayValues(typeof(Mixdown));
67
+ }
68
+
69
+ if (value is IEnumerable<AudioEncoder>)
70
+ {
71
+ return EnumHelper<AudioEncoder>.GetEnumDisplayValues(typeof(AudioEncoder));
72
+ }
73
+
74
+
75
+
76
+ // Single Items
77
+ if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
78
+ {
79
+ return EnumHelper<x264Preset>.GetDisplay((x264Preset)value);
80
+ }
81
+ if (targetType == typeof(x264Profile) || value.GetType() == typeof(x264Profile))
82
+ {
83
+ return EnumHelper<x264Profile>.GetDisplay((x264Profile)value);
84
+ }
85
+ if (targetType == typeof(x264Tune) || value.GetType() == typeof(x264Tune))
86
+ {
87
+ return EnumHelper<x264Tune>.GetDisplay((x264Tune)value);
88
+ }
89
+ if (targetType == typeof(VideoEncoder) || value.GetType() == typeof(VideoEncoder))
90
+ {
91
+ return EnumHelper<VideoEncoder>.GetDisplay((VideoEncoder)value);
92
+ }
93
+ if (targetType == typeof(Mixdown) || value.GetType() == typeof(Mixdown))
94
+ {
95
+ return EnumHelper<Mixdown>.GetDisplay((Mixdown)value);
96
+ }
97
+ if (targetType == typeof(AudioEncoder) || value.GetType() == typeof(AudioEncoder))
98
+ {
99
+ return EnumHelper<AudioEncoder>.GetDisplay((AudioEncoder)value);
100
+ }
101
+
102
+ return null;
103
+ }
104
+
105
+ /// <summary>
106
+ /// Convert Back for the IValueConverter Interface.
107
+ /// </summary>
108
+ /// <param name="value">
109
+ /// The value.
110
+ /// </param>
111
+ /// <param name="targetType">
112
+ /// The target type.
113
+ /// </param>
114
+ /// <param name="parameter">
115
+ /// The parameter.
116
+ /// </param>
117
+ /// <param name="culture">
118
+ /// The culture.
119
+ /// </param>
120
+ /// <returns>
121
+ /// Nothing
122
+ /// </returns>
123
+ /// <exception cref="NotImplementedException">
124
+ /// This method is not used!
125
+ /// </exception>
126
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
127
+ {
128
+ if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
129
+ {
130
+ return EnumHelper<x264Preset>.GetValue(value.ToString());
131
+ }
132
+ if (targetType == typeof(x264Profile) || value.GetType() == typeof(x264Profile))
133
+ {
134
+ return EnumHelper<x264Profile>.GetValue(value.ToString());
135
+ }
136
+ if (targetType == typeof(x264Tune) || value.GetType() == typeof(x264Tune))
137
+ {
138
+ return EnumHelper<x264Tune>.GetValue(value.ToString());
139
+ }
140
+ if (targetType == typeof(VideoEncoder) || value.GetType() == typeof(VideoEncoder))
141
+ {
142
+ return EnumHelper<VideoEncoder>.GetValue(value.ToString());
143
+ }
144
+ if (targetType == typeof(Mixdown) || value.GetType() == typeof(Mixdown))
145
+ {
146
+ return EnumHelper<Mixdown>.GetValue(value.ToString());
147
+ }
148
+ if (targetType == typeof(AudioEncoder) || value.GetType() == typeof(AudioEncoder))
149
+ {
150
+ return EnumHelper<AudioEncoder>.GetValue(value.ToString());
151
+ }
152
+
153
+ return null;
154
+ }
155
+ }
156
+}
157
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Converters/FullPathToFileNameConverter.cs
Changed
14
1
2
/// </returns>
3
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
4
{
5
- if (!string.IsNullOrEmpty(value.ToString()))
6
+ string path = value as string;
7
+ if (!string.IsNullOrEmpty(path) && ! path.EndsWith("\\"))
8
{
9
- return Path.GetFileName(value.ToString());
10
+ return Path.GetFileName(path);
11
}
12
13
return "Unknown";
14
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/HandBrakeWPF.csproj -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
Changed
51
1
2
<Reference Include="Castle.Windsor">
3
<HintPath>..\libraries\caliburn\Castle.Windsor.dll</HintPath>
4
</Reference>
5
- <Reference Include="Common.Logging">
6
- <HintPath>..\libraries\caliburn\Common.Logging.dll</HintPath>
7
- </Reference>
8
<Reference Include="EagleBoost.Wpf.Presentation">
9
<HintPath>..\libraries\EagleBoost.Wpf.Presentation.dll</HintPath>
10
</Reference>
11
+ <Reference Include="GongSolutions.Wpf.DragDrop">
12
+ <HintPath>..\libraries\WPFDragDrop\GongSolutions.Wpf.DragDrop.dll</HintPath>
13
+ </Reference>
14
<Reference Include="Ookii.Dialogs.Wpf">
15
<HintPath>..\libraries\OokiiDialogs\Ookii.Dialogs.Wpf.dll</HintPath>
16
</Reference>
17
<Reference Include="PresentationFramework" />
18
- <Reference Include="PresentationFramework.Aero" />
19
<Reference Include="System" />
20
<Reference Include="System.ComponentModel.Composition" />
21
- <Reference Include="System.ComponentModel.DataAnnotations" />
22
- <Reference Include="System.Data" />
23
<Reference Include="System.Drawing" />
24
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
25
<HintPath>..\libraries\caliburn\System.Windows.Interactivity.dll</HintPath>
26
</Reference>
27
<Reference Include="System.Xml" />
28
- <Reference Include="Microsoft.CSharp" />
29
<Reference Include="System.Core" />
30
- <Reference Include="System.Xml.Linq" />
31
<Reference Include="System.Xaml">
32
<RequiredTargetFramework>4.0</RequiredTargetFramework>
33
</Reference>
34
35
</ApplicationDefinition>
36
<Compile Include="Converters\BooleanConverter.cs" />
37
<Compile Include="Converters\BooleanToVisibilityConverter.cs" />
38
- <Compile Include="Converters\AudioEnumConverter.cs" />
39
+ <Compile Include="Converters\EnumComboConverter.cs" />
40
<Compile Include="Converters\FullPathToFileNameConverter.cs" />
41
<Compile Include="Helpers\AutoNameHelper.cs" />
42
<Compile Include="Helpers\ListBoxHelper.cs" />
43
44
<Compile Include="ViewModels\AddPresetViewModel.cs" />
45
<Compile Include="ViewModels\AudioViewModel.cs" />
46
<Compile Include="ViewModels\AdvancedViewModel.cs" />
47
+ <Compile Include="ViewModels\Interfaces\ITabInterface.cs" />
48
<Compile Include="ViewModels\VideoViewModel.cs" />
49
<Compile Include="ViewModels\FiltersViewModel.cs" />
50
<Compile Include="ViewModels\Interfaces\IFiltersViewModel.cs" />
51
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs
Changed
130
1
2
3
namespace HandBrakeWPF.ViewModels
4
{
5
+ using System.Collections.Generic;
6
using System.ComponentModel.Composition;
7
8
using Caliburn.Micro;
9
10
+ using HandBrake.ApplicationServices.Functions;
11
using HandBrake.ApplicationServices.Model;
12
using HandBrake.ApplicationServices.Parsing;
13
using HandBrake.ApplicationServices.Services.Interfaces;
14
+ using HandBrake.Interop.Model.Encoding;
15
using HandBrake.Interop.Model.Encoding.x264;
16
17
using HandBrakeWPF.ViewModels.Interfaces;
18
19
/// </summary>
20
private x264Tune x264Tune;
21
22
+ /// <summary>
23
+ /// Backing field used to display / hide the x264 options
24
+ /// </summary>
25
+ private bool displayX264Options;
26
+
27
#endregion
28
29
#region Constructors and Destructors
30
31
/// </param>
32
public AdvancedViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
33
{
34
+ X264Presets = EnumHelper<x264Preset>.GetEnumList();
35
+ X264Profiles = EnumHelper<x264Profile>.GetEnumList();
36
+ X264Tunes = EnumHelper<x264Tune>.GetEnumList();
37
+
38
+ this.x264Preset = x264Preset.None;
39
+ this.x264Profile = x264Profile.None;
40
+ this.x264Tune = x264Tune.None;
41
}
42
43
#endregion
44
45
}
46
}
47
48
+ /// <summary>
49
+ /// Gets or sets X264Presets.
50
+ /// </summary>
51
+ public IEnumerable<x264Preset> X264Presets { get; set; }
52
+
53
+ /// <summary>
54
+ /// Gets or sets X264Profiles.
55
+ /// </summary>
56
+ public IEnumerable<x264Profile> X264Profiles { get; set; }
57
+
58
+ /// <summary>
59
+ /// Gets or sets X264Tunes.
60
+ /// </summary>
61
+ public IEnumerable<x264Tune> X264Tunes { get; set; }
62
+
63
+ /// <summary>
64
+ /// Gets or sets a value indicating whether DisplayX264Options.
65
+ /// </summary>
66
+ public bool DisplayX264Options
67
+ {
68
+ get
69
+ {
70
+ return this.displayX264Options;
71
+ }
72
+ set
73
+ {
74
+ this.displayX264Options = value;
75
+ this.NotifyOfPropertyChange(() => this.DisplayX264Options);
76
+ }
77
+ }
78
+
79
#endregion
80
81
#region Public Methods
82
83
this.X264Tune = preset.Task.X264Tune;
84
}
85
86
+ /// <summary>
87
+ /// Setup this tab for the specified preset.
88
+ /// </summary>
89
+ /// <param name="preset">
90
+ /// The preset.
91
+ /// </param>
92
+ public void SetPreset(Preset preset)
93
+ {
94
+ if (preset != null && preset.Task != null)
95
+ {
96
+ this.Query = preset.Task.AdvancedEncoderOptions;
97
+ this.SetEncoder(preset.Task.VideoEncoder);
98
+
99
+ this.X264Preset = preset.Task.x264Preset;
100
+ this.X264Profile = preset.Task.x264Profile;
101
+ this.X264Tune = preset.Task.X264Tune;
102
+ }
103
+ }
104
+
105
+ /// <summary>
106
+ /// Set the currently selected encoder.
107
+ /// </summary>
108
+ /// <param name="encoder">
109
+ /// The Video Encoder.
110
+ /// </param>
111
+ public void SetEncoder(VideoEncoder encoder)
112
+ {
113
+ if (encoder == VideoEncoder.X264)
114
+ {
115
+ this.DisplayX264Options = true;
116
+ }
117
+ else
118
+ {
119
+ this.x264Preset = x264Preset.None;
120
+ this.x264Profile = x264Profile.None;
121
+ this.x264Tune = x264Tune.None;
122
+ this.DisplayX264Options = false;
123
+ }
124
+ }
125
+
126
#endregion
127
}
128
}
129
\ No newline at end of file
130
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
Changed
48
1
2
}
3
4
/// <summary>
5
+ /// Setup this tab for the specified preset.
6
+ /// </summary>
7
+ /// <param name="preset">
8
+ /// The preset.
9
+ /// </param>
10
+ public void SetPreset(Preset preset)
11
+ {
12
+ if (preset != null && preset.Task != null)
13
+ {
14
+ // Store the previously selected tracks
15
+ List<Audio> selectedTracks = this.AudioTracks.Select(track => track.ScannedTrack).ToList();
16
+ this.AudioTracks.Clear();
17
+
18
+ // Add the tracks from the preset
19
+ foreach (AudioTrack track in preset.Task.AudioTracks)
20
+ {
21
+ this.AudioTracks.Add(new AudioTrack(track));
22
+ }
23
+
24
+ // Attempt to restore the previously selected tracks.
25
+ // or fallback to the first source track.
26
+ foreach (AudioTrack track in this.AudioTracks)
27
+ {
28
+ if (selectedTracks.Count != 0)
29
+ {
30
+ track.ScannedTrack = selectedTracks[0];
31
+ selectedTracks.RemoveAt(0);
32
+ }
33
+ else
34
+ {
35
+ if (this.SourceTracks != null)
36
+ {
37
+ track.ScannedTrack = this.SourceTracks.FirstOrDefault();
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ /// <summary>
45
/// Get Appropiate Bitrates for the selected encoder and mixdown.
46
/// </summary>
47
/// <param name="encoder">
48
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
Changed
35
1
2
}
3
4
/// <summary>
5
+ /// Setup this tab for the specified preset.
6
+ /// </summary>
7
+ /// <param name="preset">
8
+ /// The preset.
9
+ /// </param>
10
+ public void SetPreset(Preset preset)
11
+ {
12
+ }
13
+
14
+ /// <summary>
15
/// Set the Source Chapters List
16
/// </summary>
17
/// <param name="sourceChapters">
18
19
this.Chapters.Clear();
20
21
// Then Add new Chapter Markers.
22
+ int counter = 1;
23
+
24
foreach (Chapter chapter in this.SourceChapterList)
25
{
26
- var marker = new ChapterMarker(chapter.ChapterNumber, chapter.ChapterName);
27
+ string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
28
+ var marker = new ChapterMarker(chapter.ChapterNumber, chapterName);
29
this.Chapters.Add(marker);
30
+
31
+ counter += 1;
32
}
33
}
34
35
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
Changed
18
1
2
/// </param>
3
public void SetSource(Title title, Preset preset, EncodeTask task)
4
{
5
+ }
6
+
7
+ /// <summary>
8
+ /// Setup this tab for the specified preset.
9
+ /// </summary>
10
+ /// <param name="preset">
11
+ /// The preset.
12
+ /// </param>
13
+ public void SetPreset(Preset preset)
14
+ {
15
if (preset != null)
16
{
17
// Properties
18
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAdvancedViewModel.cs
Changed
34
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
+ using HandBrake.Interop.Model.Encoding;
8
9
/// <summary>
10
/// The Advanced View Model Interface
11
/// </summary>
12
- public interface IAdvancedViewModel
13
+ public interface IAdvancedViewModel : ITabInterface
14
{
15
/// <summary>
16
- /// Set the selected preset
17
+ /// Set the currently selected encoder.
18
/// </summary>
19
- /// <param name="title">
20
- /// The title.
21
+ /// <param name="encoder">
22
+ /// The Video Encoder.
23
/// </param>
24
- /// <param name="preset">
25
- /// The preset.
26
- /// </param>
27
- /// <param name="task">
28
- /// The task.
29
- /// </param>
30
- void SetSource(Title title, Preset preset, EncodeTask task);
31
+ void SetEncoder(VideoEncoder encoder);
32
}
33
}
34
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Audio View Model Interface
10
/// </summary>
11
- public interface IAudioViewModel
12
+ public interface IAudioViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Set the Source Title
16
- /// </summary>
17
- /// <param name="title">
18
- /// The title.
19
- /// </param>
20
- /// <param name="preset">
21
- /// The preset.
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title title, Preset preset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IChaptersViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IChaptersViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Chapters View Model Interface
10
/// </summary>
11
- public interface IChaptersViewModel
12
+ public interface IChaptersViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Set the selected preset
16
- /// </summary>
17
- /// <param name="currentTitle">
18
- /// The current Title.
19
- /// </param>
20
- /// <param name="preset">
21
- /// The preset.
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title currentTitle, Preset preset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IFiltersViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IFiltersViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Filters View Model Interface
10
/// </summary>
11
- public interface IFiltersViewModel
12
+ public interface IFiltersViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Setup a selected preset.
16
- /// </summary>
17
- /// <param name="title">
18
- /// The title.
19
- /// </param>
20
- /// <param name="preset">
21
- /// The Current Preset.
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title title, Preset preset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IPictureSettingsViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IPictureSettingsViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Picture Settings View Model Interface
10
/// </summary>
11
- public interface IPictureSettingsViewModel
12
+ public interface IPictureSettingsViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Setup the window after a scan.
16
- /// </summary>
17
- /// <param name="selectedTitle">
18
- /// The selected title.
19
- /// </param>
20
- /// <param name="currentPreset">
21
- /// The Current preset
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/ISubtitlesViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/ISubtitlesViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Subtiles View Model Interface
10
/// </summary>
11
- public interface ISubtitlesViewModel
12
+ public interface ISubtitlesViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Set the selected preset
16
- /// </summary>
17
- /// <param name="title">
18
- /// The title.
19
- /// </param>
20
- /// <param name="preset">
21
- /// The preset.
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title title, Preset preset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/ITabInterface.cs
Added
44
1
2
+•// --------------------------------------------------------------------------------------------------------------------
3
+// <copyright file="ITabInterface.cs" company="HandBrake Project (http://handbrake.fr)">
4
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
5
+// </copyright>
6
+// <summary>
7
+// Defines the ITabInterface type.
8
+// </summary>
9
+// --------------------------------------------------------------------------------------------------------------------
10
+
11
+namespace HandBrakeWPF.ViewModels.Interfaces
12
+{
13
+ using HandBrake.ApplicationServices.Model;
14
+ using HandBrake.ApplicationServices.Parsing;
15
+
16
+ /// <summary>
17
+ /// Common interface for all the main tab panels
18
+ /// </summary>
19
+ public interface ITabInterface
20
+ {
21
+ /// <summary>
22
+ /// Setup the window after a scan.
23
+ /// </summary>
24
+ /// <param name="selectedTitle">
25
+ /// The selected title.
26
+ /// </param>
27
+ /// <param name="currentPreset">
28
+ /// The Current preset
29
+ /// </param>
30
+ /// <param name="task">
31
+ /// The task.
32
+ /// </param>
33
+ void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task);
34
+
35
+ /// <summary>
36
+ /// Set the selected preset
37
+ /// </summary>
38
+ /// <param name="preset">
39
+ /// The preset.
40
+ /// </param>
41
+ void SetPreset(Preset preset);
42
+ }
43
+}
44
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/Interfaces/IVideoViewModel.cs
Changed
29
1
2
3
namespace HandBrakeWPF.ViewModels.Interfaces
4
{
5
- using HandBrake.ApplicationServices.Model;
6
- using HandBrake.ApplicationServices.Parsing;
7
-
8
/// <summary>
9
/// The Video View Model Interface
10
/// </summary>
11
- public interface IVideoViewModel
12
+ public interface IVideoViewModel : ITabInterface
13
{
14
- /// <summary>
15
- /// Set the selected preset
16
- /// </summary>
17
- /// <param name="title">
18
- /// The title.
19
- /// </param>
20
- /// <param name="preset">
21
- /// The preset.
22
- /// </param>
23
- /// <param name="task">
24
- /// The task.
25
- /// </param>
26
- void SetSource(Title title, Preset preset, EncodeTask task);
27
}
28
}
29
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
Changed
107
1
2
this.WindowTitle = "HandBrake WPF Test Application";
3
this.CurrentTask = new EncodeTask();
4
this.ScannedSource = new Source();
5
- this.SelectedPreset = this.presetService.DefaultPreset;
6
7
// Setup Events
8
this.scanService.ScanStared += this.ScanStared;
9
10
set
11
{
12
this.selectedPreset = value;
13
- this.NotifyOfPropertyChange("SelectedPreset");
14
+
15
+ if (this.SelectedPreset != null)
16
+ {
17
+ this.PictureSettingsViewModel.SetPreset(this.SelectedPreset);
18
+ this.VideoViewModel.SetPreset(this.SelectedPreset);
19
+ this.FiltersViewModel.SetPreset(this.SelectedPreset);
20
+ this.AudioViewModel.SetPreset(this.SelectedPreset);
21
+ this.SubtitleViewModel.SetPreset(this.SelectedPreset);
22
+ this.ChaptersViewModel.SetPreset(this.SelectedPreset);
23
+ this.AdvancedViewModel.SetPreset(this.SelectedPreset);
24
+ }
25
+
26
+ this.NotifyOfPropertyChange(() => this.SelectedPreset);
27
}
28
}
29
30
31
this.CurrentTask.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
32
this.NotifyOfPropertyChange("CurrentTask");
33
34
+ this.Duration = selectedTitle.Duration.ToString();
35
+
36
// Setup the tab controls
37
this.SetupTabs();
38
}
39
40
set
41
{
42
this.CurrentTask.StartPoint = value;
43
- this.NotifyOfPropertyChange("SelectedStartPoint");
44
+ this.NotifyOfPropertyChange(() => this.SelectedStartPoint);
45
+ this.Duration = this.DurationCalculation();
46
}
47
}
48
49
50
set
51
{
52
this.CurrentTask.EndPoint = value;
53
- this.NotifyOfPropertyChange("SelectedEndPoint");
54
+ this.NotifyOfPropertyChange(() => this.SelectedEndPoint);
55
+ this.Duration = this.DurationCalculation();
56
}
57
}
58
59
60
}
61
}
62
63
-
64
#endregion
65
66
#region Load and Shutdown Handling
67
68
/// </summary>
69
public override void OnLoad()
70
{
71
- // TODO
72
+ this.SelectedPreset = this.presetService.DefaultPreset;
73
}
74
75
/// <summary>
76
77
}
78
}
79
80
+ /// <summary>
81
+ /// Calculate the duration between the end and start point
82
+ /// </summary>
83
+ /// <returns>
84
+ /// The duration calculation.
85
+ /// </returns>
86
+ private string DurationCalculation()
87
+ {
88
+ double startEndDuration = this.SelectedEndPoint - this.SelectedStartPoint;
89
+ switch (this.SelectedPointToPoint)
90
+ {
91
+ case PointToPointMode.Chapters:
92
+ return this.SelectedTitle.CalculateDuration(this.SelectedStartPoint, this.SelectedEndPoint).ToString();
93
+ break;
94
+ case PointToPointMode.Seconds:
95
+ return TimeSpan.FromSeconds(startEndDuration).ToString();
96
+ case PointToPointMode.Frames:
97
+ startEndDuration = startEndDuration / selectedTitle.Fps;
98
+ return TimeSpan.FromSeconds(startEndDuration).ToString();
99
+ }
100
+
101
+ return "--:--:--";
102
+ }
103
+
104
#endregion
105
106
#region Event Handlers
107
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
Changed
482
1
2
#region Backing Fields
3
4
/// <summary>
5
- /// The crop bottom.
6
- /// </summary>
7
- private int cropBottom;
8
-
9
- /// <summary>
10
- /// The crop left.
11
- /// </summary>
12
- private int cropLeft;
13
-
14
- /// <summary>
15
- /// The crop right.
16
- /// </summary>
17
- private int cropRight;
18
-
19
- /// <summary>
20
- /// The crop top.
21
- /// </summary>
22
- private int cropTop;
23
-
24
- /// <summary>
25
/// The display size.
26
/// </summary>
27
private string displaySize;
28
29
/// <summary>
30
- /// The display width.
31
- /// </summary>
32
- private int displayWidth;
33
-
34
- /// <summary>
35
- /// The height.
36
- /// </summary>
37
- private int height;
38
-
39
- /// <summary>
40
- /// The is custom crop.
41
- /// </summary>
42
- private bool isCustomCrop;
43
-
44
- /// <summary>
45
- /// The maintain aspect ratio.
46
- /// </summary>
47
- private bool maintainAspectRatio;
48
-
49
- /// <summary>
50
- /// The par height.
51
- /// </summary>
52
- private int parHeight;
53
-
54
- /// <summary>
55
- /// The par width.
56
- /// </summary>
57
- private int parWidth;
58
-
59
- /// <summary>
60
- /// The selected anamorphic mode.
61
- /// </summary>
62
- private Anamorphic selectedAnamorphicMode;
63
-
64
- /// <summary>
65
- /// The selected modulus
66
- /// </summary>
67
- private int selectedModulus;
68
-
69
- /// <summary>
70
/// The source info.
71
/// </summary>
72
private string sourceInfo;
73
74
/// <summary>
75
- /// The width.
76
- /// </summary>
77
- private int width;
78
-
79
- /// <summary>
80
/// Backing field for show custom anamorphic controls
81
/// </summary>
82
private bool showCustomAnamorphicControls;
83
84
/// </summary>
85
private Size sourceResolution;
86
87
- /// <summary>
88
- /// Source Aspect Ratio
89
- /// </summary>
90
private double sourceAspectRatio;
91
92
/// <summary>
93
94
/// </param>
95
public PictureSettingsViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
96
{
97
+ this.Task = new EncodeTask();
98
this.SelectedModulus = 16;
99
this.MaintainAspectRatio = true;
100
}
101
102
#region Public Properties
103
104
/// <summary>
105
+ /// Gets or sets Task.
106
+ /// </summary>
107
+ public EncodeTask Task { get; set; }
108
+
109
+ /// <summary>
110
/// Gets AnamorphicModes.
111
/// </summary>
112
public IEnumerable<Anamorphic> AnamorphicModes
113
114
{
115
get
116
{
117
- return this.cropBottom;
118
+ return this.Task.Cropping.Bottom;
119
}
120
set
121
{
122
- this.cropBottom = this.CorrectForModulus(this.cropBottom, value);
123
+ this.Task.Cropping.Bottom = this.CorrectForModulus(this.Task.Cropping.Bottom, value);
124
this.NotifyOfPropertyChange(() => this.CropBottom);
125
}
126
}
127
128
{
129
get
130
{
131
- return this.cropLeft;
132
+ return this.Task.Cropping.Left;
133
}
134
set
135
{
136
- this.cropLeft = this.CorrectForModulus(this.cropLeft, value);
137
+ this.Task.Cropping.Left = this.CorrectForModulus(this.Task.Cropping.Left, value);
138
this.NotifyOfPropertyChange(() => this.CropLeft);
139
}
140
}
141
142
{
143
get
144
{
145
- return this.cropRight;
146
+ return this.Task.Cropping.Right;
147
}
148
set
149
{
150
- this.cropRight = this.CorrectForModulus(this.cropRight, value);
151
+ this.Task.Cropping.Right = this.CorrectForModulus(this.Task.Cropping.Right, value);
152
this.NotifyOfPropertyChange(() => this.CropRight);
153
}
154
}
155
156
{
157
get
158
{
159
- return this.cropTop;
160
+ return this.Task.Cropping.Top;
161
}
162
+
163
set
164
{
165
- this.cropTop = this.CorrectForModulus(this.cropTop, value);
166
+ this.Task.Cropping.Top = this.CorrectForModulus(this.Task.Cropping.Top, value);
167
this.NotifyOfPropertyChange(() => this.CropTop);
168
}
169
}
170
171
{
172
get
173
{
174
- return this.displayWidth;
175
+ return this.Task.DisplayWidth.HasValue ? int.Parse(Math.Round(this.Task.DisplayWidth.Value, 0).ToString()) : 0;
176
}
177
set
178
{
179
- this.displayWidth = value;
180
+ this.Task.DisplayWidth = value;
181
this.CustomAnamorphicAdjust();
182
this.NotifyOfPropertyChange(() => this.DisplayWidth);
183
}
184
185
{
186
get
187
{
188
- return this.isCustomCrop;
189
+ return this.Task.HasCropping;
190
}
191
set
192
{
193
- this.isCustomCrop = value;
194
+ this.Task.HasCropping = value;
195
this.NotifyOfPropertyChange(() => this.IsCustomCrop);
196
}
197
}
198
199
{
200
get
201
{
202
- return this.maintainAspectRatio;
203
+ return this.Task.KeepDisplayAspect;
204
}
205
set
206
{
207
- this.maintainAspectRatio = value;
208
+ this.Task.KeepDisplayAspect = value;
209
this.WidthAdjust();
210
this.NotifyOfPropertyChange(() => this.MaintainAspectRatio);
211
}
212
213
{
214
get
215
{
216
- return this.parHeight;
217
+ return this.Task.PixelAspectY;
218
}
219
set
220
{
221
- this.parHeight = value;
222
+ this.Task.PixelAspectY = value;
223
this.CustomAnamorphicAdjust();
224
this.NotifyOfPropertyChange(() => this.ParHeight);
225
}
226
227
{
228
get
229
{
230
- return this.parWidth;
231
+ return this.Task.PixelAspectX;
232
}
233
set
234
{
235
- this.parWidth = value;
236
+ this.Task.PixelAspectX = value;
237
this.CustomAnamorphicAdjust();
238
this.NotifyOfPropertyChange(() => this.ParWidth);
239
}
240
241
{
242
get
243
{
244
- return this.selectedAnamorphicMode;
245
+ return this.Task.Anamorphic;
246
}
247
set
248
{
249
- this.selectedAnamorphicMode = value;
250
+ this.Task.Anamorphic = value;
251
this.AnamorphicAdjust();
252
this.NotifyOfPropertyChange(() => this.SelectedAnamorphicMode);
253
}
254
255
/// <summary>
256
/// Gets or sets SelectedModulus.
257
/// </summary>
258
- public int SelectedModulus
259
+ public int? SelectedModulus
260
{
261
get
262
{
263
- return this.selectedModulus;
264
+ return this.Task.Modulus;
265
}
266
set
267
{
268
- this.selectedModulus = value;
269
+ this.Task.Modulus = value;
270
this.ModulusAdjust();
271
this.NotifyOfPropertyChange(() => this.SelectedModulus);
272
}
273
274
{
275
get
276
{
277
- return this.width;
278
+ return this.Task.Width.HasValue ? this.Task.Width.Value : 0;
279
}
280
+
281
set
282
{
283
- this.width = value;
284
+ this.Task.Width = value;
285
this.WidthAdjust();
286
this.NotifyOfPropertyChange(() => this.Width);
287
}
288
289
{
290
get
291
{
292
- return this.height;
293
+ return this.Task.Height.HasValue ? this.Task.Height.Value : 0;
294
}
295
set
296
{
297
- this.height = value;
298
+ this.Task.Height = value;
299
this.HeightAdjust();
300
this.NotifyOfPropertyChange(() => this.Height);
301
}
302
303
this.MaintainAspectRatio = true;
304
}
305
}
306
+
307
+ /// <summary>
308
+ /// Setup this tab for the specified preset.
309
+ /// </summary>
310
+ /// <param name="preset">
311
+ /// The preset.
312
+ /// </param>
313
+ public void SetPreset(Preset preset)
314
+ {
315
+ // TODO: These all need to be handled correctly.
316
+
317
+ if (Task.UsesMaxPictureSettings)
318
+ {
319
+ this.Task.MaxWidth = preset.Task.MaxWidth;
320
+ this.Task.MaxHeight = preset.Task.MaxHeight;
321
+ this.Task.Width = preset.Task.MaxWidth ?? 0;
322
+ this.Task.Height = preset.Task.MaxHeight ?? 0;
323
+ }
324
+ else
325
+ {
326
+ this.Task.Width = preset.Task.Width ?? 0;
327
+ this.Task.Height = preset.Task.Height ?? 0;
328
+ }
329
+
330
+ if (Task.Anamorphic == Anamorphic.Custom)
331
+ {
332
+ this.Task.DisplayWidth = preset.Task.DisplayWidth ?? 0;
333
+ this.Task.PixelAspectX = preset.Task.PixelAspectX;
334
+ this.Task.PixelAspectY = preset.Task.PixelAspectY;
335
+ }
336
+
337
+ this.Task.KeepDisplayAspect = preset.Task.KeepDisplayAspect;
338
+
339
+ if (this.Task.Modulus.HasValue)
340
+ {
341
+ this.Task.Modulus = preset.Task.Modulus;
342
+ }
343
+
344
+ if (preset.Task.HasCropping)
345
+ {
346
+ this.Task.Cropping = preset.Task.Cropping;
347
+ }
348
+ }
349
#endregion
350
351
/// <summary>
352
353
/// </summary>
354
private void WidthAdjust()
355
{
356
- if (this.width > this.sourceResolution.Width)
357
+ if (this.Width > this.sourceResolution.Width)
358
{
359
- this.width = this.sourceResolution.Width;
360
+ this.Task.Width = this.sourceResolution.Width;
361
+ this.NotifyOfPropertyChange(() => this.Task.Width);
362
}
363
364
switch (SelectedAnamorphicMode)
365
366
double newHeight = ((double)this.Width * this.sourceResolution.Width * SourceAspect.Height * crop_height) /
367
(this.sourceResolution.Height * SourceAspect.Width * crop_width);
368
369
- this.height = (int)Math.Round(GetModulusValue(newHeight), 0);
370
+ this.Task.Height = (int)Math.Round(GetModulusValue(newHeight), 0);
371
this.NotifyOfPropertyChange("Height");
372
}
373
break;
374
case Anamorphic.Strict:
375
- this.width = 0;
376
- this.height = 0;
377
+ this.Task.Width = 0;
378
+ this.Task.Height = 0;
379
380
- this.NotifyOfPropertyChange("Width");
381
- this.NotifyOfPropertyChange("Height");
382
+ this.NotifyOfPropertyChange(() => this.Task.Width);
383
+ this.NotifyOfPropertyChange(() => this.Task.Height);
384
this.SetDisplaySize();
385
break;
386
case Anamorphic.Loose:
387
- this.height = 0;
388
- this.NotifyOfPropertyChange("Width");
389
- this.NotifyOfPropertyChange("Height");
390
+ this.Task.Height = 0;
391
+ this.NotifyOfPropertyChange(() => this.Task.Width);
392
+ this.NotifyOfPropertyChange(() => this.Task.Height);
393
this.SetDisplaySize();
394
break;
395
case Anamorphic.Custom:
396
397
/// </summary>
398
private void HeightAdjust()
399
{
400
- if (this.height > this.sourceResolution.Height)
401
+ if (this.Height > this.sourceResolution.Height)
402
{
403
- this.height = this.sourceResolution.Height;
404
+ this.Task.Height = this.sourceResolution.Height;
405
+ this.NotifyOfPropertyChange(() => this.Task.Height);
406
}
407
408
switch (SelectedAnamorphicMode)
409
410
double new_width = ((double)this.Height * this.sourceResolution.Height * SourceAspect.Width * crop_width) /
411
(this.sourceResolution.Width * SourceAspect.Height * crop_height);
412
413
- this.Width = (int)Math.Round(GetModulusValue(new_width), 0);
414
- this.NotifyOfPropertyChange("Width");
415
+ this.Task.Width = (int)Math.Round(GetModulusValue(new_width), 0);
416
+ this.NotifyOfPropertyChange(() => this.Task.Width);
417
}
418
break;
419
case Anamorphic.Custom:
420
421
this.HeightControlEnabled = false;
422
this.ShowCustomAnamorphicControls = false;
423
424
- this.width = 0;
425
- this.height = 0;
426
+ this.Width = 0;
427
+ this.Height = 0;
428
this.NotifyOfPropertyChange(() => Width);
429
this.NotifyOfPropertyChange(() => Height);
430
this.SetDisplaySize();
431
432
this.HeightControlEnabled = false;
433
this.ShowCustomAnamorphicControls = false;
434
435
- this.width = this.sourceResolution.Width;
436
- this.height = 0;
437
+ this.Width = this.sourceResolution.Width;
438
+ this.Height = 0;
439
this.NotifyOfPropertyChange(() => Width);
440
this.NotifyOfPropertyChange(() => Height);
441
this.SetDisplaySize();
442
443
this.HeightControlEnabled = true;
444
this.ShowCustomAnamorphicControls = true;
445
446
- this.width = this.sourceResolution.Width;
447
- this.height = 0;
448
+ this.Width = this.sourceResolution.Width;
449
+ this.Height = 0;
450
this.NotifyOfPropertyChange(() => Width);
451
this.NotifyOfPropertyChange(() => Height);
452
453
- this.displayWidth = this.CalculateAnamorphicSizes().Width;
454
- this.parWidth = this.sourceParValues.Width;
455
- this.parHeight = this.sourceParValues.Height;
456
+ this.DisplayWidth = this.CalculateAnamorphicSizes().Width;
457
+ this.ParWidth = this.sourceParValues.Width;
458
+ this.ParHeight = this.sourceParValues.Height;
459
this.NotifyOfPropertyChange(() => ParHeight);
460
this.NotifyOfPropertyChange(() => ParWidth);
461
this.NotifyOfPropertyChange(() => DisplayWidth);
462
463
/// </returns>
464
private double GetModulusValue(double value)
465
{
466
- double remainder = value % this.SelectedModulus;
467
+ if (this.SelectedModulus == null)
468
+ {
469
+ return 0;
470
+ }
471
+
472
+ double remainder = value % this.SelectedModulus.Value;
473
474
if (remainder == 0)
475
return value;
476
477
- return remainder >= ((double)this.SelectedModulus / 2) ? value + (this.SelectedModulus - remainder) : value - remainder;
478
+ return remainder >= ((double)this.SelectedModulus.Value / 2) ? value + (this.SelectedModulus.Value - remainder) : value - remainder;
479
}
480
481
/// <summary>
482
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
Changed
25
1
2
3
namespace HandBrakeWPF.ViewModels
4
{
5
- using System.Windows;
6
- using HandBrake.ApplicationServices.Model;
7
- using Services.Interfaces;
8
using System.Collections.ObjectModel;
9
- using HandBrake.ApplicationServices.Services.Interfaces;
10
using System.ComponentModel.Composition;
11
- using Interfaces;
12
+ using System.Windows;
13
+
14
using Caliburn.Micro;
15
16
+ using HandBrake.ApplicationServices.Model;
17
+ using HandBrake.ApplicationServices.Services.Interfaces;
18
+
19
+ using HandBrakeWPF.Services.Interfaces;
20
+ using HandBrakeWPF.ViewModels.Interfaces;
21
+
22
/// <summary>
23
/// The Preview View Model
24
/// </summary>
25
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
Changed
20
1
2
this.SubtitleTracks = task.SubtitleTracks;
3
}
4
5
+ /// <summary>
6
+ /// Setup this tab for the specified preset.
7
+ /// </summary>
8
+ /// <param name="preset">
9
+ /// The preset.
10
+ /// </param>
11
+ public void SetPreset(Preset preset)
12
+ {
13
+ // We don't currently support subtitles within presets.
14
+ }
15
+
16
#endregion
17
}
18
}
19
\ No newline at end of file
20
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
Changed
434
1
2
3
namespace HandBrakeWPF.ViewModels
4
{
5
+ using System;
6
using System.Collections.Generic;
7
using System.ComponentModel.Composition;
8
9
using Caliburn.Micro;
10
11
+ using HandBrake.ApplicationServices;
12
using HandBrake.ApplicationServices.Functions;
13
using HandBrake.ApplicationServices.Model;
14
+ using HandBrake.ApplicationServices.Model.Encoding;
15
using HandBrake.ApplicationServices.Parsing;
16
using HandBrake.ApplicationServices.Services.Interfaces;
17
using HandBrake.Interop.Model.Encoding;
18
19
public class VideoViewModel : ViewModelBase, IVideoViewModel
20
{
21
#region Constants and Fields
22
-
23
- /// <summary>
24
- /// The average bitrate.
25
- /// </summary>
26
- private int averageBitrate;
27
-
28
- /// <summary>
29
- /// The is constant framerate.
30
- /// </summary>
31
- private bool isConstantFramerate;
32
-
33
/// <summary>
34
- /// The is constant quantity.
35
+ /// Backing field for the user setting service.
36
/// </summary>
37
- private bool isConstantQuantity;
38
-
39
- /// <summary>
40
- /// The is peak framerate.
41
- /// </summary>
42
- private bool isPeakFramerate;
43
-
44
- /// <summary>
45
- /// The is turbo first pass.
46
- /// </summary>
47
- private bool isTurboFirstPass;
48
-
49
- /// <summary>
50
- /// The is two pass.
51
- /// </summary>
52
- private bool isTwoPass;
53
-
54
- /// <summary>
55
- /// The is variable framerate.
56
- /// </summary>
57
- private bool isVariableFramerate;
58
+ private IUserSettingService userSettingService;
59
60
/// <summary>
61
/// The quality max.
62
63
private int qualityMin;
64
65
/// <summary>
66
- /// The rf.
67
- /// </summary>
68
- private int rf;
69
-
70
- /// <summary>
71
- /// The selected framerate.
72
- /// </summary>
73
- private double? selectedFramerate;
74
-
75
- /// <summary>
76
- /// The selected video encoder.
77
+ /// The show peak framerate.
78
/// </summary>
79
- private VideoEncoder selectedVideoEncoder;
80
+ private bool showPeakFramerate;
81
82
/// <summary>
83
/// The show peak framerate.
84
/// </summary>
85
- private bool showPeakFramerate;
86
+ private int rf;
87
88
#endregion
89
90
91
/// </param>
92
public VideoViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
93
{
94
+ this.Task = new EncodeTask { VideoEncoder = VideoEncoder.X264 };
95
+ this.userSettingService = userSettingService;
96
this.QualityMin = 0;
97
this.QualityMax = 51;
98
this.IsConstantQuantity = true;
99
+ this.VideoEncoders = EnumHelper<VideoEncoder>.GetEnumList();
100
}
101
102
#endregion
103
104
#region Public Properties
105
106
/// <summary>
107
- /// Gets or sets AverageBitrate.
108
+ /// Gets or sets the current Encode Task.
109
/// </summary>
110
- public string AverageBitrate
111
- {
112
- get
113
- {
114
- return this.averageBitrate.ToString();
115
- }
116
- set
117
- {
118
- if (value != null)
119
- {
120
- this.averageBitrate = int.Parse(value);
121
- }
122
- this.NotifyOfPropertyChange(() => this.AverageBitrate);
123
- }
124
- }
125
+ public EncodeTask Task { get; set; }
126
127
/// <summary>
128
/// Gets Framerates.
129
130
{
131
get
132
{
133
- return this.isConstantFramerate;
134
+ return this.Task.FramerateMode == FramerateMode.CFR;
135
}
136
set
137
{
138
- this.isConstantFramerate = value;
139
if (value)
140
{
141
+ this.Task.FramerateMode = FramerateMode.CFR;
142
this.IsVariableFramerate = false;
143
this.IsPeakFramerate = false;
144
}
145
146
{
147
get
148
{
149
- return this.isConstantQuantity;
150
+ return this.Task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality;
151
}
152
set
153
{
154
- this.isConstantQuantity = value;
155
+ if (value)
156
+ {
157
+ this.Task.VideoEncodeRateType = VideoEncodeRateType.ConstantQuality;
158
+ this.Task.TwoPass = false;
159
+ this.Task.TurboFirstPass = false;
160
+ this.Task.VideoBitrate = null;
161
+ this.NotifyOfPropertyChange(() => this.Task);
162
+ }
163
+ else
164
+ {
165
+ this.Task.VideoEncodeRateType = VideoEncodeRateType.AverageBitrate;
166
+ }
167
+
168
this.NotifyOfPropertyChange(() => this.IsConstantQuantity);
169
}
170
}
171
172
{
173
get
174
{
175
- return this.isPeakFramerate;
176
+ return this.Task.FramerateMode == FramerateMode.PFR;
177
}
178
set
179
{
180
- this.isPeakFramerate = value;
181
if (value)
182
{
183
+ this.Task.FramerateMode = FramerateMode.PFR;
184
this.IsVariableFramerate = false;
185
this.IsConstantFramerate = false;
186
}
187
188
}
189
190
/// <summary>
191
- /// Gets or sets a value indicating whether IsTurboFirstPass.
192
- /// </summary>
193
- public bool IsTurboFirstPass
194
- {
195
- get
196
- {
197
- return this.isTurboFirstPass;
198
- }
199
- set
200
- {
201
- this.isTurboFirstPass = value;
202
- this.NotifyOfPropertyChange(() => this.IsTurboFirstPass);
203
- }
204
- }
205
-
206
- /// <summary>
207
- /// Gets or sets a value indicating whether IsTwoPass.
208
- /// </summary>
209
- public bool IsTwoPass
210
- {
211
- get
212
- {
213
- return this.isTwoPass;
214
- }
215
- set
216
- {
217
- this.isTwoPass = value;
218
- this.NotifyOfPropertyChange(() => this.IsTwoPass);
219
- }
220
- }
221
-
222
- /// <summary>
223
/// Gets or sets a value indicating whether IsVariableFramerate.
224
/// </summary>
225
public bool IsVariableFramerate
226
{
227
get
228
{
229
- return this.isVariableFramerate;
230
+ return this.Task.FramerateMode == FramerateMode.VFR;
231
}
232
set
233
{
234
- this.isVariableFramerate = value;
235
if (value)
236
{
237
this.IsPeakFramerate = false;
238
this.IsConstantFramerate = false;
239
+ this.Task.FramerateMode = FramerateMode.VFR;
240
}
241
242
this.NotifyOfPropertyChange(() => this.IsVariableFramerate);
243
244
{
245
get
246
{
247
- return this.rf;
248
+ return rf;
249
}
250
set
251
{
252
this.rf = value;
253
+
254
+ double cqStep = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step);
255
+ switch (this.SelectedVideoEncoder)
256
+ {
257
+ case VideoEncoder.FFMpeg:
258
+ case VideoEncoder.FFMpeg2:
259
+ this.Task.Quality = (32 - value);
260
+ break;
261
+ case VideoEncoder.X264:
262
+ double rfValue = 51.0 - value * cqStep;
263
+ rfValue = Math.Round(rfValue, 2);
264
+ this.Task.Quality = rfValue;
265
+
266
+ // TODO: Lossless warning.
267
+ break;
268
+ case VideoEncoder.Theora:
269
+ Task.Quality = value;
270
+ break;
271
+ }
272
+
273
this.NotifyOfPropertyChange(() => this.RF);
274
+ this.NotifyOfPropertyChange(() => this.DisplayRF);
275
+ }
276
+ }
277
+
278
+ /// <summary>
279
+ /// Gets DisplayRF.
280
+ /// </summary>
281
+ public double DisplayRF
282
+ {
283
+ get
284
+ {
285
+ return Task.Quality.HasValue ? this.Task.Quality.Value : 0;
286
}
287
}
288
289
290
{
291
get
292
{
293
- if (this.selectedFramerate == null)
294
+ if (this.Task.Framerate == null)
295
{
296
return "Same as source";
297
}
298
299
- return this.selectedFramerate.ToString();
300
+ return this.Task.Framerate.ToString();
301
}
302
set
303
{
304
if (value == "Same as source")
305
{
306
- this.selectedFramerate = null;
307
+ this.Task.Framerate = null;
308
this.ShowPeakFramerate = false;
309
}
310
- else
311
+ else if (!string.IsNullOrEmpty(value))
312
{
313
this.ShowPeakFramerate = true;
314
- this.selectedFramerate = double.Parse(value);
315
+ if (this.Task.FramerateMode == FramerateMode.VFR)
316
+ {
317
+ this.Task.FramerateMode = FramerateMode.PFR;
318
+ }
319
+ this.Task.Framerate = double.Parse(value);
320
}
321
322
this.NotifyOfPropertyChange(() => this.SelectedFramerate);
323
+ this.NotifyOfPropertyChange(() => this.Task);
324
}
325
}
326
327
/// <summary>
328
/// Gets or sets SelectedVideoEncoder.
329
/// </summary>
330
- public string SelectedVideoEncoder
331
+ public VideoEncoder SelectedVideoEncoder
332
{
333
get
334
{
335
- return EnumHelper<VideoEncoder>.GetDisplay(this.selectedVideoEncoder);
336
+ return this.Task.VideoEncoder;
337
}
338
set
339
{
340
- this.selectedVideoEncoder = EnumHelper<VideoEncoder>.GetValue(value);
341
+ this.Task.VideoEncoder = value;
342
this.NotifyOfPropertyChange(() => this.SelectedVideoEncoder);
343
+
344
+ // Tell the Advanced Panel off the change
345
+ IAdvancedViewModel advancedViewModel = IoC.Get<IAdvancedViewModel>();
346
+ advancedViewModel.SetEncoder(this.Task.VideoEncoder);
347
+
348
+ // Update the Quality Slider
349
+ switch (this.SelectedVideoEncoder)
350
+ {
351
+ case VideoEncoder.FFMpeg:
352
+ case VideoEncoder.FFMpeg2:
353
+ this.QualityMin = 1;
354
+ this.QualityMax = 31;
355
+ break;
356
+ case VideoEncoder.X264:
357
+ this.QualityMin = 0;
358
+ this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step));
359
+ break;
360
+ case VideoEncoder.Theora:
361
+ this.QualityMin = 0;
362
+ this.QualityMax = 63;
363
+ break;
364
+ }
365
}
366
}
367
368
369
}
370
371
/// <summary>
372
- /// Gets VideoEncoders.
373
+ /// Gets or sets VideoEncoders.
374
/// </summary>
375
- public IEnumerable<string> VideoEncoders
376
- {
377
- get
378
- {
379
- return EnumHelper<VideoEncoder>.GetEnumDisplayValues(typeof(VideoEncoder));
380
- }
381
- }
382
+ public IEnumerable<VideoEncoder> VideoEncoders { get; set; }
383
384
#endregion
385
386
387
/// </param>
388
public void SetSource(Title title, Preset preset, EncodeTask task)
389
{
390
+ this.Task = task;
391
+ }
392
+
393
+ /// <summary>
394
+ /// Setup this tab for the specified preset.
395
+ /// </summary>
396
+ /// <param name="preset">
397
+ /// The preset.
398
+ /// </param>
399
+ public void SetPreset(Preset preset)
400
+ {
401
+ if (preset == null || preset.Task == null)
402
+ {
403
+ return;
404
+ }
405
+
406
+ this.SelectedVideoEncoder = preset.Task.VideoEncoder;
407
+ this.SelectedFramerate = preset.Task.Framerate.ToString();
408
+ switch (preset.Task.FramerateMode)
409
+ {
410
+ case FramerateMode.CFR:
411
+ this.IsConstantFramerate = true;
412
+ break;
413
+ case FramerateMode.VFR:
414
+ this.IsVariableFramerate = true;
415
+ this.ShowPeakFramerate = false;
416
+ break;
417
+ case FramerateMode.PFR:
418
+ this.IsPeakFramerate = true;
419
+ this.ShowPeakFramerate = true;
420
+ break;
421
+ }
422
+
423
+ // TODO Compute RF
424
+ this.RF = 20;
425
+
426
+ this.Task.TwoPass = preset.Task.TwoPass;
427
+ this.Task.TurboFirstPass = preset.Task.TurboFirstPass;
428
+ this.Task.VideoBitrate = preset.Task.VideoBitrate;
429
+
430
+ this.NotifyOfPropertyChange(() => this.Task);
431
}
432
433
#endregion
434
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/AdvancedView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/AdvancedView.xaml
Changed
64
1
2
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
- mc:Ignorable="d"
7
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d"
9
d:DesignHeight="300" d:DesignWidth="300"
10
x:Name="advancedView">
11
+ <UserControl.Resources>
12
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
13
+ <Converters:EnumComboConverter x:Key="x264DisplayConverter" />
14
+ </UserControl.Resources>
15
+
16
<Grid>
17
<Grid.RowDefinitions>
18
<RowDefinition Height="Auto" />
19
20
21
<TextBlock Text="Advanced" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
22
23
- <TextBox Grid.Row="2" Margin="10" Text="{Binding Query}"
24
- VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
25
+ <Grid Grid.Row="1" Margin="10,10,0,0" Visibility="{Binding DisplayX264Options, Converter={StaticResource boolToVisConverter}}">
26
+ <Grid.RowDefinitions>
27
+ <RowDefinition Height="Auto" />
28
+ <RowDefinition Height="*" />
29
+ </Grid.RowDefinitions>
30
+
31
+ <StackPanel Grid.Row="0" Orientation="Vertical" Margin="0,0,0,10">
32
+
33
+ <TextBlock Text="X264 Advanced Options:" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
34
+
35
+ <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">
36
+ <TextBlock Text="Preset:" VerticalAlignment="Center" />
37
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
38
+ ItemsSource="{Binding X264Presets, Converter={StaticResource x264DisplayConverter}}"
39
+ SelectedItem="{Binding X264Preset, Converter={StaticResource x264DisplayConverter}}"/>
40
+
41
+ <TextBlock Text="Profile:" VerticalAlignment="Center" />
42
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
43
+ ItemsSource="{Binding X264Profiles, Converter={StaticResource x264DisplayConverter}}"
44
+ SelectedItem="{Binding X264Profile, Converter={StaticResource x264DisplayConverter}}"/>
45
+
46
+
47
+ <TextBlock Text="Tune:" VerticalAlignment="Center" />
48
+ <ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
49
+ ItemsSource="{Binding X264Tunes, Converter={StaticResource x264DisplayConverter}}"
50
+ SelectedItem="{Binding X264Tune, Converter={StaticResource x264DisplayConverter}}"/>
51
+ </StackPanel>
52
+ </StackPanel>
53
+
54
+ </Grid>
55
+
56
+ <StackPanel Grid.Row="2" Margin="10" Height="100" VerticalAlignment="Top" >
57
+ <TextBlock Text="Advanced Query" Margin="0,0,0,5" FontWeight="Bold" VerticalAlignment="Center" />
58
+ <TextBox Text="{Binding Query}"
59
+ VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="150" TextWrapping="Wrap" />
60
+ </StackPanel>
61
62
</Grid>
63
</UserControl>
64
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/AudioView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/AudioView.xaml
Changed
48
1
2
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
3
xmlns:cal="http://www.caliburnproject.org"
4
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
5
- mc:Ignorable="d">
6
+ xmlns:Conveters="clr-namespace:HandBrakeWPF.Converters"
7
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d">
8
+
9
+ <UserControl.Resources>
10
+ <Conveters:EnumComboConverter x:Key="enumComboConverter" />
11
+ </UserControl.Resources>
12
<Grid>
13
<Grid.RowDefinitions>
14
<RowDefinition Height="Auto" />
15
16
</Grid>
17
18
<ListBox Grid.Row="2" ItemsSource="{Binding AudioTracks}"
19
- SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
20
+ SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10"
21
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
22
+ dd:DragDrop.DropHandler="{Binding}">
23
<ListBox.ItemContainerStyle>
24
<Style TargetType="ListBoxItem">
25
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
26
27
SelectedItem="{Binding ScannedTrack}"/>
28
<TextBlock Text="Codec" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center" />
29
<ComboBox Width="100" Grid.Column="3" Margin="5,0,5,0" Height="22"
30
- ItemsSource="{Binding DataContext.AudioEncoders, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
31
- SelectedItem="{Binding Encoder}"/>
32
+ ItemsSource="{Binding DataContext.AudioEncoders, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
33
+ SelectedItem="{Binding Encoder, Converter={StaticResource enumComboConverter}}"/>
34
<TextBlock Text="Bitrate" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />
35
<ComboBox Width="70" Grid.Column="5" Margin="5,0,5,0" Height="22"
36
ItemsSource="{Binding DataContext.AudioBitrates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
37
38
<!-- Row 2-->
39
<TextBlock Text="Mixdown" FontWeight="Bold" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center"/>
40
<ComboBox Width="100" Grid.Column="1" Margin="5,0,5,0" Grid.Row="1" Height="22"
41
- ItemsSource="{Binding DataContext.AudioMixdowns, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
42
- SelectedItem="{Binding MixDown}"/>
43
+ ItemsSource="{Binding DataContext.AudioMixdowns, Converter={StaticResource enumComboConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
44
+ SelectedItem="{Binding MixDown, Converter={StaticResource enumComboConverter}}"/>
45
<TextBlock Text="DRC" FontWeight="Bold" Grid.Column="2" Grid.Row="1" VerticalAlignment="Center"/>
46
<NumericUpDown:NumericUpDown Width="45" Value="{Binding DRC}" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Left" Margin="5,0,5,0" />
47
<TextBlock Text="Gain" FontWeight="Bold" Grid.Column="4" Grid.Row="1" VerticalAlignment="Center"/>
48
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/ChaptersView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
Changed
11
1
2
3
<DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters}"
4
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
5
- CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False">
6
+ CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
7
+ CanUserAddRows="False" CanUserDeleteRows="False">
8
<DataGrid.Columns>
9
<DataGridTextColumn Header="Chapter Number" Width="150" Binding="{Binding ChapterNumber}" IsReadOnly="True" />
10
<DataGridTextColumn Header="Chapter Name" Width="*" Binding="{Binding ChapterName}" IsReadOnly="False" />
11
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/MainView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/MainView.xaml
Changed
9
1
2
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
3
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
4
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11" Background="#FFF0F0F0"
5
+ Micro:Message.Attach="[Event Loaded] = [Action Load]"
6
AllowDrop="True">
7
8
<i:Interaction.Triggers>
9
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/QueueView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/QueueView.xaml
Changed
31
1
2
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
3
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
4
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
5
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" mc:Ignorable="d" Title="{Binding Title}"
6
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
7
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d" Title="{Binding Title}"
8
Width="600" Height="400"
9
Background="#FFF0F0F0">
10
11
12
<TextBlock Text="{Binding JobStatus}" />
13
</StackPanel>
14
15
- <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10">
16
+ <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10"
17
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
18
+ dd:DragDrop.DropHandler="{Binding}">
19
<ListBox.ItemContainerStyle>
20
<Style TargetType="ListBoxItem">
21
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
22
23
</ListBox.ItemContainerStyle>
24
25
<ListBox.ItemTemplate>
26
- <DataTemplate>
27
+ <DataTemplate x:Name="QueueItemTemplate">
28
29
<Grid HorizontalAlignment="Stretch" >
30
<Grid.ColumnDefinitions>
31
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
Changed
21
1
2
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
3
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
4
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
5
- mc:Ignorable="d">
6
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d">
7
<Grid>
8
<Grid.RowDefinitions>
9
<RowDefinition Height="Auto" />
10
11
</Grid>
12
13
<ListBox Grid.Row="2" ItemsSource="{Binding SubtitleTracks}"
14
- SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10">
15
+ SelectionMode="Extended" Background="LightGray" Margin="10,10,10,10"
16
+ dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
17
+ dd:DragDrop.DropHandler="{Binding}">
18
<ListBox.ItemContainerStyle>
19
<Style TargetType="ListBoxItem">
20
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
21
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/Views/VideoView.xaml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/Views/VideoView.xaml
Changed
46
1
2
<UserControl.Resources>
3
<Converters:BooleanConverter x:Key="boolConverter" />
4
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
5
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
6
</UserControl.Resources>
7
8
<Grid Margin="10,5,0,0">
9
10
11
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
12
<TextBlock Text="Video Codec:" Width="100" />
13
- <ComboBox Width="120" ItemsSource="{Binding VideoEncoders}" SelectedItem="{Binding SelectedVideoEncoder}" />
14
+ <ComboBox Width="120" ItemsSource="{Binding VideoEncoders, Converter={StaticResource enumComboConverter}, Mode=TwoWay}"
15
+ SelectedItem="{Binding SelectedVideoEncoder, Converter={StaticResource enumComboConverter}, Mode=TwoWay}" />
16
</StackPanel>
17
18
<StackPanel Orientation="Horizontal">
19
20
21
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" >
22
<RadioButton Content="Constant Quality:" IsChecked="{Binding IsConstantQuantity}" Margin="0,0,10,0"/>
23
- <TextBlock Text="{Binding RF}" Width="25" />
24
+ <TextBlock Text="{Binding DisplayRF}" Width="25" />
25
<TextBlock Text="RF" FontWeight="Bold" />
26
</StackPanel>
27
28
29
30
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
31
<RadioButton Content="Avg Bitrate (kbps):" IsChecked="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,10,0"/>
32
- <TextBox Width="75" Text="{Binding AverageBitrate}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
33
+ <TextBox Width="75" Text="{Binding Task.VideoBitrate}" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}" />
34
</StackPanel>
35
36
<StackPanel Orientation="Horizontal" Margin="30,0,0,0">
37
<CheckBox Content="2-Pass Encoding" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
38
- IsChecked="{Binding IsTwoPass}" Margin="0,0,10,0" />
39
+ IsChecked="{Binding Task.TwoPass}" Margin="0,0,10,0" />
40
<CheckBox Content="Turbo first pass" IsEnabled="{Binding IsConstantQuantity, Converter={StaticResource boolConverter}, ConverterParameter=true}"
41
- IsChecked="{Binding IsTurboFirstPass}" />
42
+ IsChecked="{Binding Task.TurboFirstPass}" />
43
</StackPanel>
44
45
</StackPanel>
46
HandBrake-0.9.6.tar.bz2/win/CS/HandBrakeWPF/defaultsettings.xml -> HandBrake-0.9.8.tar.bz2/win/CS/HandBrakeWPF/defaultsettings.xml
Changed
47
1
2
</item>
3
<item>
4
<key>
5
- <string>appcast</string>
6
+ <string>appcast_i686</string>
7
</key>
8
<value>
9
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast.xml</anyType>
10
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast.i386.xml</anyType>
11
</value>
12
</item>
13
<item>
14
<key>
15
- <string>appcast_unstable</string>
16
+ <string>appcast_x64</string>
17
</key>
18
<value>
19
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast_unstable.xml</anyType>
20
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">http://handbrake.fr/appcast_unstable.x86_64.xml</anyType>
21
</value>
22
</item>
23
<item>
24
25
</item>
26
<item>
27
<key>
28
- <string>NativeLanguageForSubtitles</string>
29
+ <string>NativeLanguageSubtitles</string>
30
</key>
31
<value>
32
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
33
34
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
35
</value>
36
</item>
37
+ <item>
38
+ <key>
39
+ <string>HandBrakePlatform</string>
40
+ </key>
41
+ <value>
42
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">MinGW i686</anyType>
43
+ </value>
44
+ </item>
45
</dictionary>
46
\ No newline at end of file
47
HandBrake-0.9.6.tar.bz2/win/CS/Installer/Installer.nsi -> HandBrake-0.9.8.tar.bz2/win/CS/Installer/Installer.nsi
Changed
28
1
2
3
; HM NIS Edit Wizard helper defines
4
!define PRODUCT_NAME "HandBrake"
5
-!define PRODUCT_VERSION "0.9.6"
6
-!define PRODUCT_VERSION_NUMBER "0.9.6"
7
+!define PRODUCT_VERSION "0.9.8"
8
+!define PRODUCT_VERSION_NUMBER "0.9.8"
9
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
10
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
11
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
12
13
Call CheckFramework
14
StrCmp $0 "1" +3
15
StrCpy $InstallDotNET "Yes"
16
- MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
17
+ MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 Client Profile is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
18
Pop $0
19
20
; Get .NET if required
21
${If} $InstallDotNET == "Yes"
22
SetDetailsView hide
23
- inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=9CFB2D51-5FF4-4491-B0E5-B386F32C0992&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f1%2fB%2fE%2f1BE39E79-7E39-46A3-96FF-047F95396215%2fdotNetFx40_Full_setup.exe" "$INSTDIR\dotnetfx.exe" /end
24
+ inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe" "$INSTDIR\dotnetfx.exe" /end
25
Pop $1
26
27
${If} $1 != "OK"
28
HandBrake-0.9.6.tar.bz2/win/CS/Installer/Installer64.nsi -> HandBrake-0.9.8.tar.bz2/win/CS/Installer/Installer64.nsi
Changed
28
1
2
3
; HM NIS Edit Wizard helper defines
4
!define PRODUCT_NAME "HandBrake"
5
-!define PRODUCT_VERSION "0.9.6"
6
-!define PRODUCT_VERSION_NUMBER "0.9.6"
7
+!define PRODUCT_VERSION "0.9.8"
8
+!define PRODUCT_VERSION_NUMBER "0.9.8"
9
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
10
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
11
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
12
13
Call CheckFramework
14
StrCmp $0 "1" +3
15
StrCpy $InstallDotNET "Yes"
16
- MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
17
+ MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 Client Profile is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
18
Pop $0
19
20
; Get .NET if required
21
${If} $InstallDotNET == "Yes"
22
SetDetailsView hide
23
- inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=9CFB2D51-5FF4-4491-B0E5-B386F32C0992&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f1%2fB%2fE%2f1BE39E79-7E39-46A3-96FF-047F95396215%2fdotNetFx40_Full_setup.exe" "$INSTDIR\dotnetfx.exe" /end
24
+ inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe" "$INSTDIR\dotnetfx.exe" /end
25
Pop $1
26
27
${If} $1 != "OK"
28
HandBrake-0.9.6.tar.bz2/win/CS/Installer/MakeNightly.nsi.tmpl -> HandBrake-0.9.8.tar.bz2/win/CS/Installer/MakeNightly.nsi.tmpl
Changed
25
1
2
Call CheckFramework
3
StrCmp $0 "1" +3
4
StrCpy $InstallDotNET "Yes"
5
- MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
6
+ MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 Client Profile is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
7
Pop $0
8
9
; Get .NET if required
10
${If} $InstallDotNET == "Yes"
11
SetDetailsView hide
12
- inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=9CFB2D51-5FF4-4491-B0E5-B386F32C0992&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f1%2fB%2fE%2f1BE39E79-7E39-46A3-96FF-047F95396215%2fdotNetFx40_Full_setup.exe" "$INSTDIR\dotnetfx.exe" /end
13
+ inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe" "$INSTDIR\dotnetfx.exe" /end
14
Pop $1
15
16
${If} $1 != "OK"
17
18
File "*.dll"
19
File "*.config"
20
File "*.xml"
21
+ File "*.pdb"
22
23
; Copy the standard doc set into the doc folder
24
SetOutPath "$INSTDIR\doc"
25
HandBrake-0.9.6.tar.bz2/win/CS/Installer/MakeNightly64.nsi.tmpl -> HandBrake-0.9.8.tar.bz2/win/CS/Installer/MakeNightly64.nsi.tmpl
Changed
25
1
2
Call CheckFramework
3
StrCmp $0 "1" +3
4
StrCpy $InstallDotNET "Yes"
5
- MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
6
+ MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 Client Profile is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK
7
Pop $0
8
9
; Get .NET if required
10
${If} $InstallDotNET == "Yes"
11
SetDetailsView hide
12
- inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=9CFB2D51-5FF4-4491-B0E5-B386F32C0992&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f1%2fB%2fE%2f1BE39E79-7E39-46A3-96FF-047F95396215%2fdotNetFx40_Full_setup.exe" "$INSTDIR\dotnetfx.exe" /end
13
+ inetc::get /caption "Downloading .NET Framework 4.0" /canceltext "Cancel" "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe" "$INSTDIR\dotnetfx.exe" /end
14
Pop $1
15
16
${If} $1 != "OK"
17
18
File "*.dll"
19
File "*.config"
20
File "*.xml"
21
+ File "*.pdb"
22
23
; Copy the standard doc set into the doc folder
24
SetOutPath "$INSTDIR\doc"
25
HandBrake-0.9.6.tar.bz2/win/CS/Program.cs -> HandBrake-0.9.8.tar.bz2/win/CS/Program.cs
Changed
11
1
2
return;
3
}
4
5
- // Make sure the GUI knows what CLI version it's attached to.
6
- Functions.Main.SetCliVersionData();
7
-
8
// Check were not running on a screen that's going to cause some funnies to happen.
9
Screen scr = Screen.PrimaryScreen;
10
if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))
11
HandBrake-0.9.6.tar.bz2/win/CS/Properties/AssemblyInfo.cs.tmpl -> HandBrake-0.9.8.tar.bz2/win/CS/Properties/AssemblyInfo.cs.tmpl
Changed
9
1
2
// Revision
3
//
4
5
-[assembly: AssemblyVersion("0.9.6.$WCREV$")]
6
+[assembly: AssemblyVersion("0.9.8.$WCREV$")]
7
[assembly: NeutralResourcesLanguage("")]
8
\ No newline at end of file
9
HandBrake-0.9.6.tar.bz2/win/CS/ToolWindows/UpdateInfo.cs -> HandBrake-0.9.8.tar.bz2/win/CS/ToolWindows/UpdateInfo.cs
Changed
19
1
2
/// <summary>
3
/// The Current Build
4
/// </summary>
5
- private readonly string currentBuild;
6
+ private readonly int currentBuild;
7
8
/// <summary>
9
/// Initializes a new instance of the <see cref="UpdateInfo"/> class.
10
11
/// <param name="currentBuild">
12
/// The current Build.
13
/// </param>
14
- public UpdateInfo(UpdateCheckInformation reader, string currentVersion, string currentBuild)
15
+ public UpdateInfo(UpdateCheckInformation reader, string currentVersion, int currentBuild)
16
{
17
InitializeComponent();
18
19
HandBrake-0.9.6.tar.bz2/win/CS/defaultsettings.xml -> HandBrake-0.9.8.tar.bz2/win/CS/defaultsettings.xml
Changed
33
1
2
<string>daysBetweenUpdateCheck</string>
3
</key>
4
<value>
5
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">7</anyType>
6
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">30</anyType>
7
</value>
8
</item>
9
<item>
10
11
</item>
12
<item>
13
<key>
14
- <string>NativeLanguageForSubtitles</string>
15
+ <string>NativeLanguageSubtitles</string>
16
</key>
17
<value>
18
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
19
20
<anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
21
</value>
22
</item>
23
+ <item>
24
+ <key>
25
+ <string>HandBrakePlatform</string>
26
+ </key>
27
+ <value>
28
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">MinGW i686</anyType>
29
+ </value>
30
+ </item>
31
</dictionary>
32
\ No newline at end of file
33
HandBrake-0.9.6.tar.bz2/win/CS/doc/AUTHORS -> HandBrake-0.9.8.tar.bz2/win/CS/doc/AUTHORS
Changed
136
1
2
AUTHORS file for HandBrake <http://handbrake.fr/>
3
4
-Eric Petit <titer@m0k.org>
5
+Eric Petit
6
+ Core (construct, multithreading, BeOS/OS X/Linux ports)
7
+ MPEG demuxer
8
+ MPEG-2, AC3 and MPGA decoders (w/ libmpeg2/liba52/libavcodec)
9
10
+ OS X interface
11
+ French translation
12
13
-Laurent Aimar <fenrir@via.ecp.fr>
14
+Laurent Aimar
15
+ H264 and Vorbis encoders (w/ libx264/libvorbis)
16
+ OGG/OGM muxer (w/ libogg)
17
+ Gtk2 interface
18
+ wxWidgets interface
19
20
-Van Jacobson <vanj.hb@gmail.com> (van)
21
+Van Jacobson (van)
22
+ Universal input architecture
23
+ MPEG Standard Target Decoder timing model
24
+ Auto-typing MPEG stream files
25
26
+ Minor dvd reader fixes
27
+ Chapter mark bug fixes
28
29
-John Allen (?) <johnallenemail@gmail.com> (johnallen)
30
+John Allen
31
+ Core enhancements
32
+ Threading enhancements
33
+ Simplified Mac OS X GUI
34
35
-Joe Crain <dynaflashtech@gmail.com> (dynaflash)
36
+Joe Crain (dynaflash)
37
+ Mac OS X GUI enhancements/rewrite
38
39
-Damiano Galassi <damiog@gmail.com> (ritsuka)
40
+Damiano Galassi (ritsuka)
41
+ Mac OS X GUI enhancements
42
43
-Edward Groenendaal <eddyg.hb@myreflection.org> (eddyg)
44
+Edward Groenendaal (eddyg)
45
+ Major bug fixes
46
+ Subtitle scan & Colour
47
+ Performance improvements
48
49
-David Foster <unknown> (davidfstr)
50
+David Foster (davidfstr)
51
+ Subtitles from file inputs
52
+ SSA subtitle support
53
54
-Rodney Hester <rhester@multics.dynalias.com> (rhester)
55
+Rodney Hester (rhester)
56
+ iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
57
58
-Andrew Kimpton <awk@awkward.org> (awk)
59
+Andrew Kimpton (awk)
60
+ MPEG Audio fixes
61
+ MPEG Stream Support
62
63
-Chris Lee <clee@kde.org>
64
+Chris Lee
65
+ PAR/anamorphic support
66
+ dvdread enhancements
67
+ Linux GUI
68
69
-Chris Long <chris.long@mac.com> (chrislong)
70
+Chris Long (chrislong)
71
+ iPod firmware 1.2+ 640x480 MPEG-4/H.264 support
72
73
Brian Mario <Unknown> (brianmario)
74
+ Windows GUI
75
76
-Maurj <handbrake@maurj.com> (maurj)
77
+Maurj(maurj)
78
+ Dolby Surround and Dolby Pro Logic II mixdowns
79
+ 6-channel AAC audio from 5.1 source
80
+ Mono AAC audio from mono source
81
82
+ Mac OS X GUI enhancements
83
+ Support for DTS audio sources
84
85
-Mirkwood <mirkwood07@gmail.com> (mirkwood)
86
+Mirkwood (mirkwood)
87
+ Windows CLI port
88
89
-Nyx <unknown> (Nyx)
90
+Nyx
91
+ Frame re-ordering and flushing in mp4
92
93
-Philippe Rigaux <pri@nopapers.org> (prigaux)
94
+Philippe Rigaux (prigaux)
95
+ 3rd party library integration
96
+ Mac OS X GUI enhancements
97
+ PAR/anamorphic support
98
+ Universal binary build process
99
+ Conversion from jam to make for compiles
100
101
-Jonathon Rubin <jb.rubin@gmail.com> (jbrjake)
102
+Jonathon Rubin (jbrjake)
103
+ Massive core enhancements
104
+ Significant improvements to H.264 support
105
106
-Scott <unknown> (s55)
107
+Scott(s55)
108
+ Windows GUI
109
110
-John Stebbins <jstebbins.hb@gmail.com> (j45)
111
+John Stebbins (j45)
112
+ GTK GUI
113
+ TrueHD demuxing
114
+ libavcodec video encoding quality enhancements
115
+ Numerous bug fixes
116
117
-Chris Thoman <cthoman@gmail.com> (huevos_rancheros)
118
+Chris Thoman (huevos_rancheros)
119
+ Ported video filters from libmpcodec
120
121
-Mark Krenek <markkrenek@mac.com> (travistex)
122
+Mark Krenek (travistex)
123
+ Mac OS X GUI enhancements
124
+ Mac OS X GUI Queueing system
125
126
-Kona 'mike' Blend <Kona8lend@gmail.com> (KonaBlend)
127
+Kona 'mike' Blend (KonaBlend)
128
+ Build System and related guides
129
+
130
+David Rickard (RandomEngy)
131
++ HandBrake Interop Library
132
+
133
+Tim Walker (Rodeo)
134
++ Miscellaneous fixes and enhancements
135
+
136
HandBrake-0.9.6.tar.bz2/win/CS/doc/COPYING -> HandBrake-0.9.8.tar.bz2/win/CS/doc/COPYING
Changed
119
1
2
- GNU GENERAL PUBLIC LICENSE
3
- Version 2, June 1991
4
+ GNU GENERAL PUBLIC LICENSE
5
+ Version 2, June 1991
6
7
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
8
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
10
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
11
Everyone is permitted to copy and distribute verbatim copies
12
of this license document, but changing it is not allowed.
13
14
- Preamble
15
+ Preamble
16
17
The licenses for most software are designed to take away your
18
freedom to share and change it. By contrast, the GNU General Public
19
20
General Public License applies to most of the Free Software
21
Foundation's software and to any other program whose authors commit to
22
using it. (Some other Free Software Foundation software is covered by
23
-the GNU Library General Public License instead.) You can apply it to
24
+the GNU Lesser General Public License instead.) You can apply it to
25
your programs, too.
26
27
When we speak of free software, we are referring to freedom, not
28
29
30
The precise terms and conditions for copying, distribution and
31
modification follow.
32
-
33
- GNU GENERAL PUBLIC LICENSE
34
+
35
+ GNU GENERAL PUBLIC LICENSE
36
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
37
38
0. This License applies to any program or other work which contains
39
40
License. (Exception: if the Program itself is interactive but
41
does not normally print such an announcement, your work based on
42
the Program is not required to print an announcement.)
43
-
44
+
45
These requirements apply to the modified work as a whole. If
46
identifiable sections of that work are not derived from the Program,
47
and can be reasonably considered independent and separate works in
48
49
access to copy the source code from the same place counts as
50
distribution of the source code, even though third parties are not
51
compelled to copy the source along with the object code.
52
-
53
+
54
4. You may not copy, modify, sublicense, or distribute the Program
55
except as expressly provided under this License. Any attempt
56
otherwise to copy, modify, sublicense or distribute the Program is
57
58
59
This section is intended to make thoroughly clear what is believed to
60
be a consequence of the rest of this License.
61
-
62
+
63
8. If the distribution and/or use of the Program is restricted in
64
certain countries either by patents or by copyrighted interfaces, the
65
original copyright holder who places the Program under this License
66
67
of preserving the free status of all derivatives of our free software and
68
of promoting the sharing and reuse of software generally.
69
70
- NO WARRANTY
71
+ NO WARRANTY
72
73
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
74
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
75
76
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
77
POSSIBILITY OF SUCH DAMAGES.
78
79
- END OF TERMS AND CONDITIONS
80
-
81
- How to Apply These Terms to Your New Programs
82
+ END OF TERMS AND CONDITIONS
83
+
84
+ How to Apply These Terms to Your New Programs
85
86
If you develop a new program, and you want it to be of the greatest
87
possible use to the public, the best way to achieve this is to make it
88
89
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90
GNU General Public License for more details.
91
92
- You should have received a copy of the GNU General Public License
93
- along with this program; if not, write to the Free Software
94
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
95
-
96
+ You should have received a copy of the GNU General Public License along
97
+ with this program; if not, write to the Free Software Foundation, Inc.,
98
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
99
100
Also add information on how to contact you by electronic and paper mail.
101
102
If the program is interactive, make it output a short notice like this
103
when it starts in an interactive mode:
104
105
- Gnomovision version 69, Copyright (C) year name of author
106
+ Gnomovision version 69, Copyright (C) year name of author
107
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
108
This is free software, and you are welcome to redistribute it
109
under certain conditions; type `show c' for details.
110
111
This General Public License does not permit incorporating your program into
112
proprietary programs. If your program is a subroutine library, you may
113
consider it more useful to permit linking proprietary applications with the
114
-library. If this is what you want to do, use the GNU Library General
115
-Public License instead of this License.
116
+library. If this is what you want to do, use the GNU Lesser General
117
+Public License instead of this License.
118
\ No newline at end of file
119
HandBrake-0.9.6.tar.bz2/win/CS/doc/CREDITS -> HandBrake-0.9.8.tar.bz2/win/CS/doc/CREDITS
Changed
206
1
2
CREDITS file for HandBrake <http://handbrake.fr/>
3
4
HandBrake uses many cool libraries from the GNU/Linux world.
5
-Thank their authors!
6
7
-liba52 authors:
8
- Aaron Holtzman
9
- Michel Lespinasse
10
- Gildas Bazin
11
- Billy Biggs
12
- Eduard Hasenleithner
13
- Håkan Hjort
14
- Charles M. Hannum
15
- Chris Hodges
16
- Michael Holzt
17
- Angelos Keromytis
18
- David I. Lehn
19
- Don Mahurin
20
- Jim Miller
21
- Takefumi Sayo
22
- Shoji Tokunaga
23
-
24
-libavcodec authors:
25
- Fabrice Bellard
26
- Alex Beregszaszi
27
- Brian Foley
28
- Arpad Gereoffy
29
- Philip Gladstone
30
- Falk Hueffner
31
- Zdenek Kabelac
32
- Nick Kurshev
33
- Michael Niedermayer
34
- François Revol
35
- Dieter Shirley
36
- Juan J. Sierralta
37
- Lionel Ulmer
38
-
39
-libdca authors:
40
- Gildas Bazin
41
- Sam Hocevar
42
-
43
-libdvdread authors:
44
- Björn Englund
45
- Håkan Hjort
46
- Billy Biggs
47
- Christian Wolff
48
-
49
-libfaac authors:
50
- M. Bakker
51
- Tony Lenox
52
- RageOMatic
53
- thebard
54
- Ivan Dimkovic
55
- Krzysztof Nikiel
56
-
57
-libfaad2 authors:
58
- M. Bakker
59
- Alexander Kurpiers
60
- Volker Fischer
61
- Gian-Carlo Pascutto
62
-
63
-libmp3lame authors:
64
- Mike Cheng
65
- Robert Hegemann
66
- Frank Klemm
67
- Alexander Leidinger
68
- Naoki Shibata
69
- Mark Taylor
70
- Takehiro Tominiga
71
- Iván Cavero Belaunde
72
- Gabriel Bouvigne
73
- Florian Bomers
74
- CISC
75
- John Dahlstrom
76
- John Dee
77
- Albert Faber
78
- Peter Gubanov
79
- Lars Magne Ingebrigtsen
80
- Yosi Markovich
81
- Zdenek Kabelac
82
- Iwasa Kazmi
83
- Guillaume Lessard
84
- Steve Lhomme
85
- Don Melton
86
- Viral Shah
87
- Acy Stapp
88
- Roel VdB
89
-
90
-libmp4v2 authors:
91
- Dave Mackie
92
- Alix Marchandise-Franquet
93
- Bill May
94
- Massimo Villari
95
- Waqar Mohsin
96
- Richard Chen
97
- Rob Arnold
98
- Howdy Pierce
99
- Steven Schultz
100
- sergent@io.com
101
- Sean Gilligan
102
- Michael Rossberg
103
- Luis F. Ramirez
104
- Petter Reinholdtsen
105
-
106
-libmpeg2 authors:
107
- Aaron Holtzman
108
- Michel Lespinasse
109
- Bruno Barreyra
110
- Gildas Bazin
111
- Alexander W. Chin
112
- Stephen Crowley
113
- Didier Gautheron
114
- Ryan C. Gordon
115
- Peter Gubanov
116
- Håkan Hjort
117
- Nicolas Joly
118
- Gerd Knorr
119
- David I. Lehn
120
- Olie Lho
121
- Rick Niles
122
- Real Ouellet
123
- Bajusz Peter
124
- Franck Sicard
125
- Brion Vibber
126
- Martin Vogt
127
- Fredrik Vraalsen
128
-
129
-libogg authors:
130
- Christopher Montgomery
131
-
132
-libmkv authors:
133
- John A. Stebbins
134
- Nathan Caldwell
135
- Mike Matsnev
136
- Nathan Caldwell
137
- Christophe Devine
138
-
139
-libsamplerate authors:
140
- Erik de Castro Lopo
141
-
142
-libvorbis authors:
143
- Christopher Montgomery
144
-
145
-libx264 authors:
146
- Laurent Aimar
147
-
148
-libtheora authors:
149
- Monty
150
- Ralph Giles
151
- Timothy B. Terriberry
152
- Dan B. Miller
153
- Rudolf Marek
154
- Wim Tayman
155
- Dan Lenski
156
- Nils Pipenbrinck
157
- Aaron Colwell
158
- Thomas Vander Stichele
159
- Jan Gerber
160
- Conrad Parker
161
- Cristian Adam
162
- Sebastian Pippin
163
- Simon Hosie
164
- Mauricio Piacentini
165
- Silvia Pfeiffer
166
- Michael Smith
167
- Andre Pang
168
- calc
169
- Chris Cheney
170
- Brendan Cully
171
- Edward Hervey
172
- Adam Moss
173
- Colin Ward
174
- Jeremy C. Reed
175
- Arc Riley
176
- Rodolphe Ortalo
177
+Thanks to the authors of the following libraries which help power HandBrake:
178
+See the local project AUTHORS files for details of the individuals involved.
179
+
180
+liba52
181
+libbzip2
182
+libfaac
183
+libfaad2
184
+libavcodec
185
+libfontconfig
186
+libfreetype
187
+liblame
188
+libass
189
+libbluray
190
+libdca
191
+libdvdnav
192
+libdvdread
193
+libiconv
194
+libmkv
195
+libogg
196
+libsamplerate
197
+libtheora
198
+libvorbis
199
+libxml2
200
+libmp4v2
201
+libmpeg2dec
202
+libpthreadsw32
203
+libx264
204
+libzlib
205
\ No newline at end of file
206
HandBrake-0.9.6.tar.bz2/win/CS/doc/NEWS -> HandBrake-0.9.8.tar.bz2/win/CS/doc/NEWS
Changed
236
1
2
NEWS file for HandBrake <http://handbrake.fr/>
3
4
+Changes betwen 0.9.5 and 0.9.6:
5
+
6
+Encoders:
7
+---------
8
+
9
+-> Video:
10
+
11
+ - updated libx264 (revision 2146)
12
+ - MPEG-2 encoder (from libavcodec)
13
+ - advanced options support for libavcodec encoders
14
+ format: option1=value1:option2=value2
15
+ -bf 2 -trellis 2 becomes bf=2:trellis=2
16
+
17
+-> Audio:
18
+
19
+ - audio gain control (increase/decrease audio volume)
20
+
21
+ - updated libogg (1.3.0) and libvorbis (aoTuV b6.03)
22
+ - new AAC encoder (from libavcodec) (considered experimental)
23
+ (supported mixdowns: Mono/Stereo/Dolby, 5.1 will come later)
24
+ (should be on par with faac in terms of quality, sometimes better)
25
+ - FLAC encoder (16-bit, MKV container only)
26
+
27
+ - Mac OS X: HE-AAC encoding support, via Core Audio
28
+
29
+ - quality-based variable bitrate encoding support
30
+ works with: Lame MP3, Vorbis, Core Audio AAC
31
+ only implemented in CLI and Linux GUI
32
+
33
+ - AC3 encoder: set Dolby Surround flag in stream parameters when mixdown is Dolby Surround or Pro Logic II
34
+
35
+
36
+-> Audio Passthru:
37
+
38
+ - DTS Passthru to MP4 container (in addition to MKV) (supported by e.g. VLC, MPlayer)
39
+ - DTS-HD Passthru (MP4, MKV containers)
40
+ - MP3 Passthru (MP4, MKV containers)
41
+ - AAC Passthru (MP4, MKV containers)
42
+ (known issue: Magic Cookie not passed through from MPEG Program/Transport streams,
43
+ which will break playback in e.g. QuickTime Player)
44
+ - Auto Passthru: one encoder, multiple codecs
45
+ lets you define allowed codecs (from supported passthru codecs)
46
+ lets you pick a fallback encoder if passthru is not possible
47
+
48
+Muxers:
49
+-------
50
+
51
+ - start MKV clusters with a video keyframe whenever possible
52
+ should improve seeking and DLNA streaming
53
+
54
+ - bug fix: use ISO 639-2 bibliographic form for MKV language codes
55
+ - bug fix: fix crash due to division by zero in MP4 muxer
56
+ - bug fix: fix muxing of Closed Captions. Improper interleaving broke playback on some players
57
+
58
+Decoders:
59
+---------
60
+
61
+-> Video:
62
+
63
+ - updated libav* libraries from Libav (http://libav.org/) (v0.7-1696-gcae4f4b, late October 2011)
64
+ frame-based multithreading for H.264, VP8
65
+ 10-bit decoding support for H.264, DNxHD
66
+ Apple ProRes decoding support
67
+ - improved average framerate detection
68
+ - duplicate frame detection for improved frame drop decision (CFR/PFR)
69
+ - new Same as source, Constant Framerate option
70
+ for devices that don't support variable framerate
71
+ automatically picks a constant framerate closest to the detected average framerate
72
+
73
+ - bug fix: fix problem when resolution changes in the middle of a video stream
74
+
75
+-> Audio:
76
+
77
+ - Blu-ray: make TrueHD, DTS-HD and E-AC3 Secondary Audio streams available for decoding and/or passthrough
78
+
79
+ - bug fix: libavcodec-decoded streams can now be decoded multiple times
80
+ previously, multiple decodes of the same source tracks weren't possible
81
+ and audio output tracks had to be dropped
82
+ - bug fix: fix audio screech at beginning of some audio tracks when decoding AC3
83
+ - bug fix: fix DTS decoder audio volume (was too low)
84
+ - bug fix: garbled audio when decoding DTS-HD audio from MKV containers
85
+ - bug fix: fix support for DTS-HD High Resolution Audio in MPEG Transport streams
86
+
87
+-> Subtitles:
88
+
89
+ - updated libass (0.10.0)
90
+ - improved handling of subtitles with overlapping timestamps
91
+ - improved handling of DVD subtitles without Stop Display commands
92
+ - SSA subtitles are now passed through to MKV without conversion to SRT/UTF-8
93
+
94
+ - bug fix: fix rendering problem with SSA subtitles when no font is embedded in the source video
95
+
96
+Demuxers:
97
+---------
98
+
99
+ - improved MPEG Program/Transport stream support
100
+ support for MPEG-1 Program streams
101
+ support for HD-DVD EVOB streams
102
+ improved handling of Transport streams that have no PCR
103
+ - WTV container support (via libavformat)
104
+
105
+ - bug fix: files with more than 20 tracks (video, audio, subtitles etc.) are now supported
106
+ - bug fix: some QuickTime MOV files were misdirected as MPEG Transport streams
107
+ - bug fix: fix detection of TrueType font attachments that don't have the correct MIME type
108
+
109
+Filters:
110
+--------
111
+
112
+ - new, much improved decomb filter (but slower)
113
+ new settings are default
114
+ old settings become decomb "Fast"
115
+
116
+Presets:
117
+--------
118
+
119
+ - improved "Normal" preset (much faster, similar file size and quality)
120
+ - removed obsolete legacy presets
121
+ - added new device presets for Android phones/tablets
122
+ recent and/or powerful devices recommended
123
+
124
+Mac OS X:
125
+---------
126
+
127
+-> DVD decryption:
128
+
129
+ - VLC 2.x or later will not work for DVD decryption
130
+ and is therefore unsupported as of HandBrake 0.9.6
131
+ - libdvdcss is now the preferred method for DVD decryption
132
+ already works with HandBrake 0.9.5
133
+ a .pkg installer is available from Videolan:
134
+ http://download.videolan.org/libdvdcss/last/macosx/
135
+
136
+-> Build system:
137
+
138
+ - support for Xcode 4 and Mac OS X 10.7 "Lion"
139
+ - Mac OS X 10.5 "Leopard" no longer supported
140
+
141
+Mac OS X GUI:
142
+-------------
143
+
144
+-> OS X 10.7 Lion support:
145
+
146
+ - bug fix: Live Preview window widgets updated to work under Lion
147
+ - bug fix: fixed positioning of widgets in the Audio panel under Lion
148
+
149
+-> Other:
150
+
151
+ - wider main window providing more room for various widgets
152
+
153
+Windows GUI:
154
+------------
155
+
156
+-> Preview window:
157
+
158
+ - complete redesign
159
+ - support for VLC or the system default video player
160
+ - dropped built-in QuickTime playback support
161
+
162
+-> Other:
163
+
164
+ - much improved control over the default audio and subtitle tracks selected (see Options)
165
+ - ability to set the minimal title length that will show up during a scan (see Options)
166
+ - several other usability improvements
167
+ - installer now has a silent option for easier network installs (launch the installer with /S)
168
+
169
+Linux GUI:
170
+----------
171
+
172
+-> Audio panel:
173
+
174
+ - new advanced audio options section for gain and audio track names
175
+ - dynamic range compression and samplerate moved to advanced audio options
176
+
177
+-> Other:
178
+
179
+ - minor UI tweaks and usability enhancements
180
+
181
+Miscellaneous:
182
+--------------
183
+
184
+ - Target Size is gone, and isn't coming back
185
+ Don't bother complaining on the forums
186
+
187
+ - CLI: support for x264 presets, tunes and profiles
188
+ new --x264-preset, --x264-tune and --x264-profile options
189
+
190
+ - DVD: fix issues with some discs (e.g. True Grit, Thor, Transformers 3)
191
+ - DVD: improved main feature detection
192
+
193
+ - updated libbluray (0.0.1-pre-213-ga869da8, late May 2011)
194
+
195
+
196
+Changes between 0.9.4 and 0.9.5:
197
+
198
+* Core Library
199
+ - BluRay disc structure support. (No decryption support)
200
+ - Updated Libraries (x264, ffmpeg)
201
+ - SSA Subtitle support. (Including burn-in)
202
+ - MP3 audio now supported in MP4 files (Note: Limited Player compatibility)
203
+ - VOBSUB subtitle now supported in MP4 files (Note: Limited Player compatibility)
204
+ - Updated Presets for newer devices and better quality
205
+ - AC3 encoding support.
206
+ - Many Bug fixes and other small improvements
207
+ - Improved DVD Main Feature detection (when using dvdnav)
208
+ - Universal audio downmix support (all audio types can be downmixed)
209
+
210
+*All GUIs
211
+ - Updated x264 Advanced Panel
212
+ - Video Quality Slider drops % value and only shows RF for x264
213
+ - Batch Scan (Scan Multiple files at once. N.B: Does not include multiple VIDEO_TS folders / Image files)
214
+ - Peak framerate option (Capped VFR)
215
+ - Many Bug fixes
216
+ - Many Tweaks to improve usability.
217
+ - Ability to edit queue jobs
218
+ - Point-to-Point encoding (second or frame start and end times)
219
+
220
+* Mac GUI
221
+ - New Audio Panel supporting >4 Audio Tracks
222
+ - VLC detection in /Applications and ~/Applications
223
+
224
+* Windows GUI
225
+ - Encode Status in GUI. (CLI window is now always hidden)
226
+ - Improved Auto-Naming for Destination file name.
227
+ - Drag / Drop Video onto Main Window to scan.
228
+
229
+* Linux GUI
230
+ - Multiple instance support (run multiple copies of ghb at once)
231
+ - Many Bug fixes and UI improvements.
232
+
233
Changes between 0.9.3 and 0.9.4:
234
235
Core:
236
HandBrake-0.9.6.tar.bz2/win/CS/doc/THANKS -> HandBrake-0.9.8.tar.bz2/win/CS/doc/THANKS
Changed
90
1
2
THANKS file for HandBrake <http://handbrake.fr/>
3
4
-Several people noticeably contributed to MediaFork and HandBrake development
5
-without writing code (submitting/checking translations, DVD samples, etc).
6
-Let's thank them here!
7
+Hosting:
8
9
-Chris (audley)
10
- + Inspiration and example of patching mpeg4ip for iPod atom support
11
+Github (http://github.com)
12
+SourceForge(http://sourceforge.net/projects/handbrake)
13
+Eric Petit (Running the servers behind HandBrake.fr)
14
+Freenode IRC (http://freenode.net/)
15
16
-Omar Ahmad Bhatti
17
- + Intensive beta testing, suggestions. Convinced me to port HandBrake
18
- to OS X, which finally was a pretty good idea.
19
+Software:
20
21
-Hanna Bauer
22
-Adrien Marquette
23
-Norbert Rittel
24
- + German translation
25
+ReviewBoard (http://www.reviewboard.org/)
26
+PhpBB (http://www.phpbb.com/)
27
+hlscript (http://badmofo.org/hlscript/)
28
29
-Paul Bénéchet
30
-Luidgi Esposito
31
-Andrea Gianarro
32
-Emilio Gelosi
33
- + Italian translation
34
+Forum Moderators:
35
36
-Adam
37
- + Polish translation
38
-
39
-Nik Roby
40
- + Russian translation
41
-
42
-Leendert
43
- + Dutch translation
44
-
45
-Eric Kornblum
46
- + Sent me a sample DVD with LPCM tracks
47
-
48
-migol Superkid
49
- + Spanish translation
50
-
51
-pgjw
52
- + Portuguese translation
53
-
54
-cygma
55
- + Japanese translation
56
-
57
-Michelle De Sio
58
- + Sent me a sample DVD with MPEG audio tracks
59
-
60
-Ian Rickard
61
- + Enhanced icon
62
-
63
-Sébastien Noël
64
- + Debian packages (http://www.twolife.org/debian/repository.php)
65
-
66
-People who sent me an iTunes gift certificate: a BIG thanks!
67
-
68
-Paul (baggss)
69
- + Forum Moderator
70
-
71
-Du'Wayne Caviness (Cavalicious)
72
- + Forum Moderator
73
-
74
+Paul (baggss),
75
+Du'Wayne Caviness (Cavalicious)
76
Edward Jackson. (TedJ)
77
- + Forum Moderator
78
-
79
Chuck (cvk_b)
80
- + Testing Team Member
81
-
82
Nate Thompson (nightstrm)
83
- + Forum Moderator
84
\ No newline at end of file
85
+
86
+Other:
87
+
88
+Thanks to all of you who have contributed time, patches, testing, uploaded test files etc.
89
+There are too many to name here, but we do appreciate the effort.
90
HandBrake-0.9.6.tar.bz2/win/CS/doc/TRANSLATIONS -> HandBrake-0.9.8.tar.bz2/win/CS/doc/TRANSLATIONS
Changed
26
1
2
-$Id: TRANSLATIONS,v 1.2 2004/03/22 18:20:30 titer Exp $
3
-
4
TRANSLATIONS file for HandBrake <http://handbrake.fr/>
5
6
Translating HandBrake
7
=====================
8
9
-***** HandBrake does not currently have a localization scheme for any of its interfaces.
10
-***** Information below is obsolete and only useful for historical purposes:
11
-
12
-Only the OS X interface of HandBrake can be translated at the moment.
13
-Localization is not implemented in BeOS and GTK GUIs.
14
-
15
-HandBrake uses the NSLocalizedString() OS X function to translate every
16
-item in the interface. Therefore, you don't need (and mustn't) modify
17
-the nib files. All you have to do is to write a Localizable.strings for
18
-your language. You can get it (for the latest release) at
19
-<http://handbrake.m0k.org/Localizable.strings>.
20
-
21
-Edit it with Xcode, save it to HandBrake/macosx/i18n/xx.strings (where
22
-'xx' are the two letters representing your language), then add 'xx' to
23
-the language list in the Jamrules file.
24
+HandBrake does not currently have a localization scheme for any of its interfaces.
25
26
HandBrake-0.9.6.tar.bz2/win/CS/frmMain.Designer.cs -> HandBrake-0.9.8.tar.bz2/win/CS/frmMain.Designer.cs
Changed
277
1
2
this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();
3
this.ChaptersMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
4
this.mnu_resetChapters = new System.Windows.Forms.ToolStripMenuItem();
5
- this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
6
this.drop_format = new System.Windows.Forms.ComboBox();
7
this.drop_chapterFinish = new System.Windows.Forms.ComboBox();
8
this.drop_chapterStart = new System.Windows.Forms.ComboBox();
9
10
this.radio_cq = new System.Windows.Forms.RadioButton();
11
this.radio_avgBitrate = new System.Windows.Forms.RadioButton();
12
this.check_2PassEncode = new System.Windows.Forms.CheckBox();
13
+ this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
14
this.treeView_presets = new System.Windows.Forms.TreeView();
15
this.presets_menu = new System.Windows.Forms.ContextMenuStrip(this.components);
16
this.pmnu_expandAll = new System.Windows.Forms.ToolStripMenuItem();
17
18
this.Label47 = new System.Windows.Forms.Label();
19
this.Label3 = new System.Windows.Forms.Label();
20
this.tab_audio = new System.Windows.Forms.TabPage();
21
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
22
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
23
this.tab_video = new System.Windows.Forms.TabPage();
24
this.panel1 = new System.Windows.Forms.Panel();
25
26
this.lbl_SliderValue = new System.Windows.Forms.Label();
27
this.lbl_framerate = new System.Windows.Forms.Label();
28
this.tab_picture = new System.Windows.Forms.TabPage();
29
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
30
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
31
this.tabs_panel = new System.Windows.Forms.TabControl();
32
this.tab_filters = new System.Windows.Forms.TabPage();
33
+ this.Filters = new Handbrake.Controls.Filters();
34
this.tab_subtitles = new System.Windows.Forms.TabPage();
35
+ this.Subtitles = new Handbrake.Controls.Subtitles();
36
this.tab_chapters = new System.Windows.Forms.TabPage();
37
this.label31 = new System.Windows.Forms.Label();
38
this.tab_advanced = new System.Windows.Forms.TabPage();
39
+ this.advancedEncoderOpts = new Handbrake.Controls.AdvancedEncoderOpts();
40
+ this.x264Panel = new Handbrake.Controls.x264Panel();
41
this.tab_query = new System.Windows.Forms.TabPage();
42
this.btn_clear = new System.Windows.Forms.Button();
43
this.label34 = new System.Windows.Forms.Label();
44
45
this.SourceLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
46
this.openPreset = new System.Windows.Forms.OpenFileDialog();
47
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
48
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
49
- this.Filters = new Handbrake.Controls.Filters();
50
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
51
- this.Subtitles = new Handbrake.Controls.Subtitles();
52
- this.advancedEncoderOpts = new Handbrake.Controls.AdvancedEncoderOpts();
53
- this.x264Panel = new Handbrake.Controls.x264Panel();
54
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
55
notifyIconMenu.SuspendLayout();
56
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
57
58
"23.976",
59
"24",
60
"25",
61
- "29.97"});
62
+ "29.97",
63
+ "30",
64
+ "50",
65
+ "59.94",
66
+ "60"});
67
this.drp_videoFramerate.Location = new System.Drawing.Point(125, 62);
68
this.drp_videoFramerate.Name = "drp_videoFramerate";
69
this.drp_videoFramerate.Size = new System.Drawing.Size(125, 21);
70
71
this.mnu_resetChapters.Text = "Reset Chapter Names";
72
this.mnu_resetChapters.Click += new System.EventHandler(this.mnu_resetChapters_Click);
73
//
74
- // btn_file_source
75
- //
76
- this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;
77
- this.btn_file_source.Name = "btn_file_source";
78
- this.btn_file_source.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
79
- this.btn_file_source.Size = new System.Drawing.Size(182, 22);
80
- this.btn_file_source.Text = "Video File";
81
- this.btn_file_source.Click += new System.EventHandler(this.BtnFileScanClicked);
82
- //
83
// drop_format
84
//
85
this.drop_format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
86
87
this.check_2PassEncode.UseVisualStyleBackColor = false;
88
this.check_2PassEncode.CheckedChanged += new System.EventHandler(this.check_2PassEncode_CheckedChanged);
89
//
90
+ // btn_file_source
91
+ //
92
+ this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;
93
+ this.btn_file_source.Name = "btn_file_source";
94
+ this.btn_file_source.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
95
+ this.btn_file_source.Size = new System.Drawing.Size(182, 22);
96
+ this.btn_file_source.Text = "Video File";
97
+ this.btn_file_source.Click += new System.EventHandler(this.BtnFileScanClicked);
98
+ //
99
// treeView_presets
100
//
101
this.treeView_presets.ContextMenuStrip = this.presets_menu;
102
103
this.tab_audio.Text = "Audio";
104
this.tab_audio.UseVisualStyleBackColor = true;
105
//
106
+ // AudioSettings
107
+ //
108
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
109
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
110
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
111
+ this.AudioSettings.Name = "AudioSettings";
112
+ allowedPassthru1.AudioAllowAACPass = true;
113
+ allowedPassthru1.AudioAllowAC3Pass = true;
114
+ allowedPassthru1.AudioAllowDTSHDPass = true;
115
+ allowedPassthru1.AudioAllowDTSPass = true;
116
+ allowedPassthru1.AudioAllowMP3Pass = true;
117
+ allowedPassthru1.AudioEncoderFallback = HandBrake.Interop.Model.Encoding.AudioEncoder.Ac3;
118
+ this.AudioSettings.PassthruSettings = allowedPassthru1;
119
+ this.AudioSettings.Size = new System.Drawing.Size(720, 310);
120
+ this.AudioSettings.TabIndex = 0;
121
+ //
122
// AudioMenuRowHeightHack
123
//
124
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
125
126
this.tab_picture.Text = "Picture";
127
this.tab_picture.UseVisualStyleBackColor = true;
128
//
129
+ // PictureSettings
130
+ //
131
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
132
+ this.PictureSettings.CurrentlySelectedPreset = null;
133
+ this.PictureSettings.Enabled = false;
134
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
135
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
136
+ this.PictureSettings.Name = "PictureSettings";
137
+ this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
138
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
139
+ this.PictureSettings.SizeSet = false;
140
+ this.PictureSettings.TabIndex = 0;
141
+ //
142
// Check_ChapterMarkers
143
//
144
this.Check_ChapterMarkers.AutoSize = true;
145
146
this.tab_filters.Text = "Video Filters";
147
this.tab_filters.UseVisualStyleBackColor = true;
148
//
149
+ // Filters
150
+ //
151
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
152
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
153
+ this.Filters.Location = new System.Drawing.Point(0, 0);
154
+ this.Filters.Name = "Filters";
155
+ this.Filters.Size = new System.Drawing.Size(713, 310);
156
+ this.Filters.TabIndex = 0;
157
+ //
158
// tab_subtitles
159
//
160
this.tab_subtitles.Controls.Add(this.Subtitles);
161
162
this.tab_subtitles.Text = "Subtitles";
163
this.tab_subtitles.UseVisualStyleBackColor = true;
164
//
165
+ // Subtitles
166
+ //
167
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
168
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
169
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
170
+ this.Subtitles.Name = "Subtitles";
171
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
172
+ this.Subtitles.TabIndex = 0;
173
+ //
174
// tab_chapters
175
//
176
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
177
178
this.tab_advanced.Text = "Advanced";
179
this.tab_advanced.UseVisualStyleBackColor = true;
180
//
181
+ // advancedEncoderOpts
182
+ //
183
+ this.advancedEncoderOpts.AdavancedQuery = "";
184
+ this.advancedEncoderOpts.BackColor = System.Drawing.Color.Transparent;
185
+ this.advancedEncoderOpts.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
186
+ this.advancedEncoderOpts.Location = new System.Drawing.Point(0, 0);
187
+ this.advancedEncoderOpts.Name = "advancedEncoderOpts";
188
+ this.advancedEncoderOpts.Size = new System.Drawing.Size(720, 209);
189
+ this.advancedEncoderOpts.TabIndex = 1;
190
+ //
191
+ // x264Panel
192
+ //
193
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
194
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
195
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
196
+ this.x264Panel.Name = "x264Panel";
197
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
198
+ this.x264Panel.TabIndex = 0;
199
+ this.x264Panel.X264Query = "";
200
+ //
201
// tab_query
202
//
203
this.tab_query.Controls.Add(this.btn_clear);
204
205
//
206
this.File_ChapterImport.Filter = "CSV Files|*.csv";
207
//
208
- // PictureSettings
209
- //
210
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
211
- this.PictureSettings.CurrentlySelectedPreset = null;
212
- this.PictureSettings.Enabled = false;
213
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
214
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
215
- this.PictureSettings.Name = "PictureSettings";
216
- this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
217
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);
218
- this.PictureSettings.TabIndex = 0;
219
- //
220
- // Filters
221
- //
222
- this.Filters.BackColor = System.Drawing.Color.Transparent;
223
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
224
- this.Filters.Location = new System.Drawing.Point(0, 0);
225
- this.Filters.Name = "Filters";
226
- this.Filters.Size = new System.Drawing.Size(713, 310);
227
- this.Filters.TabIndex = 0;
228
- //
229
- // AudioSettings
230
- //
231
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
232
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
233
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
234
- this.AudioSettings.Name = "AudioSettings";
235
- allowedPassthru1.AudioAllowAACPass = true;
236
- allowedPassthru1.AudioAllowAC3Pass = true;
237
- allowedPassthru1.AudioAllowDTSHDPass = true;
238
- allowedPassthru1.AudioAllowDTSPass = true;
239
- allowedPassthru1.AudioAllowMP3Pass = true;
240
- allowedPassthru1.AudioEncoderFallback = HandBrake.Interop.Model.Encoding.AudioEncoder.Ac3;
241
- this.AudioSettings.PassthruSettings = allowedPassthru1;
242
- this.AudioSettings.Size = new System.Drawing.Size(720, 310);
243
- this.AudioSettings.TabIndex = 0;
244
- //
245
- // Subtitles
246
- //
247
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
248
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
249
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
250
- this.Subtitles.Name = "Subtitles";
251
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
252
- this.Subtitles.TabIndex = 0;
253
- //
254
- // advancedEncoderOpts
255
- //
256
- this.advancedEncoderOpts.AdavancedQuery = "";
257
- this.advancedEncoderOpts.BackColor = System.Drawing.Color.Transparent;
258
- this.advancedEncoderOpts.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
259
- this.advancedEncoderOpts.Location = new System.Drawing.Point(0, 0);
260
- this.advancedEncoderOpts.Name = "advancedEncoderOpts";
261
- this.advancedEncoderOpts.Size = new System.Drawing.Size(720, 209);
262
- this.advancedEncoderOpts.TabIndex = 1;
263
- //
264
- // x264Panel
265
- //
266
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
267
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
268
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
269
- this.x264Panel.Name = "x264Panel";
270
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
271
- this.x264Panel.TabIndex = 0;
272
- this.x264Panel.X264Query = "";
273
- //
274
// frmMain
275
//
276
this.AllowDrop = true;
277
HandBrake-0.9.6.tar.bz2/win/CS/frmMain.cs -> HandBrake-0.9.8.tar.bz2/win/CS/frmMain.cs
Changed
66
1
2
3
if (selectedTitle != null && !string.IsNullOrEmpty(selectedTitle.SourceName))
4
{
5
- return Path.GetFileName(selectedTitle.SourceName);
6
+ return Path.GetFileNameWithoutExtension(selectedTitle.SourceName);
7
}
8
9
// We have a drive, selected as a folder.
10
11
if (info.NewVersionAvailable)
12
{
13
UpdateInfo updateWindow = new UpdateInfo(info, userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion),
14
- userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeBuild));
15
+ userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild));
16
updateWindow.ShowDialog();
17
}
18
}
19
20
Form preset = new frmAddPreset(this, presetHandler);
21
if (preset.ShowDialog() == DialogResult.OK)
22
{
23
- TreeNode presetTreeview = new TreeNode(presetHandler.LastPresetAdded.Name) { ForeColor = Color.Black };
24
+ TreeNode presetTreeview = new TreeNode(presetHandler.LastPresetAdded.Name) { ForeColor = Color.Black, Tag = presetHandler.LastPresetAdded };
25
treeView_presets.Nodes.Add(presetTreeview);
26
presetHandler.LastPresetAdded = null;
27
}
28
29
{
30
foreach (TreeNode treenode in treeView_presets.Nodes)
31
{
32
+ if (treenode.Tag != null && ((Preset)treenode.Tag).Name == presetName)
33
+ {
34
+ treeView_presets.SelectedNode = treenode;
35
+ return;
36
+ }
37
+
38
foreach (TreeNode node in treenode.Nodes)
39
{
40
if (node.Text.Equals(presetName))
41
+ {
42
treeView_presets.SelectedNode = node;
43
+ return;
44
+ }
45
}
46
}
47
}
48
49
50
if (info.NewVersionAvailable)
51
{
52
- UpdateInfo updateWindow = new UpdateInfo(info, userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion), userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeBuild));
53
+ UpdateInfo updateWindow = new UpdateInfo(info, userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion), userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild));
54
updateWindow.ShowDialog();
55
}
56
else
57
58
59
#endregion
60
61
+
62
// This is the END of the road ****************************************
63
}
64
}
65
\ No newline at end of file
66
HandBrake-0.9.8.tar.bz2/win/CS/libraries/WPFDragDrop
Added
2
1
+(directory)
2
HandBrake-0.9.8.tar.bz2/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.XML
Added
272
1
2
+<?xml version="1.0"?>
3
+<doc>
4
+ <assembly>
5
+ <name>GongSolutions.Wpf.DragDrop</name>
6
+ </assembly>
7
+ <members>
8
+ <member name="T:GongSolutions.Wpf.DragDrop.IDropTarget">
9
+ <summary>
10
+ Interface implemented by Drop Handlers.
11
+ </summary>
12
+ </member>
13
+ <member name="M:GongSolutions.Wpf.DragDrop.IDropTarget.DragOver(GongSolutions.Wpf.DragDrop.DropInfo)">
14
+ <summary>
15
+ Updates the current drag state.
16
+ </summary>
17
+
18
+ <param name="dropInfo">
19
+ Information about the drag.
20
+ </param>
21
+
22
+ <remarks>
23
+ To allow a drop at the current drag position, the <see cref="P:GongSolutions.Wpf.DragDrop.DropInfo.Effects"/> property on
24
+ <paramref name="dropInfo"/> should be set to a value other than <see cref="F:System.Windows.DragDropEffects.None"/>
25
+ and <see cref="P:GongSolutions.Wpf.DragDrop.DropInfo.Data"/> should be set to a non-null value.
26
+ </remarks>
27
+ </member>
28
+ <member name="M:GongSolutions.Wpf.DragDrop.IDropTarget.Drop(GongSolutions.Wpf.DragDrop.DropInfo)">
29
+ <summary>
30
+ Performs a drop.
31
+ </summary>
32
+
33
+ <param name="dropInfo">
34
+ Information about the drop.
35
+ </param>
36
+ </member>
37
+ <member name="T:GongSolutions.Wpf.DragDrop.DropInfo">
38
+ <summary>
39
+ Holds information about a the target of a drag drop operation.
40
+ </summary>
41
+
42
+ <remarks>
43
+ The <see cref="T:GongSolutions.Wpf.DragDrop.DropInfo"/> class holds all of the framework's information about the current
44
+ target of a drag. It is used by <see cref="M:GongSolutions.Wpf.DragDrop.IDropTarget.DragOver(GongSolutions.Wpf.DragDrop.DropInfo)"/> method to determine whether
45
+ the current drop target is valid, and by <see cref="M:GongSolutions.Wpf.DragDrop.IDropTarget.Drop(GongSolutions.Wpf.DragDrop.DropInfo)"/> to perform the drop.
46
+ </remarks>
47
+ </member>
48
+ <member name="M:GongSolutions.Wpf.DragDrop.DropInfo.#ctor(System.Object,System.Windows.DragEventArgs,GongSolutions.Wpf.DragDrop.DragInfo)">
49
+ <summary>
50
+ Initializes a new instance of the DropInfo class.
51
+ </summary>
52
+
53
+ <param name="sender">
54
+ The sender of the drag event.
55
+ </param>
56
+
57
+ <param name="e">
58
+ The drag event.
59
+ </param>
60
+
61
+ <param name="dragInfo">
62
+ Information about the source of the drag, if the drag came from within the framework.
63
+ </param>
64
+ </member>
65
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.Data">
66
+ <summary>
67
+ Gets the drag data.
68
+ </summary>
69
+
70
+ <remarks>
71
+ If the drag came from within the framework, this will hold:
72
+
73
+ - The dragged data if a single item was dragged.
74
+ - A typed IEnumerable if multiple items were dragged.
75
+ </remarks>
76
+ </member>
77
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.DragInfo">
78
+ <summary>
79
+ Gets a <see cref="P:GongSolutions.Wpf.DragDrop.DropInfo.DragInfo"/> object holding information about the source of the drag,
80
+ if the drag came from within the framework.
81
+ </summary>
82
+ </member>
83
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.DropTargetAdorner">
84
+ <summary>
85
+ Gets or sets the class of drop target to display.
86
+ </summary>
87
+
88
+ <remarks>
89
+ The standard drop target adorner classes are held in the <see cref="T:GongSolutions.Wpf.DragDrop.DropTargetAdorners"/>
90
+ class.
91
+ </remarks>
92
+ </member>
93
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.Effects">
94
+ <summary>
95
+ Gets or sets the allowed effects for the drop.
96
+ </summary>
97
+
98
+ <remarks>
99
+ This must be set to a value other than <see cref="F:System.Windows.DragDropEffects.None"/> by a drop handler in order
100
+ for a drop to be possible.
101
+ </remarks>
102
+ </member>
103
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.InsertIndex">
104
+ <summary>
105
+ Gets the current insert position within <see cref="P:GongSolutions.Wpf.DragDrop.DropInfo.TargetCollection"/>.
106
+ </summary>
107
+ </member>
108
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.TargetCollection">
109
+ <summary>
110
+ Gets the collection that the target ItemsControl is bound to.
111
+ </summary>
112
+
113
+ <remarks>
114
+ If the current drop target is unbound or not an ItemsControl, this will be null.
115
+ </remarks>
116
+ </member>
117
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.TargetItem">
118
+ <summary>
119
+ Gets the object that the current drop target is bound to.
120
+ </summary>
121
+
122
+ <remarks>
123
+ If the current drop target is unbound or not an ItemsControl, this will be null.
124
+ </remarks>
125
+ </member>
126
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.TargetGroup">
127
+ <summary>
128
+ Gets the current group target.
129
+ </summary>
130
+
131
+ <remarks>
132
+ If the drag is currently over an ItemsControl with groups, describes the group that
133
+ the drag is currently over.
134
+ </remarks>
135
+ </member>
136
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.VisualTarget">
137
+ <summary>
138
+ Gets the control that is the current drop target.
139
+ </summary>
140
+ </member>
141
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.VisualTargetItem">
142
+ <summary>
143
+ Gets the item in an ItemsControl that is the current drop target.
144
+ </summary>
145
+
146
+ <remarks>
147
+ If the current drop target is unbound or not an ItemsControl, this will be null.
148
+ </remarks>
149
+ </member>
150
+ <member name="P:GongSolutions.Wpf.DragDrop.DropInfo.VisualTargetOrientation">
151
+ <summary>
152
+ Gets th orientation of the current drop target.
153
+ </summary>
154
+ </member>
155
+ <member name="T:GongSolutions.Wpf.DragDrop.IDragSource">
156
+ <summary>
157
+ Interface implemented by Drag Handlers.
158
+ </summary>
159
+ </member>
160
+ <member name="M:GongSolutions.Wpf.DragDrop.IDragSource.StartDrag(GongSolutions.Wpf.DragDrop.DragInfo)">
161
+ <summary>
162
+ Queries whether a drag can be started.
163
+ </summary>
164
+
165
+ <param name="dragInfo">
166
+ Information about the drag.
167
+ </param>
168
+
169
+ <remarks>
170
+ To allow a drag to be started, the <see cref="P:GongSolutions.Wpf.DragDrop.DragInfo.Effects"/> property on <paramref name="dragInfo"/>
171
+ should be set to a value other than <see cref="!:DragDropEffects.None"/>.
172
+ </remarks>
173
+ </member>
174
+ <member name="T:GongSolutions.Wpf.DragDrop.DragInfo">
175
+ <summary>
176
+ Holds information about a the source of a drag drop operation.
177
+ </summary>
178
+
179
+ <remarks>
180
+ The <see cref="T:GongSolutions.Wpf.DragDrop.DragInfo"/> class holds all of the framework's information about the source
181
+ of a drag. It is used by <see cref="M:GongSolutions.Wpf.DragDrop.IDragSource.StartDrag(GongSolutions.Wpf.DragDrop.DragInfo)"/> to determine whether a drag
182
+ can start, and what the dragged data should be.
183
+ </remarks>
184
+ </member>
185
+ <member name="M:GongSolutions.Wpf.DragDrop.DragInfo.#ctor(System.Object,System.Windows.Input.MouseButtonEventArgs)">
186
+ <summary>
187
+ Initializes a new instance of the DragInfo class.
188
+ </summary>
189
+
190
+ <param name="sender">
191
+ The sender of the mouse event that initiated the drag.
192
+ </param>
193
+
194
+ <param name="e">
195
+ The mouse event that initiated the drag.
196
+ </param>
197
+ </member>
198
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.Data">
199
+ <summary>
200
+ Gets or sets the drag data.
201
+ </summary>
202
+
203
+ <remarks>
204
+ This must be set by a drag handler in order for a drag to start.
205
+ </remarks>
206
+ </member>
207
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.DragStartPosition">
208
+ <summary>
209
+ Gets the position of the click that initiated the drag, relative to <see cref="P:GongSolutions.Wpf.DragDrop.DragInfo.VisualSource"/>.
210
+ </summary>
211
+ </member>
212
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.Effects">
213
+ <summary>
214
+ Gets or sets the allowed effects for the drag.
215
+ </summary>
216
+
217
+ <remarks>
218
+ This must be set to a value other than <see cref="F:System.Windows.DragDropEffects.None"/> by a drag handler in order
219
+ for a drag to start.
220
+ </remarks>
221
+ </member>
222
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.MouseButton">
223
+ <summary>
224
+ Gets the mouse button that initiated the drag.
225
+ </summary>
226
+ </member>
227
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.SourceCollection">
228
+ <summary>
229
+ Gets the collection that the source ItemsControl is bound to.
230
+ </summary>
231
+
232
+ <remarks>
233
+ If the control that initated the drag is unbound or not an ItemsControl, this will be null.
234
+ </remarks>
235
+ </member>
236
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.SourceItem">
237
+ <summary>
238
+ Gets the object that a dragged item is bound to.
239
+ </summary>
240
+
241
+ <remarks>
242
+ If the control that initated the drag is unbound or not an ItemsControl, this will be null.
243
+ </remarks>
244
+ </member>
245
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.SourceItems">
246
+ <summary>
247
+ Gets a collection of objects that the selected items in an ItemsControl are bound to.
248
+ </summary>
249
+
250
+ <remarks>
251
+ If the control that initated the drag is unbound or not an ItemsControl, this will be empty.
252
+ </remarks>
253
+ </member>
254
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.VisualSource">
255
+ <summary>
256
+ Gets the control that initiated the drag.
257
+ </summary>
258
+ </member>
259
+ <member name="P:GongSolutions.Wpf.DragDrop.DragInfo.VisualSourceItem">
260
+ <summary>
261
+ Gets the item in an ItemsControl that started the drag.
262
+ </summary>
263
+
264
+ <remarks>
265
+ If the control that initiated the drag is an ItemsControl, this property will hold the item
266
+ container of the clicked item. For example, if <see cref="P:GongSolutions.Wpf.DragDrop.DragInfo.VisualSource"/> is a ListBox this
267
+ will hold a ListBoxItem.
268
+ </remarks>
269
+ </member>
270
+ </members>
271
+</doc>
272
HandBrake-0.9.8.tar.bz2/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.dll
Added
handbrake-rpmlintrc
Changed
9
1
2
addFilter("file-contains-buildroot .* /usr/bin/ghb")
3
addFilter("File is compiled without RPM_OPT_FLAGS")
4
addFilter("strict-aliasing-punning")
5
-addFilter("no-return-in-nonvoid-function")
6
-setBadness('no-return-in-nonvoid-function', 0)
7
+addFilter("no-return-in-nonvoid-function")
8
\ No newline at end of file
9
Refresh
No build results available
Refresh
No rpmlint results available
Login required, please
login
or
signup
in order to comment
Request History
marguerite created request over 11 years ago
update version 0.9.8. but I don't know how to fix the factory gtk error. help appreciated.
pbleser accepted request over 12 years ago
ok