Commit aabb91c8 authored by Loren Merritt's avatar Loren Merritt
Browse files

gtk fixes:

in Makefile
- fix datadir for mingw users
- remove the shared lib during the clean rule
- use $(ENCODE_BIN) instead of x264_gtk_encode
- add some $(DESTDIR) and create some directories when necessary
- remove -lintl
statfile_length -> statsfile_length
fix the "sensitivity" of the widget of update_statfile
the logo is now handled correctly on windows
added: beginning of multipass support
patch by Vincent Torri.


git-svn-id: svn://svn.videolan.org/x264/trunk@580 df754926-b1dd-0310-bc7b-ec298dee348c
parent 90a92195
......@@ -4,7 +4,7 @@ include config.mak
# Architecture dependant stuff
ifeq ($(SYS),MINGW)
datadir=.
datadir="$(HOMEDRIVE)/Documents\ and\ Settings/$(USERNAME)/Application\ Data"
X264GTK_O = x264gtk.o
TEST_OBJECTS+=$(X264GTK_O)
LDFLAGS+=-mwindows
......@@ -99,7 +99,7 @@ $(SONAMEGTK): $(OBJECTS_LIB)
$(TEST_BIN): $(OBJECTS_LIB) $(OBJECTS_TEST)
@echo " B: $(@F)"
#Needs iconv/intl
@$(CC) -o $(TEST_BIN) $(OBJECTS_LIB) $(OBJECTS_TEST) $(LDFLAGS) $(ICONV_LIB) -lintl
@$(CC) -o $(TEST_BIN) $(OBJECTS_LIB) $(OBJECTS_TEST) $(LDFLAGS) $(ICONV_LIB)
# Program : x264_gtk_encode
$(ENCODE_BIN): x264_icon.h libx264gtk.a $(SONAMEGTK) $(OBJECTS_ENCODE) $(EXTERNAL_DEPS) $(X264GTK_O)
......@@ -124,36 +124,44 @@ $(X264GTK_PC):
# Clean rule
clean:
@rm -f *.o *.mo x264_gtk.pot $(TEST_BIN) $(ENCODE_BIN) libx264gtk.a x264_icon.h x264gtk.o
@rm -f *.o *.mo x264_gtk.pot $(TEST_BIN) $(ENCODE_BIN) libx264gtk.a $(SONAMEGTK) x264_icon.h
# Distclean rule
distclean:
@rm -f config.mak $(X264GTK_PC)
# Install rule
install: x264_gtk_encode
install: $(ENCODE_BIN)
@echo " D: $(DESTDIR)$(includedir)"
@install -d "$(DESTDIR)$(includedir)"
@echo " I: $(DESTDIR)$(includedir)/x264_gtk.h"
@install -m 644 x264_gtk.h "$(DESTDIR)$(includedir)"
@echo " I: $(DESTDIR)$(includedir)/x264_gtk_enum.h"
@install -m 644 x264_gtk_enum.h "$(DESTDIR)$(includedir)"
@echo " D: $(DESTDIR)$(libdir)"
@install -d "$(DESTDIR)$(libdir)"
@echo " I: $(DESTDIR)$(libdir)/libx264gtk.a"
@install -m 644 libx264gtk.a "$(DESTDIR)$(libdir)"
@echo " I: $(DESTDIR)$(libdir)/libx264gtk.so"
@$(if $(SONAMEGTK), ln -sf $(SONAMEGTK) $(DESTDIR)$(libdir)/libx264gtk.so)
@$(if $(SONAMEGTK), install -m 755 $(SONAMEGTK) $(DESTDIR)$(libdir))
@echo " I: $(DESTDIR)$(bindir)/x264_gtk_encode"
@install x264_gtk_encode "$(DESTDIR)$(bindir)"
@echo " D: ${prefix}/share/x264"
@install -d "$(DESTDIR)${prefix}/share/x264"
@echo " I: ${prefix}/share/x264.png"
@install -m 644 x264.png "$(DESTDIR)${prefix}/share/x264"
@echo " D: $(DESTDIR)$(bindir)"
@install -d "$(DESTDIR)$(bindir)"
@echo " I: $(DESTDIR)$(bindir)/$(ENCODE_BIN)"
@install $(ENCODE_BIN) "$(DESTDIR)$(bindir)"
@echo " D: $(DESTDIR)${datadir}/x264"
@install -d "$(DESTDIR)${datadir}/x264"
@echo " I: $(DESTDIR)${datadir}/x264/x264.png"
@install -m 644 x264.png "$(DESTDIR)${datadir}/x264"
@for L in $(ALL_LINGUAS); do \
echo " D: $(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES"; \
install -d "$(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES"; \
echo " I: $(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES/x264_gtk.mo"; \
install -m 644 $$L.mo "$(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES/x264_gtk.mo"; \
done
@echo " I: ${libdir}/pkgconfig/$(X264GTK_PC)"
@echo " D: $(DESTDIR)${libdir}/pkgconfig"
@install -d "$(DESTDIR)${libdir}/pkgconfig"
@echo " I: $(DESTDIR)${libdir}/pkgconfig/$(X264GTK_PC)"
@install -m 644 $(X264GTK_PC) "$(DESTDIR)${libdir}/pkgconfig"
# Uninstall rule
......@@ -167,10 +175,10 @@ uninstall:
@echo " U: $(DESTDIR)$(libdir)/libx264gtk.so"
@$(if $(SONAMEGTK), rm -f "$(DESTDIR)$(libdir)/$(SONAMEGTK)")
@rm -f "$(DESTDIR)$(libdir)/libx264gtk.so"
@echo " U: $(DESTDIR)$(bindir)/x264_gtk_encode"
@rm -f "$(DESTDIR)$(bindir)/x264_gtk_encode"
@echo " U: $(DESTDIR)${prefix}/share/x264"
@rm -rf "$(DESTDIR)${prefix}/share/x264"
@echo " U: $(DESTDIR)$(bindir)/$(ENCODE_BIN)"
@rm -f "$(DESTDIR)$(bindir)/$(ENCODE_BIN)"
@echo " U: $(DESTDIR)${datadir}/x264"
@rm -rf "$(DESTDIR)${datadir}/x264"
@for L in $(ALL_LINGUAS); do \
echo " U: $(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES/x264_gtk.mo"; \
rm -f "$(DESTDIR)${prefix}/share/locale/$$L/LC_MESSAGES/x264_gtk.mo"; \
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-06-22 16:00+0200\n"
"POT-Creation-Date: 2006-09-28 10:28+0200\n"
"PO-Revision-Date: 2006-06-14 13:27+0200\n"
"Last-Translator: Kurosu <kurosu@free.fr>\n"
"Language-Team: N/A\n"
......@@ -169,7 +169,7 @@ msgstr "Tous support
msgid "Auto"
msgstr "Automatique"
#: x264_gtk_bitrate.c:168
#: x264_gtk_bitrate.c:161
msgid "Average bitrate"
msgstr "Dbit moyen"
......@@ -207,7 +207,7 @@ msgstr "EM bidirectionnel"
msgid "Bidirectional ME - description"
msgstr "Estimation de mouvement bidirectionnel"
#: x264_gtk_rc.c:30 x264_gtk.c:238
#: x264_gtk_rc.c:30 x264_gtk.c:264
msgid "Bitrate"
msgstr "Dbit"
......@@ -284,7 +284,7 @@ msgstr "Filtre de lissage"
msgid "Debug"
msgstr "Dboguage"
#: x264_gtk.c:217
#: x264_gtk.c:243
msgid "Default"
msgstr "Par dfaut"
......@@ -321,11 +321,11 @@ msgstr "Activ
msgid "Encoding status"
msgstr "Situation dans le codage"
#: x264_gtk_bitrate.c:68
#: x264_gtk_bitrate.c:61
msgid "Encoding type"
msgstr "Type de codage"
#: x264_gtk_bitrate.c:62
#: x264_gtk_bitrate.c:55
#, fuzzy
msgid "Encoding type - description"
msgstr "Type de codage"
......@@ -449,12 +449,12 @@ msgstr "Bonus image cl
msgid "Keyframe boost - description"
msgstr "Bonus image cl (%)"
#: x264_gtk.c:176
#: x264_gtk.c:202
#, c-format
msgid "Loading configuration from %s\n"
msgstr "Chargement de la configuration partir de %s\n"
#: x264_gtk.c:168
#: x264_gtk.c:194
msgid "Loading default configuration\n"
msgstr "Chargement de la configuration par dfaut\n"
......@@ -466,11 +466,11 @@ msgstr "Niveau de trace"
msgid "Log level - description"
msgstr ""
#: x264_gtk.c:252
#: x264_gtk.c:278
msgid "MB & Frames"
msgstr "MB et image"
#: x264_gtk_bitrate.c:48
#: x264_gtk_bitrate.c:41
msgid "Main settings"
msgstr "Rglages principaux"
......@@ -564,7 +564,7 @@ msgstr "R
msgid "Mixed Refs - description"
msgstr ""
#: x264_gtk.c:259
#: x264_gtk.c:285
msgid "More..."
msgstr "Plus..."
......@@ -572,15 +572,15 @@ msgstr "Plus..."
msgid "Motion Estimation"
msgstr "Estimation de mouvement"
#: x264_gtk_bitrate.c:79
#: x264_gtk_bitrate.c:72
msgid "Multipass - First Pass"
msgstr "Plusieurs passes - premire"
#: x264_gtk_bitrate.c:81
#: x264_gtk_bitrate.c:74
msgid "Multipass - First Pass (fast)"
msgstr "Plusieurs - premire (rapide)"
#: x264_gtk_bitrate.c:83
#: x264_gtk_bitrate.c:76
msgid "Multipass - Nth Pass"
msgstr "Plusieurs - passe N"
......@@ -630,15 +630,15 @@ msgstr "Progression:"
msgid "Quantization limits"
msgstr "Limite de quantification"
#: x264_gtk.c:266
#: x264_gtk.c:292
msgid "Quantization matrices"
msgstr "Matrices"
#: x264_gtk_bitrate.c:101 x264_gtk_bitrate.c:177
#: x264_gtk_bitrate.c:94 x264_gtk_bitrate.c:171
msgid "Quantizer"
msgstr "Pas de quantification"
#: x264_gtk_bitrate.c:95
#: x264_gtk_bitrate.c:88
msgid "Quantizer - description"
msgstr ""
......@@ -650,7 +650,7 @@ msgstr "Port
msgid "Range - description"
msgstr ""
#: x264_gtk.c:245
#: x264_gtk.c:271
msgid "Rate Control"
msgstr "Contrle de dbit"
......@@ -684,11 +684,11 @@ msgstr "Choisir un fichier"
msgid "Select a path"
msgstr "Choisir un rpertoire"
#: x264_gtk_bitrate.c:75
#: x264_gtk_bitrate.c:68
msgid "Single Pass - Bitrate"
msgstr "Passe unique - dbit"
#: x264_gtk_bitrate.c:77
#: x264_gtk_bitrate.c:70
msgid "Single Pass - Quantizer"
msgstr "Passe unique - Quantificateur"
......@@ -696,11 +696,11 @@ msgstr "Passe unique - Quantificateur"
msgid "Spatial"
msgstr "Spatiale"
#: x264_gtk_bitrate.c:120
#: x264_gtk_bitrate.c:113
msgid "Statistic file"
msgstr "Fichier de statistiques"
#: x264_gtk_bitrate.c:142
#: x264_gtk_bitrate.c:135
#, fuzzy
msgid "Statistic file name"
msgstr "Fichier de statistiques"
......@@ -713,7 +713,7 @@ msgstr "Force"
msgid "Strength - description"
msgstr ""
#: x264_gtk_bitrate.c:186 x264_gtk_bitrate.c:195
#: x264_gtk_bitrate.c:182 x264_gtk_bitrate.c:192
msgid "Target bitrate"
msgstr "Dbit vis"
......@@ -758,12 +758,12 @@ msgstr ""
msgid "Uneven Multi-Hexagon"
msgstr "Recherche par hexagones ingaux"
#: x264_gtk_bitrate.c:131
#: x264_gtk_bitrate.c:124
#, fuzzy
msgid "Update statistic file"
msgstr "Mettre jour le fichier"
#: x264_gtk_bitrate.c:133
#: x264_gtk_bitrate.c:126
#, fuzzy
msgid "Update statistic file - description"
msgstr "Mettre jour le fichier"
......@@ -815,12 +815,12 @@ msgstr "Bi-Pr
msgid "Width:"
msgstr "Largeur:"
#: x264_gtk.c:342
#: x264_gtk.c:368
#, c-format
msgid "Writing configuration to %s\n"
msgstr "Ecriture de la configuration dans %s\n"
#: x264_gtk.c:212
#: x264_gtk.c:238
msgid "X264 Configuration"
msgstr "Configuration de X264"
......@@ -873,11 +873,11 @@ msgstr "fichier de sortie : %s\n"
msgid "need to increase buffer size (size=%d)\n"
msgstr "doit accrotre la taille de mmoire tampon (taille=%d)\n"
#: x264_gtk.c:801
#: x264_gtk.c:842
msgid "problem...\n"
msgstr "Problme...\n"
#: x264_gtk.c:167
#: x264_gtk.c:193
#, c-format
msgid "x264.cfg: %s\n"
msgstr ""
......
......@@ -31,6 +31,8 @@
#define CHECK_FLAG(a,flag) ((a) & (flag)) == (flag)
#define round(a) ( ((a)<0.0) ? (gint)(floor((a) - 0.5)) : (gint)(floor((a) + 0.5)) )
#define X264_MAX(a,b) ( (a)>(b) ? (a) : (b) )
#define X264_MIN(a,b) ( (a)<(b) ? (a) : (b) )
/* Callbacks */
static void _dialog_run (GtkDialog *dialog,
......@@ -60,15 +62,6 @@ x264_param_t *x264_gtk_param_get (X264_Gtk *x264_gtk)
x264_param_default (param);
/* bitrate */
if (x264_gtk->pass == X264_PASS_SINGLE_BITRATE)
param->rc.i_bitrate = x264_gtk->average_bitrate;
else
param->rc.i_bitrate = x264_gtk->target_bitrate;
param->rc.i_qp_constant = x264_gtk->quantizer;
/* FIXME: what to do about psz_stat_out ? */
/* rate control */
param->rc.f_ip_factor = 1.0 + (double)x264_gtk->keyframe_boost / 100.0;
param->rc.f_pb_factor = 1.0 + (double)x264_gtk->bframes_reduction / 100.0;
......@@ -145,6 +138,39 @@ x264_param_t *x264_gtk_param_get (X264_Gtk *x264_gtk)
memcpy( param->cqm_8iy, x264_gtk->cqm_8iy, 64 );
memcpy( param->cqm_8py, x264_gtk->cqm_8py, 64 );
/* bitrate */
switch (x264_gtk->pass) {
case X264_PASS_SINGLE_BITRATE:
param->rc.i_rc_method = X264_RC_ABR;
param->rc.i_bitrate = x264_gtk->average_bitrate;
break;
case X264_PASS_SINGLE_QUANTIZER:
param->rc.i_rc_method = X264_RC_CQP;
param->rc.i_qp_constant = x264_gtk->quantizer;
break;
case X264_PASS_MULTIPASS_1ST_FAST:
param->analyse.i_subpel_refine = X264_MAX( X264_MIN( 3, param->analyse.i_subpel_refine - 1 ), 1 );
param->i_frame_reference = ( param->i_frame_reference + 1 ) >> 1;
param->analyse.inter &= ( ~X264_ANALYSE_PSUB8x8 );
param->analyse.inter &= ( ~X264_ANALYSE_BSUB16x16 );
case X264_PASS_MULTIPASS_1ST:
param->rc.i_rc_method = X264_RC_ABR;
param->rc.i_bitrate = x264_gtk->average_bitrate;
param->rc.f_rate_tolerance = 4.0;
break;
case X264_PASS_MULTIPASS_NTH:
param->rc.i_rc_method = X264_RC_ABR;
param->rc.i_bitrate = x264_gtk->average_bitrate;
param->rc.f_rate_tolerance = 1.0;
break;
}
param->rc.b_stat_write = x264_gtk->stat_write;
param->rc.b_stat_read = x264_gtk->stat_read;
/* FIXME: potential mem leak... */
param->rc.psz_stat_out = x264_gtk_path (x264_gtk->statsfile_name);
return param;
}
......@@ -383,6 +409,7 @@ _default_load (GtkButton *button __UNUSED__, gpointer user_data)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->bitrate.update_statfile), FALSE);
gtk_entry_set_text (GTK_ENTRY (config->bitrate.statsfile_name), "x264.stats");
gtk_widget_set_sensitive (config->bitrate.statsfile_name, FALSE);
gtk_widget_set_sensitive (config->bitrate.update_statfile, FALSE);
/* rate control */
g_snprintf (buf, 64, "%d", round((param.rc.f_ip_factor - 1.0) * 100));
......@@ -504,7 +531,6 @@ static void
_default_set (X264_Gtk *x264_gtk)
{
x264_param_t param;
gchar *text;
x264_param_default (&param);
......@@ -513,9 +539,11 @@ _default_set (X264_Gtk *x264_gtk)
x264_gtk->average_bitrate = param.rc.i_bitrate;
x264_gtk->target_bitrate = param.rc.i_bitrate;
x264_gtk->quantizer = param.rc.i_qp_constant;
x264_gtk->stat_write = param.rc.b_stat_write;
x264_gtk->stat_read = param.rc.b_stat_read;
x264_gtk->update_statfile = 0;
text = "x264.stats";
memcpy (x264_gtk->statsfile_name, text, strlen (text) + 1);
x264_gtk->statsfile_length = strlen (param.rc.psz_stat_out);
memcpy (x264_gtk->statsfile_name, param.rc.psz_stat_out, x264_gtk->statsfile_length + 1);
/* rate control */
x264_gtk->keyframe_boost = round((param.rc.f_ip_factor - 1.0) * 100);
......@@ -582,8 +610,7 @@ _default_set (X264_Gtk *x264_gtk)
x264_gtk->threshold = param.i_deblocking_filter_beta;
x264_gtk->debug_method = param.i_log_level + 1;
text = "H264";
memcpy (x264_gtk->fourcc, text, strlen (text) + 1);
memcpy (x264_gtk->fourcc, "H264", 5);
/* cqm */
x264_gtk->cqm_preset = param.i_cqm_preset;
......@@ -616,6 +643,20 @@ _current_set (X264_Gui_Config *config, X264_Gtk *x264_gtk)
gtk_range_set_value (GTK_RANGE (config->bitrate.w_quantizer), x264_gtk->quantizer);
g_snprintf (buf, 5, "%d", x264_gtk->target_bitrate);
gtk_entry_set_text (GTK_ENTRY (config->bitrate.w_target_bitrate), buf);
switch (gtk_combo_box_get_active (GTK_COMBO_BOX (config->bitrate.pass)))
{
case 0:
case 1:
gtk_widget_set_sensitive (config->bitrate.update_statfile, FALSE);
gtk_widget_set_sensitive (config->bitrate.statsfile_name, FALSE);
break;
case 2:
case 3:
case 4:
default:
gtk_widget_set_sensitive (config->bitrate.update_statfile, TRUE);
break;
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->bitrate.update_statfile), x264_gtk->update_statfile);
gtk_entry_set_text (GTK_ENTRY (config->bitrate.statsfile_name), x264_gtk->statsfile_name);
if (x264_gtk->update_statfile)
......@@ -807,26 +848,35 @@ _current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk)
x264_gtk->pass = X264_PASS_SINGLE_BITRATE;
text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_average_bitrate));
x264_gtk->average_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);
x264_gtk->stat_write = 0;
x264_gtk->stat_read = 0;
break;
case 1:
x264_gtk->pass = X264_PASS_SINGLE_QUANTIZER;
x264_gtk->quantizer = (gint)gtk_range_get_value (GTK_RANGE (gconfig->bitrate.w_quantizer));
x264_gtk->stat_write = 0;
x264_gtk->stat_read = 0;
break;
case 2:
x264_gtk->pass = X264_PASS_MULTIPASS_1ST;
text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));
x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);
x264_gtk->stat_write = 1;
break;
case 3:
x264_gtk->pass = X264_PASS_MULTIPASS_1ST_FAST;
text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));
x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);
x264_gtk->stat_write = 1;
break;
case 4:
default:
x264_gtk->pass = X264_PASS_MULTIPASS_NTH;
text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));
x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);
x264_gtk->stat_read = 1;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile)))
x264_gtk->stat_write = 1;
break;
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile)))
......@@ -835,9 +885,10 @@ _current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk)
x264_gtk->update_statfile = 0;
text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.statsfile_name));
x264_gtk->statsfile_length = strlen (text);
memcpy (x264_gtk->statsfile_name,
text,
strlen(text) + 1);
x264_gtk->statsfile_length + 1);
/* rate control */
text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.bitrate.keyframe_boost));
......
......@@ -19,7 +19,7 @@ struct X264_Gtk_
gint target_bitrate;
gint quantizer;
gint desired_size;
gint statfile_length; /* length of the filename (as returned by strlen) */
gint statsfile_length; /* length of the filename (as returned by strlen) */
gchar statsfile_name[4095+1];
/* rc */
......@@ -74,6 +74,8 @@ struct X264_Gtk_
guint8 cqm_8py[64];
/* bitrate */
guint stat_write : 1;
guint stat_read : 1;
guint update_statfile : 1;
/* mb - partitions */
guint transform_8x8 : 1;
......
......@@ -34,14 +34,7 @@ _bitrate_page (X264_Gui_Config *gconfig)
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
#ifdef _WIN32
gchar *png;
png = x264_gtk_path("x264.png");
image = gtk_image_new_from_file (png);
g_free(png);
#else
image = gtk_image_new_from_file (X264_DATA_DIR "/x264/x264.png");
#endif
gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, TRUE, 6);
gtk_widget_show (image);
......@@ -172,6 +165,7 @@ _bitrate_pass (GtkComboBox *combo,
gtk_widget_show (gconfig->bitrate.w_average_bitrate);
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile), FALSE);
gtk_widget_set_sensitive (gconfig->bitrate.update_statfile, FALSE);
break;
case X264_PASS_SINGLE_QUANTIZER:
gtk_label_set_text (GTK_LABEL (gconfig->bitrate.label), _("Quantizer"));
......@@ -180,6 +174,8 @@ _bitrate_pass (GtkComboBox *combo,
gtk_widget_hide (gconfig->bitrate.w_target_bitrate);
gtk_widget_show (gconfig->bitrate.w_quantizer);
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile), FALSE);
gtk_widget_set_sensitive (gconfig->bitrate.update_statfile, FALSE);
break;
case X264_PASS_MULTIPASS_1ST:
case X264_PASS_MULTIPASS_1ST_FAST:
......@@ -189,6 +185,7 @@ _bitrate_pass (GtkComboBox *combo,
gtk_widget_hide (gconfig->bitrate.w_average_bitrate);
gtk_widget_show (gconfig->bitrate.w_target_bitrate);
}
gtk_widget_set_sensitive (gconfig->bitrate.update_statfile, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile), TRUE);
break;
case X264_PASS_MULTIPASS_NTH:
......@@ -198,6 +195,8 @@ _bitrate_pass (GtkComboBox *combo,
gtk_widget_hide (gconfig->bitrate.w_average_bitrate);
gtk_widget_show (gconfig->bitrate.w_target_bitrate);
}
gtk_widget_set_sensitive (gconfig->bitrate.update_statfile, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile), TRUE);
break;
}
}
......
......@@ -140,7 +140,7 @@ x264_gtk_encode_encode (X264_Thread_Data *thread_data)
sizeof (X264_Pipe_Data),
&size, NULL);
if (status != G_IO_STATUS_NORMAL) {
g_print (_("Error ! %d %d %d\n"), status, sizeof (X264_Pipe_Data), size);
g_print (_("Error ! %d %d %d\n"), status, (int)sizeof (X264_Pipe_Data), (int)size);
}
else {
/* we force the GIOChannel to write to the pipeline */
......
......@@ -712,7 +712,7 @@ _fill_status_window (GIOChannel *io __UNUSED__,
sizeof (X264_Pipe_Data),
&size, NULL);
if (status != G_IO_STATUS_NORMAL) {
g_print (_("Error ! %d %d %d\n"), status, sizeof (X264_Pipe_Data), size);
g_print (_("Error ! %d %d %d\n"), status, (int)sizeof (X264_Pipe_Data), (int)size);
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment