Remove old nhew example files
[opo.git] / opo.h
blob3c219a02b2c3ef4273100a45baba9c31889156bf
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_loop_end = 0;
19 static char *option_content = NULL;
21 #define MAX_SCREENS 8
22 #define MIN_SCREENS 1
23 #define MAX_X_SCREENS 8
24 #define MIN_X_SCREENS 1
25 #define MAX_PIXELS 999999
28 static GOptionEntry entries[] =
30 { "fake-source", 'F', 0, G_OPTION_ARG_INT, &option_fake,
31 "use videotestsrc (1, 2 ->different patterns)", NULL },
32 { "full-screen", 'f', 0, G_OPTION_ARG_NONE, &option_fullscreen, "run full screen", NULL },
33 { "force-multiscreen", 'm', 0, G_OPTION_ARG_NONE, &option_force_multiscreen,
34 "put windows on proper screens, or crash", NULL },
35 { "x-screens", 'x', 0, G_OPTION_ARG_INT, &option_x_screens,
36 "use this many X screens", NULL },
37 { "loop-end", 'l', 0, G_OPTION_ARG_INT, &option_loop_end,
38 "loop after this many seconds, rather than at end (0 = end)", NULL },
39 { "width", 'w', 0, G_OPTION_ARG_INT, &option_width, "width of each screen", NULL },
40 { "height", 'h', 0, G_OPTION_ARG_INT, &option_height, "height of screen", NULL },
41 { "screens", 's', 0, G_OPTION_ARG_INT, &option_screens, "Use this many screens, (max "
42 QUOTE(MAX_SCREENS) ")", "S" },
43 { "content", 'c', 0, G_OPTION_ARG_FILENAME, &option_content, "Content video file", NULL },
44 { NULL, 0, 0, 0, NULL, NULL, NULL }
47 typedef struct window_s {
48 GstElement *sink;
49 XID xid;
50 GtkWidget *widget;
51 int id;
52 char display[sizeof(":0.00")];
53 } window_t;