<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 01/10/15 06:45, Gordon Nickel wrote:<br>
<blockquote
cite="mid:%3C2480ff5cf9234a51a50f1bc1f19ebf56@MBX13C-ORD1.mex06.mlsrvr.com%3E"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thanks for the
tip Matt. I compiled with the preprocessor output, and
didn't notice anything glaring in the output file (the
macros in question looks like they were parsed correctly).<o:p></o:p></span></p>
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailEndCompose"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><span style="color:#1F497D">To eliminate
any project-specific setup issues, I started a brand new
Win32 project in VS2013 and VS2010, included
<gst/gl/gl.h> (along with relevant incude paths), and
it produced identical syntax errors. If I mouse over the
GST_GL_EXT_FUNCTION (which has the red syntax-error
squiggles underneath it), VS shows: "Error: a calling
convention may not be followed by a nested declarator. "
Investigating that further, I changed the following in
gstglapi.h:
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas;color:blue">#define</span><span
style="font-size:10.0pt;font-family:Consolas"> </span><span
style="font-size:10.0pt;font-family:Consolas;color:#6F008A">GST_GL_EXT_FUNCTION</span><span
style="font-size:10.0pt;font-family:Consolas">(ret, </span><span
style="font-size:10.0pt;font-family:Consolas;color:navy">name</span><span
style="font-size:10.0pt;font-family:Consolas">, args) \<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas"> ret </span><span
style="font-size:10.0pt;font-family:Consolas;color:#6F008A">GSTGLAPI</span><span
style="font-size:10.0pt;font-family:Consolas"> (*</span><span
style="font-size:10.0pt;font-family:Consolas;color:navy">name</span><span
style="font-size:10.0pt;font-family:Consolas">) args;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">To:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas;color:blue">#define</span><span
style="font-size:10.0pt;font-family:Consolas"> </span><span
style="font-size:10.0pt;font-family:Consolas;color:#6F008A">GST_GL_EXT_FUNCTION</span><span
style="font-size:10.0pt;font-family:Consolas">(ret, </span><span
style="font-size:10.0pt;font-family:Consolas;color:navy">name</span><span
style="font-size:10.0pt;font-family:Consolas">, args) \<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas"> ret </span><span
style="font-size:10.0pt;font-family:Consolas;color:#6F008A">GSTGLAPI</span><span
style="font-size:10.0pt;font-family:Consolas"> </span><span
style="font-size:10.0pt;font-family:Consolas;color:navy">name</span><span
style="font-size:10.0pt;font-family:Consolas"> args;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Which was able
to build and run using gl elements in gstreamer (glupload,
glfilterblur, glimagesink). GSTGLAPI eventually points to
_stdcall, so I'm guessing Visual Studio's compiler doesn't
like the pointer syntax for __stdcall? <o:p></o:p></span></p>
</div>
</blockquote>
<br>
Hmm, it looks like that's already been fixed in 1.6 which you may
want to upgrade too. See <a
href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglapi.h#n101"><a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglapi.h#n101">http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglapi.h#n101</a></a>.
It's also fixed in the 1.4 branch but not in a stable release there
yet <a
href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?h=1.4&id=c3ca2f04fe5131362f46ae3fdd12ebe5b3b55773"><a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?h=1.4&id=c3ca2f04fe5131362f46ae3fdd12ebe5b3b55773">http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?h=1.4&id=c3ca2f04fe5131362f46ae3fdd12ebe5b3b55773</a></a><br>
<br>
<blockquote
cite="mid:%3C2480ff5cf9234a51a50f1bc1f19ebf56@MBX13C-ORD1.mex06.mlsrvr.com%3E"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">- Gordon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Matthew Waters
[<a class="moz-txt-link-freetext" href="mailto:ystreet00@gmail.com">mailto:ystreet00@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, September 30, 2015 3:09 AM<br>
<b>To:</b> Gordon Nickel
<a class="moz-txt-link-rfc2396E" href="mailto:gordon.nickel@downstream.com"><gordon.nickel@downstream.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: GstGlApi compile error<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On 30/09/15 10:38, Gordon Nickel wrote:<br>
<br>
<span style="font-size:12.0pt"><o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I'm attempting to use the gl api for
playback in a C++ app, and getting a wall of compile errors
when I include gst/gl/gl.h using 1.6.0 in Windows with
VS2013. The error is:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:Consolas;color:#1E1E1E;background:white;mso-highlight:white">1>c:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\gl\glprototypes\base.h(51):
error C2059: syntax error : '('</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:9.0pt;font-family:Consolas;color:#1E1E1E;background:white;mso-highlight:white">1>c:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\gl\glprototypes\base.h(51):
error C2238: unexpected token(s) preceding ';'</span><o:p></o:p></p>
<p class="MsoNormal"><br>
Which points to this line (and every other line using
GST_GL_EXT_FUNCTION):<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas;color:#6F008A">GST_GL_EXT_FUNCTION</span><span
style="font-size:10.0pt;font-family:Consolas"> (</span><span
style="font-size:10.0pt;font-family:Consolas;color:blue">void</span><span
style="font-size:10.0pt;font-family:Consolas">, BindTexture,</span><o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span
style="font-size:10.0pt;font-family:Consolas"> (</span><span
style="font-size:10.0pt;font-family:Consolas;color:#216F85">GLenum</span><span
style="font-size:10.0pt;font-family:Consolas"> </span><span
style="font-size:10.0pt;font-family:Consolas;color:#216F85">target</span><span
style="font-size:10.0pt;font-family:Consolas">, </span><span
style="font-size:10.0pt;font-family:Consolas;color:#216F85">GLuint</span><span
style="font-size:10.0pt;font-family:Consolas"> </span><span
style="font-size:10.0pt;font-family:Consolas;color:navy">texture</span><span
style="font-size:10.0pt;font-family:Consolas">))</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I've double-checked all the include paths
- is there something I'm missing?
<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><br>
Nothing comes to mind off the top of my head. A simple c++
application that just performs #include <gst/gl/gl.h>
works with both g++ and gcc fine so I'm not sure what the
problem could be without seeing code/more errors. Of course
the real error could be somewhere else that's confusing the
preprocessor into generating bad code. You could try
examining the preprocessor's output see
<a moz-do-not-send="true"
href="https://msdn.microsoft.com/en-us/library/8z9z0bx6.aspx">https://msdn.microsoft.com/en-us/library/8z9z0bx6.aspx</a>.<br>
<br>
Cheers<br>
-Matt<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">Gordon
Nickel</span></b><span style="font-size:10.5pt"><br>
</span><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">Lead
Developer</span><span style="font-size:10.5pt"><br>
<br>
</span><b><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">downstream</span></b><span
style="font-size:10.5pt"><br>
</span><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">1624
NW Johnson Street</span><span style="font-size:10.5pt"><br>
</span><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">Portland,
OR 97209, USA</span><span style="font-size:10.5pt"><br>
<br>
</span><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">503.226.1944
main</span><span style="font-size:10.5pt"><br>
</span><span
style="font-size:10.0pt;font-family:"Tahoma",sans-serif;background:white">503.226.1283
fax</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>