mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
plugins: use GstVideoInfo accessors
Instead of access to GstVideInfo members directly, use their accessors macros. This patch makes more resistance to future changes in GStreamer core.
This commit is contained in:
parent
d69917ecca
commit
4dd2464060
3 changed files with 11 additions and 12 deletions
|
@ -506,7 +506,7 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
|
|||
gst_video_info_set_format (&vi, GST_VIDEO_FORMAT_NV12,
|
||||
GST_VIDEO_INFO_WIDTH (&vi), GST_VIDEO_INFO_HEIGHT (&vi));
|
||||
}
|
||||
plugin->sinkpad_buffer_size = vi.size;
|
||||
plugin->sinkpad_buffer_size = GST_VIDEO_INFO_SIZE (&vi);
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
gst_buffer_pool_config_set_params (config, caps,
|
||||
|
@ -701,7 +701,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
if (gst_query_get_n_allocation_pools (query) > 0) {
|
||||
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
||||
update_pool = TRUE;
|
||||
size = MAX (size, vi.size);
|
||||
size = MAX (size, GST_VIDEO_INFO_SIZE (&vi));
|
||||
if (pool) {
|
||||
/* Check whether downstream element proposed a bufferpool but did
|
||||
not provide a correct propose_allocation() implementation */
|
||||
|
@ -710,7 +710,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
}
|
||||
} else {
|
||||
pool = NULL;
|
||||
size = vi.size;
|
||||
size = GST_VIDEO_INFO_SIZE (&vi);
|
||||
min = max = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -659,14 +659,13 @@ gst_video_info_change_format (GstVideoInfo * vip, GstVideoFormat format,
|
|||
|
||||
gst_video_info_set_format (vip, format, width, height);
|
||||
|
||||
vip->interlace_mode = vi.interlace_mode;
|
||||
vip->flags = vi.flags;
|
||||
vip->views = vi.views;
|
||||
vip->par_n = vi.par_n;
|
||||
vip->par_d = vi.par_d;
|
||||
vip->fps_n = vi.fps_n;
|
||||
vip->fps_d = vi.fps_d;
|
||||
|
||||
GST_VIDEO_INFO_INTERLACE_MODE (vip) = GST_VIDEO_INFO_INTERLACE_MODE (&vi);
|
||||
GST_VIDEO_FORMAT_INFO_FLAGS (vip) = GST_VIDEO_FORMAT_INFO_FLAGS (&vi);
|
||||
GST_VIDEO_INFO_VIEWS (vip) = GST_VIDEO_INFO_VIEWS (&vi);
|
||||
GST_VIDEO_INFO_PAR_N (vip) = GST_VIDEO_INFO_PAR_N (&vi);
|
||||
GST_VIDEO_INFO_PAR_D (vip) = GST_VIDEO_INFO_PAR_D (&vi);
|
||||
GST_VIDEO_INFO_FPS_N (vip) = GST_VIDEO_INFO_FPS_N (&vi);
|
||||
GST_VIDEO_INFO_FPS_D (vip) = GST_VIDEO_INFO_FPS_D (&vi);
|
||||
GST_VIDEO_INFO_MULTIVIEW_MODE (vip) = GST_VIDEO_INFO_MULTIVIEW_MODE (&vi);
|
||||
GST_VIDEO_INFO_MULTIVIEW_FLAGS (vip) = GST_VIDEO_INFO_MULTIVIEW_FLAGS (&vi);
|
||||
}
|
||||
|
|
|
@ -1308,7 +1308,7 @@ gst_vaapisink_set_caps (GstBaseSink * base_sink, GstCaps * caps)
|
|||
GST_DEBUG ("video pixel-aspect-ratio %d/%d",
|
||||
sink->video_par_n, sink->video_par_d);
|
||||
|
||||
update_colorimetry (sink, &vip->colorimetry);
|
||||
update_colorimetry (sink, &GST_VIDEO_INFO_COLORIMETRY (vip));
|
||||
gst_caps_replace (&sink->caps, caps);
|
||||
|
||||
gst_vaapisink_ensure_colorbalance (sink);
|
||||
|
|
Loading…
Reference in a new issue