After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780064 - gstglformat.c fails to compile with a warning.
gstglformat.c fails to compile with a warning.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.11.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-14 21:24 UTC by Scott D Phillips
Modified: 2017-03-15 03:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH gst-plugins-bad] gl/format: correct return enums in gst_gl_format_from_video_info (1.44 KB, patch)
2017-03-14 21:24 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v2] gl/format: correct return enums in gst_gl_format_from_video_info (1.36 KB, patch)
2017-03-14 23:50 UTC, Scott D Phillips
committed Details | Review

Description Scott D Phillips 2017-03-14 21:24:52 UTC
Created attachment 347956 [details] [review]
[PATCH gst-plugins-bad] gl/format: correct return enums in gst_gl_format_from_video_info

../subprojects/gst-plugins-bad/gst-libs/gst/gl/gstglformat.c:157:14: error: implicit conversion from enumeration type 'GstVideoGLTextureType' to different enumeration type 'GstGLFormat' [-Werror,-Wenum-conversion]                                                                                                                                    
      return GST_VIDEO_GL_TEXTURE_TYPE_RGB16;
      ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/gst-plugins-bad/gst-libs/gst/gl/gstglformat.c:200:10: error: implicit conversion from enumeration type 'GstVideoGLTextureType' to different enumeration type 'GstGLFormat' [-Werror,-Wenum-conversion]                                                                                                                                    
  return GST_VIDEO_GL_TEXTURE_TYPE_RGBA;
  ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Matthew Waters (ystreet00) 2017-03-14 23:47:10 UTC
Review of attachment 347956 [details] [review]:

Not quite correct.

::: gst-libs/gst/gl/gstglformat.c
@@ -152,3 @@
     case GST_VIDEO_FORMAT_BGR:
-      n_plane_components = 3;
-      break;

This needs to stay

@@ +153,3 @@
     case GST_VIDEO_FORMAT_RGB16:
     case GST_VIDEO_FORMAT_BGR16:
+      n_plane_components = 3;

This should be return GST_GL_RGB565
Comment 2 Scott D Phillips 2017-03-14 23:50:29 UTC
Created attachment 347967 [details] [review]
[PATCH gst-plugins-bad v2] gl/format: correct return enums in gst_gl_format_from_video_info
Comment 3 Matthew Waters (ystreet00) 2017-03-15 03:37:29 UTC
commit 1586357a2fa67e04f7cd9d98daf79194491a85fc
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Tue Mar 14 14:18:17 2017 -0700

    gl/format: correct return enums in gst_gl_format_from_video_info
    
    In commit
    
    > 956c4d0 gl/format: use our own GL format enum's instead of gstvideo's
    
    the name and return type of gst_gl_format_from_video_info changed,
    but some returns of the old type were missed. Here they are
    updated to the correct type.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780064