]> git.sesse.net Git - x264/blob - gtk/test.c
cosmetics in DECLARE_ALIGNED
[x264] / gtk / test.c
1 #include <stdint.h>
2 #include <string.h>
3
4 #include <gtk/gtk.h>
5
6 #include "../x264.h"
7 #include "../common/common.h"
8
9 #include "x264_gtk.h"
10 #include "x264_gtk_private.h"
11 #include "x264_gtk_i18n.h"
12
13
14 int
15 main (int argc, char *argv[])
16 {
17   GtkWidget    *window;
18   X264_Gtk     *x264_gtk;
19   x264_param_t *param;
20   x264_param_t  param_default;
21   char         *res;
22   char         *res_default;
23
24   BIND_X264_TEXTDOMAIN();
25
26   gtk_init (&argc, &argv);
27
28   window = x264_gtk_window_create (NULL);
29   x264_gtk_shutdown (window);
30
31   x264_gtk = x264_gtk_load ();
32   param = x264_gtk_param_get (x264_gtk);
33
34   /* do what you want with these data */
35   /* for example, displaying them and compare with default*/
36   res = x264_param2string (param, 0);
37   printf ("%s\n", res);
38
39   x264_param_default (&param_default);
40   res_default = x264_param2string (&param_default, 0);
41   printf ("\n%s\n", res_default);
42
43   if (strcmp (res, res_default) == 0)
44     printf (_("\nSame result !\n"));
45   else
46     printf (_("\nDifferent from default values\n"));
47
48   x264_free (res);
49   x264_free (res_default);
50
51   x264_gtk_free (x264_gtk);
52   g_free (param);
53
54   return 1;
55 }