summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
Commit message (Collapse)AuthorAgeFilesLines
* LinGui: fix range update issues and plug memory leaksjstebbins2014-02-211-0/+4
| | | | | | | | Updating the range of GtkScale and GtkSpinButtons causes the current value to update inappropriately under some conditions. So update the range and value concurrently. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6051 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: rework title listjstebbins2014-02-191-12/+12
| | | | | | | | | | | | | | Title list is now linked to a settings list. There is one settings dict per title. The settings list is populated when scan completes. As you change titles, the settings for that title populate the UI. Changes made are saved in the settings and restored if you go to another title and then return. This is preparation for improvements to "Add All to Queue" feature. Settings for each title can be customized before adding to the queue. All titles don't have to use the same preset or settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6046 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Audio and subtitle UI rework.jstebbins2014-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds new tabs for audio and subtitle defaults (presets). "Audio" and "Subtitle" tabs renamed to "Audio List" and "Subtitle List" New Preset Keys: AudioLanguageList - array of strings List of languages that will be used to generate the output audio tracks for a job. Values: preset - UI display iso639_2 codes - native_name if not NULL, else eng_name SubtitleLanguageList - array of strings List of languages that will be used to generate the output subtitle tracks for a job. Values: preset - UI display iso639_2 codes - native_name if not NULL, else eng_name AudioTrackSelectionBehavior - string Defines how source tracks will be selected when generating the audio list for a job. Values: preset - UI display none - None first - First Matching Selected Languages all - All Matching Selected Languages SubtitleTrackSelectionBehavior - string Defines how source tracks will be selected when generating the subtitle list for a job. Values: preset - UI display none - None first - First Matching Selected Languages all - All Matching Selected Languages SubtitleAddCC - boolean Add Closed Caption track to subtitle list if available SubtitleAddForeignAudioSearch - boolean Add Foreign audio search pass to job if a default subtitle language is set (i.e. SubtitleLanguageList is not empty and first entry is not "Any") and default audio track language matches subtitle preferred language. SubtitleAddForeignAudioSubtitle - boolean Add preferred language subtitle track if the default subtitle language is set (i.e. SubtitleLanguageList is not empty and first entry is not "Any") and default audio track language does not match the preferred subtitle language. Removed Preset Keys: AudioTrack SubtitleList - I think only the LinGui had this key. Note that the remaining keys in the pre-existing AudioList are reused and map to the "Audio Encoder Settings" on the "Audio Defaults" tab. They used to map to the entries in the list on the old "Audio" tab. The old "Audio" tab is now the "Audio List" tab. Nothing in the "Audio List" tab map to preset values in the new design. The contents of this tab is strictly for use in the encode job. Ditto for "Subtitle Defaults" and "Subtitle List". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6040 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Update copyright datesjstebbins2012-12-301-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5117 b64f7644-9d1e-0410-96f1-a4d463321fa5
* lingui: convert tabs to spacesjstebbins2012-12-271-488/+488
| | | | | | | Makes lingui source conform to hb standard for indentation. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5112 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve management of titles and jobsjstebbins2012-11-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up several several unavoidable memory leaks caused by old api. Clearly separates titles from jobs. Titles are set during scan and never modified now. Since titles are immutable, this lead to API some changes. For example, We were setting chapter names in the title from the front ends. Now these get set in the job. These new APIs allow us to start moving away from our use of title->job. Eventually, I would like to eliminate title->job completely, but the mac ui is too tightly tied to using this field to allow removing it at this time. So there is temporarily a convenience function used only by the mac ui that allows it to continue using title->job and also use the new APIs. New APIs: typedef struct hb_title_set_s hb_title_set_t; struct hb_title_set_s { hb_list_t * list_title; int feature; // Detected DVD feature title }; hb_title_set_t * hb_get_title_set( hb_handle_t * ); This is just something I added to clean up how "feature title" info is passed. hb_job_t * hb_job_init( hb_title_t * title ); Initializes a new job with default settings from the title. hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index ); Same as hb_job_init(). For use by win Interop lib. void hb_job_reset( hb_job_t * job ); Convenience function for the MacUi. Clears audio, subtitle, and filter lists. The macui still uses title->job because it is so intricately tied to it. So I created this convenience function that it can call after adding a job. void hb_job_close( hb_job_t ** job ); Releases the job an all resources it contains. void hb_job_set_advanced_opts( hb_job_t *job, const char *advanced_opts ); Makes a copy of "advanced_opts" and stores in job. Freed by hb_job_close(). void hb_job_set_file( hb_job_t *job, const char *file ); Makes a copy of "file" and stores in job. Freed by hb_job_close(). void hb_chapter_set_title(hb_chapter_t *chapter, const char *title); Makes a copy of "title" and stores in chapter. Freed by hb_chapter_close(). Recommended usage (cli and lingui are updated to do this): job = hb_job_init( title ); // set job settings ... hb_add(h, job); hb_job_close( &job ); I have also added new APIs for managing metadata. These are used to add metadata to a job. void hb_metadata_set_name( hb_metadata_t *metadata, const char *name ); void hb_metadata_set_artist( hb_metadata_t *metadata, const char *artist ); void hb_metadata_set_composer( hb_metadata_t *metadata, const char *composer ); void hb_metadata_set_release_date( hb_metadata_t *metadata, const char *release_date ); void hb_metadata_set_comment( hb_metadata_t *metadata, const char *comment ); void hb_metadata_set_genre( hb_metadata_t *metadata, const char *genre ); void hb_metadata_set_album( hb_metadata_t *metadata, const char *album ); void hb_metadata_set_coverart( hb_metadata_t *metadata, const uint8_t *coverart, int size ); Example: job = hb_job_init( &job ); // set job settings ... hb_metadata_set_artist( job->metadata, "Danny Elfman" ); hb_add(h, job); hb_job_close( &job ); Some APIs have changed in order to avoid using title incorrectly and use the new hb_title_set_t. -void hb_autopassthru_apply_settings( hb_job_t * job, hb_title_t * title ); +void hb_autopassthru_apply_settings( hb_job_t * job ); -void hb_get_preview( hb_handle_t *, hb_title_t *, int, uint8_t * ); +void hb_get_preview( hb_handle_t *, hb_job_t *, int, uint8_t * ); hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die, const char * path, int title_index, - hb_list_t * list_title, int preview_count, + hb_title_set_t * title_set, int preview_count, int store_previews, uint64_t min_duration ); These APIs have been removed. Win Interop will need some changes. I think what I've provided will be suffecient, but let me know if it's not. -void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * ); -void hb_set_anamorphic_size_by_index( hb_handle_t *, int, - int *output_width, int *output_height, - int *output_par_width, int *output_par_height ); git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5058 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: update copyright datesjstebbins2011-01-031-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3731 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: refresh x264 tabjstebbins2010-06-151-0/+11
| | | | | | | | | | | | | | | | | updated layout, labeling & tooltips group options by encoding features, analysis options, and psychovisual options change b-pyramid from checkbox to combo box to support None, Strict, and Normal options expand psy-rd slider range to 0-2 (was 0-1) relabel "Analysis" to "Partitions". Add new "Most" option to Partitions that is the same as the old "Some" Change "Some" option of Partitions to mean i4x4:i8x8 add weightp combo add adaptive quantization strength slider remove weightb checkbox remove no-fast-pskip checkbox git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3381 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: merge gtk mingw cross compiling supportjstebbins2009-04-161-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: preview and picture window changesjstebbins2009-04-041-0/+4
| | | | | | | | - split picture settings into it's own window - create overlay for preview window (like the mac ui, but not a pretty) - save window positions and preview display status between sessions git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2297 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: fix problem with writing null values to presets filejstebbins2009-02-111-1/+37
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2137 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: fix me_method/me_range dependencyjstebbins2008-12-061-1/+1
| | | | | | | | umh, esa, tesa -- me_range 4 - 64 dia, hex -- me_range 4 - 16 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2015 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: fix a problem with converting strings to int values.jstebbins2008-10-171-6/+6
| | | | | | | I wanted non-numeric strings to become MAXINT, but this wasn't happening. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1841 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Make preset key/values mostly align with macui presets.jstebbins2008-10-171-2/+9
| | | | | | | | | One step closer to having a common preset format. Audio presets are still not compatible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1840 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: nested presetsjstebbins2008-10-151-1/+21
| | | | | | | | | | new nested builtins. user can create custom folders and drag n drop custom presets. updated mac to linux presets plist translation tool to handle new format git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1835 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: nested presets and drag n drop re-ordering of presetsjstebbins2008-10-051-0/+12
| | | | | | | | adding a preset always places it at the top level. drag it to where you want it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1816 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: tidy up how combobox values are handled internally and stored in plistsjstebbins2008-09-191-109/+0
| | | | | | | fix a problem with storing max picture dims to presets plist git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1719 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Add mp4 options to queue descriptionjstebbins2008-09-171-0/+99
| | | | | | | fix a problem with audio bitrate and sample rate after reloading queue git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1706 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Add queue drag n drop reorderingjstebbins2008-09-131-0/+13
| | | | | | | Also add option to add chapter numbers to auto-generated destination name git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1693 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: yikes, this thing leaks worse than my roof, fixedjstebbins2008-09-081-23/+33
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1677 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Fix several strict-aliasing warnings and a null pointer dereferencejstebbins2008-09-071-1/+4
| | | | | | | | | that can happen if preferences don't yet exist and your running the app over an ssh session. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1673 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Presets and preferences are now stored as plistsjstebbins2008-09-021-0/+678
This will also make saving/restoring the queue much easier. It's a scary big change. 1400 new lines of code. Due to efficiencies of a better desing, 2400 lines of old code also gets refactored down to 1600. Giving a final net +600 lines. Along the way, I stumbled across a couple bugs and fixed them. Chapter list entry would get wedged under certain circumstances. Pausing encoding didn't display pause message in status bar. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1662 b64f7644-9d1e-0410-96f1-a4d463321fa5