mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
[295/906] Fix indention
This commit is contained in:
parent
532ea881fb
commit
4525015dc6
2 changed files with 65 additions and 52 deletions
|
@ -20,7 +20,8 @@ expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
|
||||||
GST_X_OVERLAY (gst_bin_get_by_interface (GST_BIN (data),
|
GST_X_OVERLAY (gst_bin_get_by_interface (GST_BIN (data),
|
||||||
GST_TYPE_X_OVERLAY));
|
GST_TYPE_X_OVERLAY));
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
gst_x_overlay_set_xwindow_id (overlay, (gulong)GDK_WINDOW_HWND(widget->window));
|
gst_x_overlay_set_xwindow_id (overlay,
|
||||||
|
(gulong) GDK_WINDOW_HWND (widget->window));
|
||||||
#else
|
#else
|
||||||
gst_x_overlay_set_xwindow_id (overlay, GDK_WINDOW_XWINDOW (widget->window));
|
gst_x_overlay_set_xwindow_id (overlay, GDK_WINDOW_XWINDOW (widget->window));
|
||||||
#endif
|
#endif
|
||||||
|
@ -112,7 +113,8 @@ main (gint argc, gchar * argv[])
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"source-bin", 's', 0, G_OPTION_ARG_STRING_ARRAY, &source_desc_array,
|
{"source-bin", 's', 0, G_OPTION_ARG_STRING_ARRAY, &source_desc_array,
|
||||||
"Use a custom source bin description (gst-launch style)", NULL },
|
"Use a custom source bin description (gst-launch style)", NULL}
|
||||||
|
,
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,10 +135,13 @@ main (gint argc, gchar * argv[])
|
||||||
g_strfreev (source_desc_array);
|
g_strfreev (source_desc_array);
|
||||||
}
|
}
|
||||||
if (source_desc == NULL) {
|
if (source_desc == NULL) {
|
||||||
source_desc = g_strdup ("videotestsrc ! video/x-raw-rgb, width=352, height=288 ! identity");
|
source_desc =
|
||||||
|
g_strdup
|
||||||
|
("videotestsrc ! video/x-raw-rgb, width=352, height=288 ! identity");
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcebin = gst_parse_bin_from_description (g_strdup (source_desc), TRUE, &error);
|
sourcebin =
|
||||||
|
gst_parse_bin_from_description (g_strdup (source_desc), TRUE, &error);
|
||||||
g_free (source_desc);
|
g_free (source_desc);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_print ("Error while parsing source bin description: %s\n",
|
g_print ("Error while parsing source bin description: %s\n",
|
||||||
|
|
|
@ -113,8 +113,7 @@ set_location_delayed (gpointer data)
|
||||||
static void
|
static void
|
||||||
on_drag_data_received (GtkWidget * widget,
|
on_drag_data_received (GtkWidget * widget,
|
||||||
GdkDragContext * context, int x, int y,
|
GdkDragContext * context, int x, int y,
|
||||||
GtkSelectionData * seldata, guint inf, guint time,
|
GtkSelectionData * seldata, guint inf, guint time, gpointer data)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
GdkPixbufFormat *format;
|
GdkPixbufFormat *format;
|
||||||
SourceData *userdata = g_new0 (SourceData, 1);
|
SourceData *userdata = g_new0 (SourceData, 1);
|
||||||
|
@ -132,9 +131,9 @@ on_drag_data_received (GtkWidget * widget,
|
||||||
if (delay > 0) {
|
if (delay > 0) {
|
||||||
g_print ("%d\n", delay);
|
g_print ("%d\n", delay);
|
||||||
g_timeout_add_seconds (1, set_location_delayed, userdata);
|
g_timeout_add_seconds (1, set_location_delayed, userdata);
|
||||||
}
|
} else
|
||||||
else
|
g_object_set (G_OBJECT (userdata->data), userdata->nick, userdata->value,
|
||||||
g_object_set (G_OBJECT (userdata->data), userdata->nick, userdata->value, NULL);
|
NULL);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,9 +160,15 @@ main (gint argc, gchar * argv[])
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"source-bin", 's', 0, G_OPTION_ARG_STRING_ARRAY, &source_desc_array,
|
{"source-bin", 's', 0, G_OPTION_ARG_STRING_ARRAY, &source_desc_array,
|
||||||
"Use a custom source bin description (gst-launch style)", NULL },
|
"Use a custom source bin description (gst-launch style)", NULL}
|
||||||
{ "method", 'm', 0, G_OPTION_ARG_INT, &method, "1 for gstdifferencematte, 2 for gstpixbufoverlay", "M" },
|
,
|
||||||
{ "delay", 'd', 0, G_OPTION_ARG_INT, &delay, "Wait N seconds before to send the image to gstreamer (useful with differencematte)", "N" },
|
{"method", 'm', 0, G_OPTION_ARG_INT, &method,
|
||||||
|
"1 for gstdifferencematte, 2 for gstpixbufoverlay", "M"}
|
||||||
|
,
|
||||||
|
{"delay", 'd', 0, G_OPTION_ARG_INT, &delay,
|
||||||
|
"Wait N seconds before to send the image to gstreamer (useful with differencematte)",
|
||||||
|
"N"}
|
||||||
|
,
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -184,10 +189,13 @@ main (gint argc, gchar * argv[])
|
||||||
g_strfreev (source_desc_array);
|
g_strfreev (source_desc_array);
|
||||||
}
|
}
|
||||||
if (source_desc == NULL) {
|
if (source_desc == NULL) {
|
||||||
source_desc = g_strdup ("videotestsrc ! video/x-raw-rgb, width=352, height=288 ! identity");
|
source_desc =
|
||||||
|
g_strdup
|
||||||
|
("videotestsrc ! video/x-raw-rgb, width=352, height=288 ! identity");
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcebin = gst_parse_bin_from_description (g_strdup (source_desc), TRUE, &error);
|
sourcebin =
|
||||||
|
gst_parse_bin_from_description (g_strdup (source_desc), TRUE, &error);
|
||||||
g_free (source_desc);
|
g_free (source_desc);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_print ("Error while parsing source bin description: %s\n",
|
g_print ("Error while parsing source bin description: %s\n",
|
||||||
|
|
Loading…
Reference in a new issue