summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudio.m
Commit message (Collapse)AuthorAgeFilesLines
* MacGui: implemented the NSSecureCoding protocol in HBJob. Added a ↵ritsuka2015-04-221-5/+10
| | | | | | compatibility class to fall back on NSCoding on 10.7 and earlier. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7112 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: run the Xcode "convert to modern objective-c" on the entire project.ritsuka2015-04-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7075 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: convert the mac gui to Objective-C ARC.ritsuka2015-03-171-25/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6996 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: properly deregister the job observers, and refactor a bit the ↵ritsuka2015-02-041-3/+12
| | | | | | HBAudioTrack notification. Refactored HBPreviewController to take a single HBPreviewGenerator instance in input. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6869 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: add a HBAudioTrackDataSource protocol to simplify HBAudio interface.ritsuka2015-01-311-5/+10
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: fix some leaksritsuka2015-01-151-2/+25
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6753 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Move the audio/subtitles selection logic out of the view ↵ritsuka2015-01-131-0/+430
| | | | | | controllers. Now it's possible to create a HBJob and apply a preset to without the UI classes help. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6741 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: rename HBAudio class to HBAudioTrack.ritsuka2015-01-091-645/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6696 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: move more things out of HBController.ritsuka2014-12-281-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6664 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: change the queue to work with serialized HBJob objects, remove the ↵ritsuka2014-12-271-0/+25
| | | | | | NSDictionary job representation and the duplicate prepareJob method. Implement NSCopying protocol in HBJob. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6655 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: move the UI helper methods to new categories. Implement NSCoding in ↵ritsuka2014-12-231-0/+41
| | | | | | more classes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6643 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: fixed gain validation in the audio panel. Remove the drc validation ↵ritsuka2014-08-101-22/+7
| | | | | | because it’s not possible to insert the value manually. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6284 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Modernized the objc syntax of HBAudio/HBAudioController and avoided ↵ritsuka2014-08-051-171/+134
| | | | | | the use of KVO to observer changes inside the same class. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6268 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decavcodec: DRC support.Rodeo2014-01-251-3/+4
| | | | | | | Adds DRC support for E-AC-3 audio (as well as any future libavcodec decoders with DRC support). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5995 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGUI: fixed a number of leaks/null-deferences/dead-code found by clang ↵ritsuka2013-10-151-5/+5
| | | | | | static analyzer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5838 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb/common: improve fallback mechanism.Rodeo2013-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | API changes: - added hb_global_init(), must be called before any other libhb function - removed (somewhat pointless) hb_mixdown_t.internal_name - some hb_*_get_from_name() functions now return 0 instead of -1. Instead of hardcoded fallbacks, list items now have a specific fallback, and a generic ID for when the specific fallback is unavailable. Encoder availability is checked at runtime (hb_global_init calling hb_common_global_init) and the item's value/fallback is sanity-checked and updated if necessary. See https://reviews.handbrake.fr/r/506/ for more detailed information. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5547 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't expose rate, mixdown, dither and encoder arrays to the UIs.Rodeo2013-05-301-81/+53
| | | | | | | | | | | | | | | | | | | | - instead, make these lists available through enumerators: --> hb_*_get_next(<type> *last); - this should give us more flexibility to populate the lists at runtime, using the implementation(s) of our choice, whether they use arrays or not, without requiring UI modifications - use consistent naming for getters --> hb_get_best_foo() becomes hb_foo_get_best(), and so on - hb_*_get_from_name() and hb_*_ sanitize_name() sanitize the requested value to a supported one if it's unavailable - adds an additional, passthru-specific fallback mechanism - adds a list of video containers git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5526 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio improvements.Rodeo2012-09-031-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New supported samplerates: 8, 11.025, 12, 16 kHz. Now 8, 11.025, 12, 16, 22.05, 24, 42, 44.1, 48 Khz are supported. Unsupported samplerates are sanitized to the closest samplerate for all encoders. Samplerates < 32 kHz are now forbidden for AC3 encoding (sanitized to 32 kHz). Most AC3 decoders don't support such samplerates. New upmixing: 3.0 (Front Left, Right & Center) can now be upmixed to 5.1 to preserve the center channel. New mixdowns: 6.1 (Front Left, Right & Center, Surround Left, Right & Center, LFE) 7.1 (Front Left, Right & Center, Surround Left & Right, Rear Left & Right, LFE) -> available to Vorbis & FLAC encoders for compatible input channel layouts 7.1 (Front Left, Right & Center, Front Left & Right of Center, Surround Left & Right, LFE) -> available to AAC encoders (ca_aac, ca_haac, faac) for compatible input channel layouts Mono (Left Only): Stereo to Mono by discarding the Right channel Mono (Right Only): Stereo to Mono by discarding the Left channel -> available to all encoders for non-Dolby Stereo input The "6-channel discrete" mixdown becomes "5.1 Channels". New bitrates: 960 - 1536 Kbps. This lets users work around poor audio quality in crappy encoders by throwing more bits at them. Bitrate limits have been re-worked and re-tested for all encoders. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4930 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use HB_INVALID_AMIXDOWN and HB_AMIXDOWN_NONE where applicable.Rodeo2012-07-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove encca_haac_available(). It's no longer needed since we dropped ↵Rodeo2012-06-201-11/+9
| | | | | | support for OS X 10.5. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4759 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: drop HB_INPUT_CH_LAYOUT_*Rodeo2012-06-181-1/+1
| | | | | | | | AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: add Auto Passthru support.Rodeo2012-01-241-3/+2
| | | | | | | | | | By default, all available passthru codecs are allowed, and the fallback is the AC3 encoder. Advanced settings can be enabled in Preferences > Audio, but are disabled by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4419 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-36/+59
| | | | | | | | | Adds flac audio to cli, lingui, and macgui Adds quality and compression level options to cli Adds quality option to lingui Quality option works for vorbis and lame git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4281 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Auto Passthru and audio/video encoder lists.Rodeo2011-09-191-93/+40
| | | | | | | | | | | | | | This adds Auto Passthru as another encoder in libhb. Used in LinGUI and CLI. MacGUI features a partial impplmentation (with hardcoded values), which is disabled for now. Also, audio and video encoders are now stored in "lists", like we previously did for mixdowns. New mixdown "None" (HB_AMIXDOWN_NONE) added to hb_audio_mixdowns (was previously declared in MacGUI/LinGUI). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4237 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add more audio passthru optionsjstebbins2011-08-011-11/+25
| | | | | | | | | | | | | | | | | adds aac and mp3 passthru for mp4 and mkv containers adds dts and dtshd for mp4 container (mkv already had it) Note: The only player known (to me) to support dts(hd) in mp4 is ff/avplay In LinGui there is a new option to limit which passthru codecs will be used by the "Auto Passthru" audio codec options. The CLI already has this ability with "--audio_copy-mask" which is use in conjunction with the "copy" audio codec option. Also corrects some A/V sync issues when video frames are dropped due to a gap detected in the audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4149 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGUI: use "AC3 (ffmpeg)" to designate the ffac3 encoder (for consistency).dynaflash2011-07-191-1/+1
| | | | | | | | | - Patch by Rodeo - This patch switches the codec name from "AC3" to "AC3 (ffmpeg)" for consistency. - Backwards-compatibility with old presets is handled by mapping "AC3" to "AC3 (ffmpeg)" when loading a preset. - Referenced here https://reviews.handbrake.fr/r/155/ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4124 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGUI: Consolidate passthrough mixdowns.dynaflash2011-07-191-20/+7
| | | | | | | | | | - There's no need for one passthrough mixdown per passthrough codec. - When using passthru, mixdown is set to "None". - Patch by Rodeo ... Thanks! - Fix a bug where we would sometimes attempt to modify a non-mutable NSDictionary, causing a crash. - Fix by blindjimmy ... Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4121 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Don't call "return" at the end of a void function.. .. Redux!dynaflash2011-06-141-12/+0
| | | | | | | | - As Per https://reviews.handbrake.fr/r/122/ - Thanks blindjimmy for the patche(s). - Borked commit notes courtesy of me. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4058 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Add blank line to previous commit files to fix the commit notes I ↵dynaflash2011-06-141-0/+1
| | | | | | | | | totally borked. - Proper change is: Simplify conditionals to make them more readable. As per https://reviews.handbrake.fr/r/123/ - Reverts commit notes for https://trac.handbrake.fr/changeset/4056 besides the update to xcode 3.2.6 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4057 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Don't call "return" at the end of a void function.dynaflash2011-06-141-33/+33
| | | | | | | | - Generally speaking, the fewer (simple) lines of code their are, the easier it is for someone to learn/understand it, so there's no good reason to have no-op lines laying around. - As per https://reviews.handbrake.fr/r/122/ - Also re commit the update to xcode 3.2.6 commit from https://trac.handbrake.fr/changeset/4004 which I borked later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4056 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add DTS-HD passthru \o/jstebbins2011-06-141-2/+13
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4055 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: HBAudio Indentation Cleanupdynaflash2011-06-131-459/+531
| | | | | | | | | | | | - Patch by Rodeo ... Thanks! - Change hard tabs to 4 spaces - Place the opening bracket of if, else if, else, while and for statements on another line, not the same line as the condition. - Xcode's Edit > Format > Re-Indent on all files. - This patch is purely about cosmetics and indentation. There shouldn't be any change in behavior. - As per https://reviews.handbrake.fr/r/101/ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4054 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ffaac encode supportjstebbins2011-06-081-0/+7
| | | | | | | | Adds "AAC (ffmpeg)" option to lingui and macui, "ffaac" option to cli. Does not yet remove faac. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4031 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Clean up internal architecture of HB Audio and HBAudioControllerdynaflash2011-05-261-4/+1
| | | | | | | - patch by blindjimmy ... as always .... thank you! - as per https://reviews.handbrake.fr/r/81/ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4002 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Audio Gain Control initial implementationdynaflash2011-05-261-0/+35
| | | | | | | | | | | | | | - Adds a Circular Slider to implement gain from a range of -5 to +15 which is sane by any reasonable measure. - Note: the circular slider with this range puts the default of 0.0 at the three o'clock position on the slider which is kind of wonky. Any ideas to make it more intuitive are welcome. -The accompanying text field readout is left editable so values beyond the sliders range can be specified manually. - Gain is disabled for any passthru options obviously. - Though it has been in cli and lingui for some time, as a note my tests show that anything above +15 can get distorted quite easily. Of course that is open to opinion depending on source, I have yet to see a complaint about the volume of encoded audio being too high but we leave up to -5 there just for the corner cases. - Any existing presets not specifying gain will use a gain of 0.0 which means of course its unmodified. - Also as a sidenote takes care of blindjimmy's patch https://reviews.handbrake.fr/r/99/ as far as /macosx/HBQueueController.m git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4000 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HE-AAC support for the OSX port. Thanks go to amarcus, ritsuka and rodeo.sr552011-04-181-0/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3937 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Audio mixdown fixdynaflash2010-11-301-0/+1
| | | | | | | | - Patch by Rodeo. Thanks! - Update the list of permitted mixdowns when the source audio track changes. - Discussed here: http://forum.handbrake.fr/viewtopic.php?f=4&t=18840 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3689 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Use libhb for mixdown limits as well as defaults.dynaflash2010-11-171-115/+66
| | | | | | - Patch by Rodeo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3679 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: disable the drc audio widget unless the source is AC3.dynaflash2010-11-101-2/+6
| | | | | | - original patch by Rodeo ... KVO refactor by circleone. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3670 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Audiodynaflash2010-11-081-93/+74
| | | | | | - Switched the audio object to use KVO internally to make the code more legible, to allow switching the codec to eventually cause the mp4 output extension to be re-evalutated, and to make sure the bitrate and mixdown popups are empty when the track is disable (the None track). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3663 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Audio - Using fallback codec no longer sets the bit rate from the ↵dynaflash2010-10-291-4/+18
| | | | | | preset. Setting the sample rate no longer sets the bit rate to the default if the currently selected bit rate is still supported. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3627 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Use libhb for audio limits as well as defaults.dynaflash2010-10-081-55/+20
| | | | | | - Patch by circlone! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3585 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Remove the audio encoder bitrate cap.dynaflash2010-10-051-8/+1
| | | | | | | - This used to cap the bitrate available in the ui to the sources audio bitrate. - Note: this can allow people to do stupid things. A more elegant solution is forthcoming. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3571 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ac3 encodingjstebbins2010-10-041-16/+34
| | | | | | | Uses ffmpeg's ac3 encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3570 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Disable the drc dial if source is not AC3 as only our AC3 decoder ↵dynaflash2010-10-041-0/+20
| | | | | | | | flags drc. - Patch by circleone, thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3568 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Audio ... Allow more than 4 audio tracks.dynaflash2010-09-151-0/+640
- Patch courtesy of circleone ... Thanks! - Use a NSTableView to dynamically add/delete audio tracks ala the Subtitle tab. - Sets a 24 track limit until someone tests more than 24 tracks (the libhb 8 track limit was removed as per http://trac.handbrake.fr/changeset/3531). - Replaces the old static 4 tracks to a dynamic array. - Moves macgui audio handling to a separate class. Known caveats: - Borks queue editing which needs a revamp anyway. - Queue window display needs to be adjusted to show more than 4 tracks appropriately. Again, its cosmetic and is not a show stopper. - There may be other possible unknown side effects even though tested on all presets. That said, I feel it needs to get in so that we can get feedback from nightlies. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3532 b64f7644-9d1e-0410-96f1-a4d463321fa5