Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GStreamer
gst-plugins-base
Commits
0eefcb23
Commit
0eefcb23
authored
Dec 11, 2017
by
Tim-Philipp Müller
🐠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gl: examples: fix c++ code for -Wreturn-aggregate
.. and use #ifdef instead of #if
parent
26b3955a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
tests/examples/gl/generic/cubeyuv/main.cpp
tests/examples/gl/generic/cubeyuv/main.cpp
+3
-4
tests/examples/gl/generic/doublecube/main.cpp
tests/examples/gl/generic/doublecube/main.cpp
+3
-4
tests/examples/gl/generic/recordgraphic/main.cpp
tests/examples/gl/generic/recordgraphic/main.cpp
+1
-1
No files found.
tests/examples/gl/generic/cubeyuv/main.cpp
View file @
0eefcb23
...
...
@@ -73,10 +73,9 @@ static void identityCallback (GstElement *src, GstBuffer *buffer, GstElement* t
nbFrames
++
;
if
(
GST_BUFFER_TIMESTAMP
(
buffer
)
-
last_timestamp
>=
1000000000
)
{
std
::
ostringstream
oss
;
oss
<<
"video framerate = "
<<
nbFrames
;
std
::
string
s
(
oss
.
str
())
;
g_object_set
(
G_OBJECT
(
textoverlay
),
"text"
,
s
.
c_str
(),
NULL
);
gchar
*
s
=
g_strdup_printf
(
"video framerate = %d"
,
nbFrames
);
g_object_set
(
G_OBJECT
(
textoverlay
),
"text"
,
s
,
NULL
);
g_free
(
s
);
last_timestamp
=
GST_BUFFER_TIMESTAMP
(
buffer
)
;
nbFrames
=
0
;
}
...
...
tests/examples/gl/generic/doublecube/main.cpp
View file @
0eefcb23
...
...
@@ -73,10 +73,9 @@ static GstPadProbeReturn textoverlay_sink_pad_probe_cb (GstPad *pad, GstPadProbe
nbFrames
++
;
if
(
GST_BUFFER_TIMESTAMP
(
info
->
data
)
-
last_timestamp
>=
1000000000
)
{
std
::
ostringstream
oss
;
oss
<<
"video framerate = "
<<
nbFrames
;
std
::
string
s
(
oss
.
str
());
g_object_set
(
G_OBJECT
(
textoverlay
),
"text"
,
s
.
c_str
(),
NULL
);
gchar
*
s
=
g_strdup_printf
(
"video framerate = %d"
,
nbFrames
);
g_object_set
(
G_OBJECT
(
textoverlay
),
"text"
,
s
,
NULL
);
g_free
(
s
);
last_timestamp
=
GST_BUFFER_TIMESTAMP
(
info
->
data
)
;
nbFrames
=
0
;
}
...
...
tests/examples/gl/generic/recordgraphic/main.cpp
View file @
0eefcb23
...
...
@@ -19,7 +19,7 @@
*/
#include <GL/gl.h>
#if __WIN32__ || _WIN32
#if
defined(
__WIN32__
)
||
defined(
_WIN32
)
# include <GL/glext.h>
#endif
#include <gst/gst.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment