README.md in handbrake-0.2.1 vs README.md in handbrake-0.3.0
- old
+ new
@@ -37,17 +37,17 @@
hb = HandBrake::CLI.new(:bin_path => '/Applications/HandBrakeCLI', :trace => false)
project = hb.input('/Volumes/Arcturan Megafreighter/DVDs/L')
- titles = project.scan
- titles[1].number # => 1
- titles[1].main_feature? # => true
- titles[1].duration # => "01:21:18"
- titles[1].seconds # => 4878
- titles[1].chapters.size # => 23
- titles[1].chapters[3].seconds # => 208
+ disc = project.scan
+ disc.titles[1].number # => 1
+ disc.titles[1].main_feature? # => true
+ disc.titles[1].duration # => "01:21:18"
+ disc.titles[1].seconds # => 4878
+ disc.titles[1].chapters.size # => 23
+ disc.titles[1].chapters[3].seconds # => 208
project.title(1).
preset('Normal').
output('/Users/rsutphin/Movies/project.m4v')
@@ -97,14 +97,13 @@
While most of the methods you call to build up a handbrake command can
come in any order, a few must come last and have particular return
values:
* `output`: triggers a transcode using all the options set up to this
- point.
-* `scan`: triggers a title scan and returns a `Hash`-like structure
- of {HandBrake::Title} objects describing the contents of the
- input. The hash is indexed by title number.
+ point. No return value.
+* `scan`: triggers a title scan and returns either a {HandBrake::Disc}
+ (for all titles) or a {HandBrake::Title} (for a single title).
* `update`: returns true or false depending on whether the version of
HandBrakeCLI in use is up to date.
* `preset_list`: returns a hash containing all the known presets and
their options. The structure is `presets[category][name] => args`.
@@ -120,12 +119,11 @@
project.preset('iPhone & iPod Touch').output('project-phone.m4v')
# TV
project.preset('High Profile').output('project-tv.m4v')
-To put it more technically, the chain object returned from each
-intermediate configuration step returns an independent copy of the
-configuration chain.
+To put it more technically, each intermediate configuration step
+returns an independent copy of the configuration chain.
### Output options
By default, the `output` execution method behaves just like invoking
HandBrakeCLI directly. `handbrake.rb` also supports a couple of