#define X264_MIN(a,b) ( (a)<(b) ? (a) : (b) )
/* Callbacks */
-static void _dialog_run (GtkDialog *dialog,
+static void x264_dialog_run (GtkDialog *dialog,
gint response,
X264_Gui_Config *gconfig,
X264_Gtk *x264_gtk);
/* x264 config management */
-static void _default_load (GtkButton *button, gpointer user_data);
-static void _current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk);
-static void _current_set (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk);
-static void _default_set (X264_Gtk *x264_gtk);
+static void x264_default_load (GtkButton *button, gpointer user_data);
+static void x264_current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk);
+static void x264_current_set (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk);
+static void x264_default_set (X264_Gtk *x264_gtk);
/* Result must be freed */
if (error) {
g_print (_("x264.cfg: %s\n"), error->message);
g_print (_("Loading default configuration\n"));
- _default_set (x264_gtk);
+ x264_default_set (x264_gtk);
}
else {
GIOStatus status;
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (win_x264_gtk)->action_area), button, FALSE, TRUE, 6);
g_signal_connect (G_OBJECT (button),
"clicked",
- G_CALLBACK (_default_load),
+ G_CALLBACK (x264_default_load),
gconfig);
gtk_widget_show (button);
label = gtk_label_new (_("Bitrate"));
gtk_widget_show (label);
- page = _bitrate_page (gconfig);
+ page = x264_bitrate_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("Rate Control"));
gtk_widget_show (label);
- page = _rate_control_page (gconfig);
+ page = x264_rate_control_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("MB & Frames"));
gtk_widget_show (label);
- page = _mb_page (gconfig);
+ page = x264_mb_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("More..."));
gtk_widget_show (label);
- page = _more_page (gconfig);
+ page = x264_more_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("Quantization matrices"));
gtk_widget_show (label);
- page = _cqm_page (gconfig);
+ page = x264_cqm_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
- _current_set (gconfig, x264_gtk);
+ x264_current_set (gconfig, x264_gtk);
result = gtk_dialog_run (GTK_DIALOG (win_x264_gtk));
- _dialog_run (GTK_DIALOG (win_x264_gtk), result, gconfig, x264_gtk);
+ x264_dialog_run (GTK_DIALOG (win_x264_gtk), result, gconfig, x264_gtk);
return win_x264_gtk;
}
/* Callbacks */
static void
-_dialog_run (GtkDialog *dialog UNUSED,
+x264_dialog_run (GtkDialog *dialog UNUSED,
gint response,
X264_Gui_Config *gconfig,
X264_Gtk *x264_gtk)
file = g_io_channel_new_file (filename, "w+", NULL);
if (file)
{
- _current_get (gconfig, x264_gtk);
+ x264_current_get (gconfig, x264_gtk);
g_io_channel_set_encoding (file, NULL, NULL);
g_io_channel_write_chars (file, (const gchar *)x264_gtk,
sizeof (X264_Gtk), &length, NULL);
/* x264 config management */
static void
-_default_load (GtkButton *button UNUSED, gpointer user_data)
+x264_default_load (GtkButton *button UNUSED, gpointer user_data)
{
gchar buf[64];
X264_Gui_Config *config;
}
static void
-_default_set (X264_Gtk *x264_gtk)
+x264_default_set (X264_Gtk *x264_gtk)
{
x264_param_t param;
}
static void
-_current_set (X264_Gui_Config *config, X264_Gtk *x264_gtk)
+x264_current_set (X264_Gui_Config *config, X264_Gtk *x264_gtk)
{
gchar buf[4096];
gint i;
}
static void
-_current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk)
+x264_current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk)
{
const gchar *text;
gint i;
/* Callbacks */
-static void _bitrate_pass (GtkComboBox *combo,
+static void x264_bitrate_pass (GtkComboBox *combo,
gpointer user_data);
-static void _bitrate_statfile (GtkToggleButton *button,
+static void x264_bitrate_statfile (GtkToggleButton *button,
gpointer user_data);
GtkWidget *
-_bitrate_page (X264_Gui_Config *gconfig)
+x264_bitrate_page (X264_Gui_Config *gconfig)
{
GtkWidget *vbox;
GtkWidget *frame;
1, 2, 0, 1);
g_signal_connect (G_OBJECT (gconfig->bitrate.pass),
"changed",
- G_CALLBACK (_bitrate_pass),
+ G_CALLBACK (x264_bitrate_pass),
gconfig);
gtk_widget_show (gconfig->bitrate.pass);
"");
g_signal_connect (G_OBJECT (gconfig->bitrate.update_statfile),
"toggled",
- G_CALLBACK (_bitrate_statfile), gconfig);
+ G_CALLBACK (x264_bitrate_statfile), gconfig);
gtk_table_attach_defaults (GTK_TABLE (table), gconfig->bitrate.update_statfile,
0, 1, 0, 1);
gtk_widget_show (gconfig->bitrate.update_statfile);
/* Callbacks */
static void
-_bitrate_pass (GtkComboBox *combo,
+x264_bitrate_pass (GtkComboBox *combo,
gpointer user_data)
{
X264_Gui_Config *gconfig;
}
static void
-_bitrate_statfile (GtkToggleButton *button,
+x264_bitrate_statfile (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *gconfig;
#define X264_GTK_BITRATE_H
-GtkWidget *_bitrate_page (X264_Gui_Config *config);
+GtkWidget *x264_bitrate_page (X264_Gui_Config *config);
#endif /* X264_GTK_BITRATE_H */
/* Callbacks */
-static void _cqm_flat_matrix_cb (GtkToggleButton *togglebutton,
+static void x264_cqm_flat_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data);
-static void _cqm_jvt_matrix_cb (GtkToggleButton *togglebutton,
+static void x264_cqm_jvt_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data);
-static void _cqm_custom_matrix_cb (GtkToggleButton *togglebutton,
+static void x264_cqm_custom_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data);
-static void _cqm_matrix_file_cb (GtkFileChooser *filechooser,
+static void x264_cqm_matrix_file_cb (GtkFileChooser *filechooser,
gint response,
gpointer user_data);
-static GtkWidget *_cqm_4x4_page (X264_Gui_Config *gconfig);
-static GtkWidget *_cqm_8x8_iy_page (X264_Gui_Config *gconfig);
-static GtkWidget *_cqm_8x8_py_page (X264_Gui_Config *gconfig);
+static GtkWidget *x264_cqm_4x4_page (X264_Gui_Config *gconfig);
+static GtkWidget *x264_cqm_8x8_iy_page (X264_Gui_Config *gconfig);
+static GtkWidget *x264_cqm_8x8_py_page (X264_Gui_Config *gconfig);
GtkWidget *
-_cqm_page (X264_Gui_Config *gconfig)
+x264_cqm_page (X264_Gui_Config *gconfig)
{
GtkWidget *vbox;
GtkWidget *table;
gtk_table_attach_defaults (GTK_TABLE (table), gconfig->cqm.radio_flat,
0, 1, 0, 1);
g_signal_connect (G_OBJECT (gconfig->cqm.radio_flat), "toggled",
- G_CALLBACK (_cqm_flat_matrix_cb), gconfig);
+ G_CALLBACK (x264_cqm_flat_matrix_cb), gconfig);
gtk_widget_show (gconfig->cqm.radio_flat);
gconfig->cqm.radio_jvt = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (gconfig->cqm.radio_flat), _("JVT matrix"));
gtk_table_attach_defaults (GTK_TABLE (table), gconfig->cqm.radio_jvt,
0, 1, 1, 2);
g_signal_connect (G_OBJECT (gconfig->cqm.radio_jvt), "toggled",
- G_CALLBACK (_cqm_jvt_matrix_cb), gconfig);
+ G_CALLBACK (x264_cqm_jvt_matrix_cb), gconfig);
gtk_widget_show (gconfig->cqm.radio_jvt);
gconfig->cqm.radio_custom = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (gconfig->cqm.radio_flat), _("Custom matrix"));
gtk_table_attach_defaults (GTK_TABLE (table), gconfig->cqm.radio_custom,
0, 1, 2, 3);
g_signal_connect (G_OBJECT (gconfig->cqm.radio_custom), "toggled",
- G_CALLBACK (_cqm_custom_matrix_cb), gconfig);
+ G_CALLBACK (x264_cqm_custom_matrix_cb), gconfig);
gtk_widget_show (gconfig->cqm.radio_custom);
chooser = gtk_file_chooser_dialog_new(_("Select a file"),
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
g_signal_connect (G_OBJECT (chooser), "response",
- G_CALLBACK (_cqm_matrix_file_cb), gconfig);
+ G_CALLBACK (x264_cqm_matrix_file_cb), gconfig);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser),
g_get_home_dir ());
gconfig->cqm.cqm_file = gtk_file_chooser_button_new_with_dialog (chooser);
label = gtk_label_new (_("4x4 quant. matrices"));
gtk_widget_show (label);
- page = _cqm_4x4_page (gconfig);
+ page = x264_cqm_4x4_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("8x8 I luma quant. matrices"));
gtk_widget_show (label);
- page = _cqm_8x8_iy_page (gconfig);
+ page = x264_cqm_8x8_iy_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
label = gtk_label_new (_("8x8 P luma quant. matrices"));
gtk_widget_show (label);
- page = _cqm_8x8_py_page (gconfig);
+ page = x264_cqm_8x8_py_page (gconfig);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
gtk_widget_show (page);
}
static GtkWidget *
-_cqm_4x4_page (X264_Gui_Config *gconfig)
+x264_cqm_4x4_page (X264_Gui_Config *gconfig)
{
GtkWidget *table;
GtkWidget *misc;
}
static GtkWidget *
-_cqm_8x8_iy_page (X264_Gui_Config *gconfig)
+x264_cqm_8x8_iy_page (X264_Gui_Config *gconfig)
{
GtkWidget *table;
GtkWidget *misc;
}
static GtkWidget *
-_cqm_8x8_py_page (X264_Gui_Config *gconfig)
+x264_cqm_8x8_py_page (X264_Gui_Config *gconfig)
{
GtkWidget *table;
GtkWidget *misc;
/* Callbacks */
static void
-_cqm_flat_matrix_cb (GtkToggleButton *togglebutton,
+x264_cqm_flat_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data)
{
X264_Gui_Config *gconfig;
}
static void
-_cqm_jvt_matrix_cb (GtkToggleButton *togglebutton,
+x264_cqm_jvt_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data)
{
X264_Gui_Config *gconfig;
}
static void
-_cqm_custom_matrix_cb (GtkToggleButton *togglebutton,
+x264_cqm_custom_matrix_cb (GtkToggleButton *togglebutton,
gpointer user_data)
{
X264_Gui_Config *gconfig;
}
static gboolean
-_set_coefs (int size, GtkWidget **entries, GIOChannel *file)
+x264_set_coefs (int size, GtkWidget **entries, GIOChannel *file)
{
gchar *line;
gsize length;
}
static void
-_cqm_matrix_file_cb (GtkFileChooser *filechooser,
+x264_cqm_matrix_file_cb (GtkFileChooser *filechooser,
gint response,
gpointer user_data)
{
}
if (g_str_has_prefix (line, "INTRA4X4_LUMA")) {
g_free (line);
- if (!_set_coefs (4, gconfig->cqm.cqm_4iy, file)) {
+ if (!x264_set_coefs (4, gconfig->cqm.cqm_4iy, file)) {
g_free (filename);
return;
}
}
if (g_str_has_prefix (line, "INTRA4X4_CHROMAU")) {
g_free (line);
- if (!_set_coefs (4, gconfig->cqm.cqm_4ic, file)) {
+ if (!x264_set_coefs (4, gconfig->cqm.cqm_4ic, file)) {
g_free (filename);
return;
}
}
if (g_str_has_prefix (line, "INTER4X4_LUMA")) {
g_free (line);
- if (!_set_coefs (4, gconfig->cqm.cqm_4py, file)) {
+ if (!x264_set_coefs (4, gconfig->cqm.cqm_4py, file)) {
g_free (filename);
return;
}
if (g_str_has_prefix (line, "INTER4X4_CHROMAU")) {
g_free (line);
- if (!_set_coefs (4, gconfig->cqm.cqm_4pc, file)) {
+ if (!x264_set_coefs (4, gconfig->cqm.cqm_4pc, file)) {
g_free (filename);
return;
}
}
if (g_str_has_prefix (line, "INTRA8X8_LUMA")) {
g_free (line);
- if (!_set_coefs (8, gconfig->cqm.cqm_8iy, file)) {
+ if (!x264_set_coefs (8, gconfig->cqm.cqm_8iy, file)) {
g_free (filename);
return;
}
}
if (g_str_has_prefix (line, "INTER8X8_LUMA")) {
g_free (line);
- if (!_set_coefs (8, gconfig->cqm.cqm_8py, file)) {
+ if (!x264_set_coefs (8, gconfig->cqm.cqm_8py, file)) {
g_free (filename);
return;
}
#define X264_GTK_CQM_H
-GtkWidget *_cqm_page (X264_Gui_Config *config);
+GtkWidget *x264_cqm_page (X264_Gui_Config *config);
#endif /* X264_GTK_CQM_H */
static int (*p_set_eop) (void *handle, x264_picture_t *p_picture);
static int (*p_close_outfile) (void *handle);
-static int _set_drivers (X264_Demuxer_Type in_container, gint out_container);
-static int _encode_frame (x264_t *h, void *handle, x264_picture_t *pic);
+static int x264_set_drivers (X264_Demuxer_Type in_container, gint out_container);
+static int x264_encode_frame (x264_t *h, void *handle, x264_picture_t *pic);
gpointer
g_print (_("encoding...\n"));
param = thread_data->param;
- err = _set_drivers (thread_data->in_container, thread_data->out_container);
+ err = x264_set_drivers (thread_data->in_container, thread_data->out_container);
if (err < 0) {
GtkWidget *no_driver;
no_driver = gtk_message_dialog_new (GTK_WINDOW(thread_data->dialog),
pic.i_pts = (int64_t)i_frame * param->i_fps_den;
- i_file += _encode_frame (h, hout, &pic);
+ i_file += x264_encode_frame (h, hout, &pic);
i_frame++;
}
/* Flush delayed B-frames */
do {
- i_file += i_frame_size = _encode_frame (h, hout, NULL);
+ i_file += i_frame_size = x264_encode_frame (h, hout, NULL);
} while (i_frame_size);
i_end = x264_mdate ();
}
static int
-_set_drivers (X264_Demuxer_Type in_container, gint out_container)
+x264_set_drivers (X264_Demuxer_Type in_container, gint out_container)
{
switch (in_container) {
case X264_DEMUXER_YUV:
}
static int
-_encode_frame (x264_t *h, void *handle, x264_picture_t *pic)
+x264_encode_frame (x264_t *h, void *handle, x264_picture_t *pic)
{
x264_picture_t pic_out;
x264_nal_t *nal;
/* Callbacks */
-static gboolean _delete_window_cb (GtkWidget *widget,
+static gboolean x264_delete_window_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
-static void _configure_window_cb (GtkButton *button,
+static void x264_configure_window_cb (GtkButton *button,
gpointer user_data);
-static void _chooser_window_cb (GtkDialog *dialog,
+static void x264_chooser_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data);
-static void _response_window_cb (GtkDialog *dialog,
+static void x264_response_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data);
-static void _dimension_entry_cb (GtkEditable *editable,
+static void x264_dimension_entry_cb (GtkEditable *editable,
gpointer user_data);
-static gboolean _fill_status_window (GIOChannel *io,
+static gboolean x264_fill_status_window (GIOChannel *io,
GIOCondition condition,
gpointer user_data);
/* Code */
guint64
-_file_size(const char* name)
+x264_file_size(const char* name)
{
struct stat buf;
memset(&buf, 0, sizeof(struct stat));
gtk_window_set_icon (GTK_WINDOW (dialog), icon);
g_signal_connect (G_OBJECT (dialog),
"delete-event",
- G_CALLBACK (_delete_window_cb),
+ G_CALLBACK (x264_delete_window_cb),
encode);
g_signal_connect (G_OBJECT (dialog),
"response",
- G_CALLBACK (_response_window_cb),
+ G_CALLBACK (x264_response_window_cb),
encode);
encode->main_dialog = dialog;
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, FALSE, TRUE, 6);
g_signal_connect (G_OBJECT (button),
"clicked",
- G_CALLBACK (_configure_window_cb),
+ G_CALLBACK (x264_configure_window_cb),
dialog);
gtk_widget_show (button);
gtk_file_chooser_add_filter (chooser, filter);
#endif
g_signal_connect_after(G_OBJECT (chooser), "response",
- G_CALLBACK (_chooser_window_cb),
+ G_CALLBACK (x264_chooser_window_cb),
encode);
encode->file_input = gtk_file_chooser_button_new_with_dialog (GTK_WIDGET(chooser));
gtk_table_attach_defaults (GTK_TABLE (table), encode->file_input, 1, 2, 0, 1);
encode->width = gtk_entry_new_with_max_length (255);
gtk_entry_set_text (GTK_ENTRY (encode->width), "352");
g_signal_connect_after(G_OBJECT (encode->width), "changed",
- G_CALLBACK (_dimension_entry_cb),
+ G_CALLBACK (x264_dimension_entry_cb),
encode);
gtk_table_attach_defaults (GTK_TABLE (table), encode->width, 1, 2, 1, 2);
gtk_widget_show (encode->width);
gtk_entry_set_text (GTK_ENTRY (encode->height), "288");
gtk_table_attach_defaults (GTK_TABLE (table), encode->height, 1, 2, 2, 3);
g_signal_connect_after(G_OBJECT (encode->height), "changed",
- G_CALLBACK (_dimension_entry_cb),
+ G_CALLBACK (x264_dimension_entry_cb),
encode);
gtk_widget_show (encode->height);
/* Callbacks */
static void
-_encode_shutdown (X264_Gtk_Encode *encode)
+x264_encode_shutdown (X264_Gtk_Encode *encode)
{
if (!encode) return;
}
static gboolean
-_delete_window_cb (GtkWidget *widget UNUSED,
+x264_delete_window_cb (GtkWidget *widget UNUSED,
GdkEvent *event UNUSED,
gpointer user_data)
{
gtk_main_quit ();
- _encode_shutdown ((X264_Gtk_Encode *)user_data);
+ x264_encode_shutdown ((X264_Gtk_Encode *)user_data);
return TRUE;
}
static void
-_chooser_window_cb (GtkDialog *dialog,
+x264_chooser_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data)
{
gtk_dialog_run (GTK_DIALOG (dialog_message));
gtk_widget_destroy (dialog_message);
}
- encode->size = _file_size(in);
+ encode->size = x264_file_size(in);
if (g_snprintf(buffer, BUFFER_LENGTH, "%i", param.i_width) > 0)
gtk_entry_set_text (GTK_ENTRY (encode->width), buffer);
gtk_entry_set_text (GTK_ENTRY (encode->frame_count), buffer);
}
static void
-_dimension_entry_cb (GtkEditable *editable,
+x264_dimension_entry_cb (GtkEditable *editable,
gpointer user_data)
{
X264_Gtk_Encode *encode = (X264_Gtk_Encode *)user_data;
}
static void
-_configure_window_cb (GtkButton *button UNUSED,
+x264_configure_window_cb (GtkButton *button UNUSED,
gpointer user_data)
{
GtkWidget *window;
}
static void
-_response_window_cb (GtkDialog *dialog,
+x264_response_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data)
{
g_io_channel_set_encoding (thread_data->io_write, NULL, NULL);
g_io_add_watch (thread_data->io_read, G_IO_IN,
- (GIOFunc)_fill_status_window, thread_data);
+ (GIOFunc)x264_fill_status_window, thread_data);
win_status = x264_gtk_encode_status_window (thread_data);
gtk_window_set_transient_for (GTK_WINDOW (win_status), GTK_WINDOW (dialog));
case GTK_RESPONSE_CLOSE:
default:
gtk_main_quit ();
- _encode_shutdown ((X264_Gtk_Encode *)user_data);
+ x264_encode_shutdown ((X264_Gtk_Encode *)user_data);
}
}
static gboolean
-_fill_status_window (GIOChannel *io UNUSED,
+x264_fill_status_window (GIOChannel *io UNUSED,
GIOCondition condition UNUSED,
gpointer user_data)
{
/* Callbacks */
-static gboolean _delete_window_cb (GtkWidget *widget,
+static gboolean x264_delete_window_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
-static void _response_window_cb (GtkDialog *dialog,
+static void x264_response_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data);
g_signal_connect (G_OBJECT (win_status),
"delete-event",
- G_CALLBACK (_delete_window_cb),
+ G_CALLBACK (x264_delete_window_cb),
thread_data);
g_signal_connect (G_OBJECT (win_status),
"response",
- G_CALLBACK (_response_window_cb),
+ G_CALLBACK (x264_response_window_cb),
thread_data);
table = gtk_table_new (5, 2, FALSE);
}
static void
-_thread_data_free (X264_Thread_Data *thread_data)
+x264_thread_data_free (X264_Thread_Data *thread_data)
{
g_free (thread_data->param);
g_free (thread_data->file_input);
}
static gboolean
-_delete_window_cb (GtkWidget *widget,
+x264_delete_window_cb (GtkWidget *widget,
GdkEvent *event UNUSED,
gpointer user_data)
{
gtk_widget_destroy (widget);
- _thread_data_free ((X264_Thread_Data *)user_data);
+ x264_thread_data_free ((X264_Thread_Data *)user_data);
return TRUE;
}
static void
-_response_window_cb (GtkDialog *dialog,
+x264_response_window_cb (GtkDialog *dialog,
gint res,
gpointer user_data)
{
case GTK_RESPONSE_CANCEL:
default:
gtk_widget_destroy (GTK_WIDGET (dialog));
- _thread_data_free ((X264_Thread_Data *)user_data);
+ x264_thread_data_free ((X264_Thread_Data *)user_data);
}
}
#ifdef X264_GTK_PRIVATE_H
/* x264_path must be known for this to work */
# define BIND_X264_TEXTDOMAIN() \
- gchar* _tmp = x264_gtk_path("locale"); \
- bindtextdomain(GETTEXT_DOMAIN, _tmp); \
- g_free(_tmp); \
+ gchar* x264_tmp = x264_gtk_path("locale"); \
+ bindtextdomain(GETTEXT_DOMAIN, x264_tmp); \
+ g_free(x264_tmp); \
bind_textdomain_codeset (GETTEXT_DOMAIN, "UTF-8"); \
textdomain(GETTEXT_DOMAIN)
#else
/* Callbacks */
-static void _mb_bframe_pyramid (GtkToggleButton *button,
+static void x264_mb_bframe_pyramid (GtkToggleButton *button,
gpointer user_data);
-static void _mb_inter_search_8 (GtkToggleButton *button,
+static void x264_mb_inter_search_8 (GtkToggleButton *button,
gpointer user_data);
-static void _mb_transform_8x8 (GtkToggleButton *button,
+static void x264_mb_transform_8x8 (GtkToggleButton *button,
gpointer user_data);
GtkWidget *
-_mb_page (X264_Gui_Config *config)
+x264_mb_page (X264_Gui_Config *config)
{
GtkWidget *vbox;
GtkWidget *frame;
"");
g_signal_connect (G_OBJECT (config->mb.partitions.transform_8x8),
"toggled",
- G_CALLBACK (_mb_transform_8x8), config);
+ G_CALLBACK (x264_mb_transform_8x8), config);
gtk_box_pack_start (GTK_BOX (vbox2), config->mb.partitions.transform_8x8, FALSE, TRUE, 0);
gtk_widget_show (config->mb.partitions.transform_8x8);
"");
g_signal_connect (G_OBJECT (config->mb.partitions.inter_search_8),
"toggled",
- G_CALLBACK (_mb_inter_search_8), config);
+ G_CALLBACK (x264_mb_inter_search_8), config);
gtk_box_pack_start (GTK_BOX (vbox2), config->mb.partitions.inter_search_8, FALSE, TRUE, 0);
gtk_widget_show (config->mb.partitions.inter_search_8);
"");
g_signal_connect (G_OBJECT (config->mb.bframes.bframe_pyramid),
"toggled",
- G_CALLBACK (_mb_bframe_pyramid), config);
+ G_CALLBACK (x264_mb_bframe_pyramid), config);
gtk_table_attach_defaults (GTK_TABLE (table), config->mb.bframes.bframe_pyramid,
0, 1, 2, 3);
gtk_widget_show (config->mb.bframes.bframe_pyramid);
}
static void
-_mb_bframe_pyramid (GtkToggleButton *button,
+x264_mb_bframe_pyramid (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
}
static void
-_mb_inter_search_8 (GtkToggleButton *button,
+x264_mb_inter_search_8 (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
}
static void
-_mb_transform_8x8 (GtkToggleButton *button,
+x264_mb_transform_8x8 (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
#define X264_GTK_MB_H
-GtkWidget *_mb_page (X264_Gui_Config *config);
+GtkWidget *x264_mb_page (X264_Gui_Config *config);
#endif /* X264_GTK_MB_H */
/* Callbacks */
-static void _more_deblocking_filter (GtkToggleButton *button,
+static void x264_more_deblocking_filter (GtkToggleButton *button,
gpointer user_data);
-static void _more_cabac (GtkToggleButton *button,
+static void x264_more_cabac (GtkToggleButton *button,
gpointer user_data);
-static void _more_mixed_ref (GtkToggleButton *button,
+static void x264_more_mixed_ref (GtkToggleButton *button,
gpointer user_data);
GtkWidget *
-_more_page (X264_Gui_Config *config)
+x264_more_page (X264_Gui_Config *config)
{
GtkWidget *vbox;
GtkWidget *frame;
"");
g_signal_connect (G_OBJECT (config->more.motion_estimation.mixed_refs),
"toggled",
- G_CALLBACK (_more_mixed_ref), config);
+ G_CALLBACK (x264_more_mixed_ref), config);
gtk_table_attach_defaults (GTK_TABLE (table), config->more.motion_estimation.mixed_refs,
2, 3, 3, 4);
gtk_widget_show (config->more.motion_estimation.mixed_refs);
"");
g_signal_connect (G_OBJECT (config->more.misc.cabac),
"toggled",
- G_CALLBACK (_more_cabac), config);
+ G_CALLBACK (x264_more_cabac), config);
gtk_table_attach_defaults (GTK_TABLE (table), config->more.misc.cabac,
0, 1, 1, 2);
gtk_widget_show (config->more.misc.cabac);
"");
g_signal_connect (G_OBJECT (config->more.misc.df.deblocking_filter),
"toggled",
- G_CALLBACK (_more_deblocking_filter), config);
+ G_CALLBACK (x264_more_deblocking_filter), config);
gtk_table_attach_defaults (GTK_TABLE (table), config->more.misc.df.deblocking_filter,
0, 1, 3, 4);
gtk_widget_show (config->more.misc.df.deblocking_filter);
/* Callbacks */
static void
-_more_deblocking_filter (GtkToggleButton *button,
+x264_more_deblocking_filter (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
}
static void
-_more_cabac (GtkToggleButton *button,
+x264_more_cabac (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
}
static void
-_more_mixed_ref (GtkToggleButton *button,
+x264_more_mixed_ref (GtkToggleButton *button,
gpointer user_data)
{
X264_Gui_Config *config;
#define X264_GTK_MORE_H
-GtkWidget *_more_page (X264_Gui_Config *config);
+GtkWidget *x264_more_page (X264_Gui_Config *config);
#endif /* X264_GTK_MORE_H */
/* Callbacks */
-static void _insert_numeric (GtkEditable *editable,
+static void x264_insert_numeric (GtkEditable *editable,
const gchar *text,
gint length,
gint *position,
gpointer data);
GtkWidget *
-_rate_control_page (X264_Gui_Config *config)
+x264_rate_control_page (X264_Gui_Config *config)
{
GtkWidget *vbox;
GtkWidget *frame;
config->rate_control.bitrate.keyframe_boost = gtk_entry_new_with_max_length (3);
g_signal_connect (G_OBJECT (config->rate_control.bitrate.keyframe_boost),
"insert-text",
- G_CALLBACK (_insert_numeric),
+ G_CALLBACK (x264_insert_numeric),
NULL);
gtk_table_attach_defaults (GTK_TABLE (table),
config->rate_control.bitrate.keyframe_boost,
}
static void
-_insert_numeric (GtkEditable *editable,
+x264_insert_numeric (GtkEditable *editable,
const gchar *text,
gint length,
gint *position,
result[j] = '\0';
g_signal_handlers_block_by_func (editable,
- (gpointer) _insert_numeric, data);
+ (gpointer) x264_insert_numeric, data);
gtk_editable_insert_text (editable, result, j, position);
g_signal_handlers_unblock_by_func (editable,
- (gpointer) _insert_numeric, data);
+ (gpointer) x264_insert_numeric, data);
g_signal_stop_emission_by_name (editable, "insert-text");
#define X264_GTK_RC_H
-GtkWidget *_rate_control_page (X264_Gui_Config *config);
+GtkWidget *x264_rate_control_page (X264_Gui_Config *config);
#endif /* X264_GTK_RC_H */