plugins: Use explicit type conversion from enums

MSVC warns about this because it's a C++ compiler, and this actually
results in useful things such as the incorrect 'gboolean' return value
for functions that return GstFlowReturn, so let's do explicit
conversions to reduce the noise and increase its efficacy.
This commit is contained in:
Nirbheek Chauhan 2016-10-27 09:25:20 +05:30
parent f790863755
commit bb0a83b018
3 changed files with 7 additions and 5 deletions

View file

@ -247,7 +247,8 @@ strip_mview_fields (GstCaps * incaps, GstVideoMultiviewFlags keep_flags)
GstVideoMultiviewFlags flags, mask;
gst_structure_remove_field (st, "multiview-mode");
if (gst_structure_get_flagset (st, "multiview-flags", &flags, &mask)) {
if (gst_structure_get_flagset (st, "multiview-flags", (guint*) &flags,
(guint*) &mask)) {
flags &= keep_flags;
mask = keep_flags;
gst_structure_set (st, "multiview-flags",

View file

@ -794,9 +794,9 @@ gst_openh264enc_handle_frame (GstVideoEncoder * encoder,
openh264enc->time_per_frame = (GST_SECOND / openh264enc->framerate);
openh264enc->previous_timestamp = frame->pts;
} else {
openh264enc->time_per_frame =
openh264enc->time_per_frame * 0.8 + (frame->pts -
openh264enc->previous_timestamp) * 0.2;
openh264enc->time_per_frame = (guint64)
(openh264enc->time_per_frame * 0.8 + (frame->pts -
openh264enc->previous_timestamp) * 0.2);
openh264enc->previous_timestamp = frame->pts;
if (openh264enc->frame_count % 10 == 0) {
fps = GST_SECOND / (gdouble) openh264enc->time_per_frame;

View file

@ -1829,7 +1829,8 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
/* Pass through or set output stereo/multiview config */
if (s && gst_structure_has_field (s, "multiview-mode")) {
caps_mview_mode = gst_structure_get_string (s, "multiview-mode");
gst_structure_get_flagset (s, "multiview-flags", &mview_flags, NULL);
gst_structure_get_flagset (s, "multiview-flags", (guint*) &mview_flags,
NULL);
} else if (mview_mode != GST_VIDEO_MULTIVIEW_MODE_NONE) {
if (gst_video_multiview_guess_half_aspect (mview_mode,
width, height, par_n, par_d)) {