Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fbb36d74
Commit
fbb36d74
authored
Feb 17, 2020
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/opengl_enc: use proper context for logging.
Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
parent
acbd950e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
opengl_enc.c
libavdevice/opengl_enc.c
+10
-9
No files found.
libavdevice/opengl_enc.c
View file @
fbb36d74
...
...
@@ -568,8 +568,9 @@ static void opengl_make_ortho(float matrix[16], float left, float right,
matrix
[
15
]
=
1
.
0
f
;
}
static
av_cold
int
opengl_read_limits
(
OpenGLContext
*
opengl
)
static
av_cold
int
opengl_read_limits
(
AVFormatContext
*
h
)
{
OpenGLContext
*
opengl
=
h
->
priv_data
;
static
const
struct
{
const
char
*
extension
;
int
major
;
...
...
@@ -588,16 +589,16 @@ static av_cold int opengl_read_limits(OpenGLContext *opengl)
version
=
glGetString
(
GL_VERSION
);
extensions
=
glGetString
(
GL_EXTENSIONS
);
av_log
(
opengl
,
AV_LOG_DEBUG
,
"OpenGL version: %s
\n
"
,
version
);
av_log
(
h
,
AV_LOG_DEBUG
,
"OpenGL version: %s
\n
"
,
version
);
sscanf
(
version
,
"%d.%d"
,
&
major
,
&
minor
);
for
(
i
=
0
;
required_extensions
[
i
].
extension
;
i
++
)
{
if
(
major
<
required_extensions
[
i
].
major
&&
(
major
==
required_extensions
[
i
].
major
&&
minor
<
required_extensions
[
i
].
minor
)
&&
!
strstr
(
extensions
,
required_extensions
[
i
].
extension
))
{
av_log
(
opengl
,
AV_LOG_ERROR
,
"Required extension %s is not supported.
\n
"
,
av_log
(
h
,
AV_LOG_ERROR
,
"Required extension %s is not supported.
\n
"
,
required_extensions
[
i
].
extension
);
av_log
(
opengl
,
AV_LOG_DEBUG
,
"Supported extensions are: %s
\n
"
,
extensions
);
av_log
(
h
,
AV_LOG_DEBUG
,
"Supported extensions are: %s
\n
"
,
extensions
);
return
AVERROR
(
ENOSYS
);
}
}
...
...
@@ -610,10 +611,10 @@ static av_cold int opengl_read_limits(OpenGLContext *opengl)
opengl
->
unpack_subimage
=
1
;
#endif
av_log
(
opengl
,
AV_LOG_DEBUG
,
"Non Power of 2 textures support: %s
\n
"
,
opengl
->
non_pow_2_textures
?
"Yes"
:
"No"
);
av_log
(
opengl
,
AV_LOG_DEBUG
,
"Unpack Subimage extension support: %s
\n
"
,
opengl
->
unpack_subimage
?
"Yes"
:
"No"
);
av_log
(
opengl
,
AV_LOG_DEBUG
,
"Max texture size: %dx%d
\n
"
,
opengl
->
max_texture_size
,
opengl
->
max_texture_size
);
av_log
(
opengl
,
AV_LOG_DEBUG
,
"Max viewport size: %dx%d
\n
"
,
av_log
(
h
,
AV_LOG_DEBUG
,
"Non Power of 2 textures support: %s
\n
"
,
opengl
->
non_pow_2_textures
?
"Yes"
:
"No"
);
av_log
(
h
,
AV_LOG_DEBUG
,
"Unpack Subimage extension support: %s
\n
"
,
opengl
->
unpack_subimage
?
"Yes"
:
"No"
);
av_log
(
h
,
AV_LOG_DEBUG
,
"Max texture size: %dx%d
\n
"
,
opengl
->
max_texture_size
,
opengl
->
max_texture_size
);
av_log
(
h
,
AV_LOG_DEBUG
,
"Max viewport size: %dx%d
\n
"
,
opengl
->
max_viewport_width
,
opengl
->
max_viewport_height
);
OPENGL_ERROR_CHECK
(
opengl
);
...
...
@@ -1074,7 +1075,7 @@ static av_cold int opengl_write_header(AVFormatContext *h)
if
((
ret
=
opengl_create_window
(
h
)))
goto
fail
;
if
((
ret
=
opengl_read_limits
(
opengl
))
<
0
)
if
((
ret
=
opengl_read_limits
(
h
))
<
0
)
goto
fail
;
if
(
opengl
->
width
>
opengl
->
max_texture_size
||
opengl
->
height
>
opengl
->
max_texture_size
)
{
...
...
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