summaryrefslogtreecommitdiff
path: root/sys/winscreencap/gstgdiscreencapsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/winscreencap/gstgdiscreencapsrc.c')
-rw-r--r--sys/winscreencap/gstgdiscreencapsrc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/winscreencap/gstgdiscreencapsrc.c b/sys/winscreencap/gstgdiscreencapsrc.c
index ff9ea7b72..7658b2ea2 100644
--- a/sys/winscreencap/gstgdiscreencapsrc.c
+++ b/sys/winscreencap/gstgdiscreencapsrc.c
@@ -316,7 +316,8 @@ gst_gdiscreencapsrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
src->src_rect.bottom = src->src_rect.top + src->capture_h;
}
- if (framerate = gst_structure_get_value (structure, "framerate")) {
+ framerate = gst_structure_get_value (structure, "framerate");
+ if (framerate) {
src->rate_numerator = gst_value_get_fraction_numerator (framerate);
src->rate_denominator = gst_value_get_fraction_denominator (framerate);
}
@@ -350,8 +351,8 @@ gst_gdiscreencapsrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
ReleaseDC (capture, device);
GST_DEBUG_OBJECT (src, "size %dx%d, %d/%d fps",
- src->info.bmiHeader.biWidth,
- -src->info.bmiHeader.biHeight,
+ (gint) src->info.bmiHeader.biWidth,
+ (gint) (-src->info.bmiHeader.biHeight),
src->rate_numerator, src->rate_denominator);
return TRUE;
@@ -379,7 +380,8 @@ gst_gdiscreencapsrc_get_caps (GstBaseSrc * bsrc)
}
GST_DEBUG ("width = %d, height=%d",
- rect_dst.right - rect_dst.left, rect_dst.bottom - rect_dst.top);
+ (gint) (rect_dst.right - rect_dst.left),
+ (gint) (rect_dst.bottom - rect_dst.top));
return gst_caps_new_simple ("video/x-raw-rgb",
"bpp", G_TYPE_INT, 24,
@@ -417,7 +419,6 @@ static void
gst_gdiscreencapsrc_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
{
- GstGDIScreenCapSrc *src = GST_GDISCREENCAPSRC (basesrc);
GstClockTime timestamp;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
@@ -439,7 +440,7 @@ gst_gdiscreencapsrc_create (GstPushSrc * push_src, GstBuffer ** buf)
GstFlowReturn res;
gint new_buf_size;
GstClock *clock;
- GstClockTime time;
+ GstClockTime time = GST_CLOCK_TIME_NONE;
GstClockTime base_time;
if (G_UNLIKELY (!src->info.bmiHeader.biWidth ||
@@ -456,9 +457,9 @@ gst_gdiscreencapsrc_create (GstPushSrc * push_src, GstBuffer ** buf)
(-src->info.bmiHeader.biHeight);
GST_LOG_OBJECT (src,
- "creating buffer of %lu bytes with %dx%d image for frame %d",
- new_buf_size, src->info.bmiHeader.biWidth,
- -src->info.bmiHeader.biHeight, (gint) src->frames);
+ "creating buffer of %d bytes with %dx%d image for frame %d",
+ new_buf_size, (gint) src->info.bmiHeader.biWidth,
+ (gint) (-src->info.bmiHeader.biHeight), (gint) src->frames);
res =
gst_pad_alloc_buffer_and_set_caps (GST_BASE_SRC_PAD (src),