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);
}
GST_DEBUG_OBJECT (src, "size %dx%d, %d/%d fps",
- src->src_rect.right - src->src_rect.left,
- src->src_rect.bottom - src->src_rect.top,
+ (gint) (src->src_rect.right - src->src_rect.left),
+ (gint) (src->src_rect.bottom - src->src_rect.top),
src->rate_numerator, src->rate_denominator);
return TRUE;
depth = 15;
endianness = G_BYTE_ORDER;
alpha = GST_VIDEO_ALPHA_MASK_15_INT;
- red = GST_VIDEO_RED_MASK_15_INT;
- green = GST_VIDEO_GREEN_MASK_15_INT;
- blue = GST_VIDEO_BLUE_MASK_15_INT;
+ red = GST_VIDEO_COMP1_MASK_15_INT;
+ green = GST_VIDEO_COMP2_MASK_15_INT;
+ blue = GST_VIDEO_COMP3_MASK_15_INT;
break;
case D3DFMT_X1R5G5B5:
bpp = 16;
depth = 15;
endianness = G_BYTE_ORDER;
alpha = 0;
- red = GST_VIDEO_RED_MASK_15_INT;
- green = GST_VIDEO_GREEN_MASK_15_INT;
- blue = GST_VIDEO_BLUE_MASK_15_INT;
+ red = GST_VIDEO_COMP1_MASK_15_INT;
+ green = GST_VIDEO_COMP2_MASK_15_INT;
+ blue = GST_VIDEO_COMP3_MASK_15_INT;
break;
case D3DFMT_R5G6B5:
bpp = depth = 16;
endianness = G_BYTE_ORDER;
alpha = 0;
- red = GST_VIDEO_RED_MASK_16_INT;
- green = GST_VIDEO_GREEN_MASK_16_INT;
- blue = GST_VIDEO_BLUE_MASK_16_INT;
+ red = GST_VIDEO_COMP1_MASK_15_INT;
+ green = GST_VIDEO_COMP2_MASK_15_INT;
+ blue = GST_VIDEO_COMP3_MASK_15_INT;
break;
default:
return NULL;
gst_dx9screencapsrc_get_times (GstBaseSrc * basesrc,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end)
{
- GstDX9ScreenCapSrc *src = GST_DX9SCREENCAPSRC (basesrc);
GstClockTime timestamp;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
gint new_buf_size, i;
gint width, height, stride;
GstClock *clock;
- GstClockTime time, buf_time;
+ GstClockTime time = GST_CLOCK_TIME_NONE;
+ GstClockTime buf_time;
D3DLOCKED_RECT locked_rect;
LPBYTE p_dst, p_src;
HRESULT hres;
}
GST_LOG_OBJECT (src,
- "creating buffer of %lu bytes with %dx%d image for frame %d",
+ "creating buffer of %d bytes with %dx%d image for frame %d",
new_buf_size, width, height, (gint) src->frames);
res = gst_pad_alloc_buffer_and_set_caps (GST_BASE_SRC_PAD (src),
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);
}
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;
}
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,
gst_gdiscreencapsrc_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
{
- GstGDIScreenCapSrc *src = GST_GDISCREENCAPSRC (basesrc);
GstClockTime timestamp;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
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 ||
(-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),