MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_adjust_audio_rate_combos

Function ghb_adjust_audio_rate_combos

gtk/src/audiohandler.c:113–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113static void
114ghb_adjust_audio_rate_combos(signal_user_data_t *ud, GhbValue *asettings)
115{
116 if (asettings != NULL)
117 {
118 ghb_sanitize_audio_settings(ud->settings, asettings);
119
120 int track, mix, acodec;
121 GhbValue * atrack;
122 const char * layout;
123
124 track = ghb_dict_get_int(asettings, "Track");
125
126 acodec = ghb_settings_audio_encoder_codec(asettings, "Encoder");
127 mix = ghb_settings_mixdown_mix(asettings, "Mixdown");
128
129 int low, high, sr;
130 sr = ghb_dict_get_int(asettings, "Samplerate");
131 atrack = ghb_get_title_audio_track(ud->settings, track);
132 if (sr == 0)
133 {
134 sr = ghb_dict_get_int(atrack, "SampleRate");
135 }
136 layout = ghb_dict_get_string(atrack, "ChannelLayout");
137 mix = ghb_get_best_mix(layout, acodec, mix);
138 hb_audio_bitrate_get_limits(acodec, sr, mix, &low, &high);
139
140 GtkWidget *w = ghb_builder_widget("AudioBitrate");
141 ghb_audio_bitrate_opts_filter(GTK_COMBO_BOX(w), low, high);
142 w = ghb_builder_widget("AudioMixdown");
143 ghb_mix_opts_filter(GTK_COMBO_BOX(w), acodec);
144 w = ghb_builder_widget("AudioSamplerate");
145 ghb_audio_samplerate_opts_filter(GTK_COMBO_BOX(w), acodec);
146
147 ghb_ui_update("AudioEncoder",
148 ghb_dict_get_value(asettings, "Encoder"));
149 ghb_ui_update("AudioBitrate",
150 ghb_dict_get_value(asettings, "Bitrate"));
151 gdouble quality = get_ui_quality(asettings);
152 ghb_ui_update("AudioTrackQualityX", ghb_double_value(quality));
153 ghb_ui_update("AudioSamplerate",
154 ghb_dict_get_value(asettings, "Samplerate"));
155 ghb_ui_update("AudioMixdown",
156 ghb_dict_get_value(asettings, "Mixdown"));
157 ghb_ui_update("AudioTrackDRCSlider",
158 ghb_dict_get_value(asettings, "DRC"));
159 ghb_audio_list_refresh_selected(ud);
160 }
161}
162
163static void enable_quality_widgets(
164 signal_user_data_t *ud,

Callers 1

audio_depsFunction · 0.85

Calls 15

ghb_dict_get_intFunction · 0.85
ghb_settings_mixdown_mixFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_get_best_mixFunction · 0.85
ghb_builder_widgetFunction · 0.85
ghb_mix_opts_filterFunction · 0.85

Tested by

no test coverage detected