2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Library General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
17 #if !defined(_HBBACKEND_H_)
48 } ghb_instance_status_t;
52 ghb_instance_status_t scan;
53 ghb_instance_status_t queue;
56 #define GHB_SCALE_KEEP_NONE 0
57 #define GHB_SCALE_KEEP_WIDTH 1
58 #define GHB_SCALE_KEEP_HEIGHT 2
83 #define GHB_AUDIO_SAMPLERATE 1
84 #define GHB_AUDIO_BITRATE 2
85 #define GHB_FRAMERATE 3
87 const gchar* ghb_version(void);
88 void ghb_vquality_range(
89 signal_user_data_t *ud,
95 //const gchar* ghb_get_rate_string(gint rate, gint type);
96 void ghb_combo_init(GtkBuilder *builder);
97 void ghb_backend_init(gint debug);
98 void ghb_backend_close(void);
99 void ghb_add_job(GValue *js, gint unique_id);
100 void ghb_remove_job(gint unique_id);
101 void ghb_start_queue(void);
102 void ghb_stop_queue(void);
103 void ghb_pause_queue(void);
105 void ghb_add_live_job(GValue *js, gint unique_id);
106 void ghb_start_live_encode();
107 void ghb_stop_live_encode();
109 void ghb_clear_scan_state(gint state);
110 void ghb_clear_queue_state(gint state);
112 void ghb_set_state(gint state);
113 gint ghb_get_scan_state();
114 gint ghb_get_queue_state();
115 void ghb_get_status(ghb_status_t *status);
116 void ghb_track_status(void);
117 void ghb_backend_scan(const gchar *path, gint titleindex, gint preview_count);
118 void ghb_backend_queue_scan(const gchar *path, gint titleindex);
119 gboolean ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex);
120 void ghb_set_scale(signal_user_data_t *ud, gint mode);
121 GValue* ghb_get_chapters(gint titleindex);
122 gint ghb_get_best_mix(gint titleindex, gint track, gint acodec, gint mix);
123 gboolean ghb_ac3_in_audio_list(const GValue *audio_list);
124 gboolean ghb_audio_is_passthru(gint acodec);
125 gint ghb_get_default_acodec(void);
126 gboolean ghb_get_audio_info(
127 ghb_audio_info_t *ainfo, gint titleindex, gint audioindex);
128 void ghb_set_passthru_bitrate_opts(GtkBuilder *builder, gint bitrate);
129 void ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate);
130 void ghb_grey_combo_options(GtkBuilder *builder);
131 void ghb_update_ui_combo_box(
132 GtkBuilder *builder, const gchar *name, gint user_data, gboolean all);
133 gint ghb_find_audio_track(gint titleindex, const gchar *lang, gint index);
134 gint ghb_longest_title(void);
135 gchar* ghb_build_x264opts_string(GValue *settings);
136 GdkPixbuf* ghb_get_preview_image(
137 gint titleindex, gint index, GValue *settings, gboolean borders);
138 gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex);
139 gchar* ghb_dvd_volname(const gchar *device);
140 gint ghb_get_title_number(gint titleindex);
142 gboolean ghb_validate_vquality(GValue *settings);
143 gboolean ghb_validate_audio(signal_user_data_t *ud);
144 gboolean ghb_validate_video(signal_user_data_t *ud);
145 gboolean ghb_validate_filters(signal_user_data_t *ud);
146 gboolean ghb_validate_filter_string(const gchar *str, gint max_fields);
147 void ghb_hb_cleanup(gboolean partial);
148 gint ghb_lookup_combo_int(const gchar *name, const GValue *acodec);
149 const gchar* ghb_lookup_combo_option(const gchar *name, const GValue *acodec);
150 gchar* ghb_get_tmp_dir();
152 #endif // _HBBACKEND_H_