better quality defaults for some, worse for others
[opo.git] / opo.h
blobe295b7bdedbb20cb5bb646e815c07c0ec58e3047
1 #define QUOTE_(x) #x
2 #define QUOTE(x) QUOTE_(x)
4 //default per-screen size
5 #define DEFAULT_WIDTH (640 / 4)
6 #define DEFAULT_HEIGHT 480
7 #define BILLION ((guint64)(1000 * 1000 * 1000))
8 #define NS_PER_FRAME ((guint64)(BILLION / 25))
10 static gint option_fake = 0;
11 static gboolean option_force_multiscreen = FALSE;
12 static gboolean option_fullscreen = FALSE;
13 static gint option_x_screens = 1;
14 static gint option_screens = 4;
15 static gint option_width = 0;
16 static gint option_height = 0;
17 static gint option_autosize = 0; //not actually exposed to commandline
18 static guint option_pipeline_cycles = 0;
19 static guint option_loop_end = 0;
20 static char *option_content = NULL;
22 #define MAX_SCREENS 8
23 #define MIN_SCREENS 1
24 #define MAX_X_SCREENS 8
25 #define MIN_X_SCREENS 1
26 #define MAX_PIXELS 999999
29 static GOptionEntry entries[] =
31 { "fake-source", 'F', 0, G_OPTION_ARG_INT, &option_fake,
32 "use videotestsrc (1, 2 ->different patterns)", NULL },
33 { "full-screen", 'f', 0, G_OPTION_ARG_NONE, &option_fullscreen, "run full screen", NULL },
34 { "force-multiscreen", 'm', 0, G_OPTION_ARG_NONE, &option_force_multiscreen,
35 "put windows on proper screens, or crash", NULL },
36 { "x-screens", 'x', 0, G_OPTION_ARG_INT, &option_x_screens,
37 "use this many X screens", NULL },
38 { "pipeline-cycles", 'p', 0, G_OPTION_ARG_INT, &option_pipeline_cycles,
39 "reuse the same pipeline this many times (default 0 = infinite)", NULL },
40 { "loop-end", 'l', 0, G_OPTION_ARG_INT, &option_loop_end,
41 "loop after this many seconds, rather than at end (0 = end)", NULL },
42 { "width", 'w', 0, G_OPTION_ARG_INT, &option_width, "width of each screen", NULL },
43 { "height", 'h', 0, G_OPTION_ARG_INT, &option_height, "height of screen", NULL },
44 { "screens", 's', 0, G_OPTION_ARG_INT, &option_screens, "Use this many screens, (max "
45 QUOTE(MAX_SCREENS) ")", "S" },
46 { "content", 'c', 0, G_OPTION_ARG_FILENAME, &option_content, "Content video file", NULL },
47 { NULL, 0, 0, 0, NULL, NULL, NULL }
50 typedef struct window_s {
51 GstElement *sink;
52 XID xid;
53 GtkWidget *widget;
54 int id;
55 char display[sizeof(":0.00")];
56 } window_t;