summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/video/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/video/video.c')
-rw-r--r--gst-libs/gst/video/video.c47
1 files changed, 16 insertions, 31 deletions
diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 114b4bac..8fed1e76 100644
--- a/gst-libs/gst/video/video.c
+++ b/gst-libs/gst/video/video.c
@@ -27,7 +27,7 @@
/* This is simply a convenience function, nothing more or less */
gdouble
-gst_video_frame_rate (GstPad *pad)
+gst_video_frame_rate (GstPad * pad)
{
gdouble fps = 0.;
const GstCaps *caps = NULL;
@@ -37,30 +37,25 @@ gst_video_frame_rate (GstPad *pad)
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME(pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0.;
}
structure = gst_caps_get_structure (caps, 0);
- if (!gst_structure_get_double (structure, "framerate", &fps)){
+ if (!gst_structure_get_double (structure, "framerate", &fps)) {
g_warning ("gstvideo: failed to get framerate property of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0.;
}
GST_DEBUG ("Framerate request on pad %s:%s: %f",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME(pad), fps);
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad), fps);
return fps;
}
gboolean
-gst_video_get_size (GstPad *pad,
- gint *width,
- gint *height)
+gst_video_get_size (GstPad * pad, gint * width, gint * height)
{
const GstCaps *caps = NULL;
GstStructure *structure;
@@ -74,8 +69,7 @@ gst_video_get_size (GstPad *pad,
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME(pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return FALSE;
}
@@ -85,34 +79,25 @@ gst_video_get_size (GstPad *pad,
if (!ret) {
g_warning ("gstvideo: failed to get size properties on pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME(pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return FALSE;
}
GST_DEBUG ("size request on pad %s:%s: %dx%d",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
- GST_PAD_NAME (pad),
- width ? *width : -1,
- height ? *height : -1);
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
+ GST_PAD_NAME (pad), width ? *width : -1, height ? *height : -1);
return TRUE;
}
static gboolean
-plugin_init (GstPlugin *plugin)
+plugin_init (GstPlugin * plugin)
{
return TRUE;
}
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "gstvideo",
- "Convenience routines for video plugins",
- plugin_init,
- VERSION,
- GST_LICENSE,
- GST_PACKAGE,
- GST_ORIGIN
-)
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "gstvideo",
+ "Convenience routines for video plugins",
+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)