Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
e9f34b05
Commit
e9f34b05
authored
Oct 30, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VAAPI: use vlc_xlib_init()
parent
595d1057
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
modules/codec/avcodec/va.h
modules/codec/avcodec/va.h
+1
-1
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+3
-7
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+1
-1
No files found.
modules/codec/avcodec/va.h
View file @
e9f34b05
...
...
@@ -58,7 +58,7 @@ static inline void vlc_va_Delete(vlc_va_t *va)
va
->
close
(
va
);
}
vlc_va_t
*
vlc_va_NewVaapi
(
int
codec_id
);
vlc_va_t
*
vlc_va_NewVaapi
(
vlc_object_t
*
obj
,
int
codec_id
);
vlc_va_t
*
vlc_va_NewDxva2
(
vlc_object_t
*
log
,
int
codec_id
);
#endif
...
...
modules/codec/avcodec/vaapi.c
View file @
e9f34b05
...
...
@@ -27,6 +27,7 @@
#include <vlc_common.h>
#include <vlc_fourcc.h>
#include <vlc_xlib.h>
#include <assert.h>
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
...
...
@@ -473,14 +474,9 @@ static void Delete( vlc_va_t *p_external )
}
/* */
vlc_va_t
*
vlc_va_NewVaapi
(
int
i_codec_id
)
vlc_va_t
*
vlc_va_NewVaapi
(
vlc_object_t
*
obj
,
int
i_codec_id
)
{
bool
fail
;
vlc_global_lock
(
VLC_XLIB_MUTEX
);
fail
=
!
XInitThreads
();
vlc_global_unlock
(
VLC_XLIB_MUTEX
);
if
(
unlikely
(
fail
)
)
if
(
!
vlc_xlib_init
(
obj
)
)
return
NULL
;
vlc_va_vaapi_t
*
p_va
=
calloc
(
1
,
sizeof
(
*
p_va
)
);
...
...
modules/codec/avcodec/video.c
View file @
e9f34b05
...
...
@@ -1136,7 +1136,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
}
#ifdef HAVE_AVCODEC_VAAPI
msg_Dbg
(
p_dec
,
"Trying VA API"
);
p_sys
->
p_va
=
vlc_va_NewVaapi
(
p_sys
->
i_codec_id
);
p_sys
->
p_va
=
vlc_va_NewVaapi
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
);
if
(
!
p_sys
->
p_va
)
msg_Warn
(
p_dec
,
"Failed to open VA API"
);
#else
...
...
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