Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
d4d02c57
Commit
d4d02c57
authored
Mar 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
va: pass AVCodecContext pointer (inner part)
parent
d7b9acc0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
18 deletions
+21
-18
modules/codec/avcodec/dxva2.c
modules/codec/avcodec/dxva2.c
+4
-3
modules/codec/avcodec/hwdummy.c
modules/codec/avcodec/hwdummy.c
+3
-3
modules/codec/avcodec/va.c
modules/codec/avcodec/va.c
+2
-2
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+4
-3
modules/codec/avcodec/vda.c
modules/codec/avcodec/vda.c
+4
-3
modules/hw/vdpau/avcodec.c
modules/hw/vdpau/avcodec.c
+4
-4
No files found.
modules/codec/avcodec/dxva2.c
View file @
d4d02c57
...
...
@@ -51,7 +51,7 @@
#include "va.h"
#include "../../video_chroma/copy.h"
static
int
Open
(
vlc_va_t
*
,
int
,
const
es_format_t
*
);
static
int
Open
(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
);
static
void
Close
(
vlc_va_t
*
);
vlc_module_begin
()
...
...
@@ -492,7 +492,8 @@ static void Close(vlc_va_t *external)
free
(
va
);
}
static
int
Open
(
vlc_va_t
*
external
,
int
codec_id
,
const
es_format_t
*
fmt
)
static
int
Open
(
vlc_va_t
*
external
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
vlc_va_dxva2_t
*
va
=
calloc
(
1
,
sizeof
(
*
va
));
if
(
!
va
)
...
...
@@ -501,7 +502,7 @@ static int Open(vlc_va_t *external, int codec_id, const es_format_t *fmt)
external
->
sys
=
va
;
/* */
va
->
log
=
VLC_OBJECT
(
external
);
va
->
codec_id
=
codec_id
;
va
->
codec_id
=
c
tx
->
c
odec_id
;
(
void
)
fmt
;
/* Load dll*/
...
...
modules/codec/avcodec/hwdummy.c
View file @
d4d02c57
...
...
@@ -35,7 +35,7 @@
#include <vlc_picture.h>
#include "../../codec/avcodec/va.h"
static
int
Open
(
vlc_va_t
*
,
int
,
const
es_format_t
*
);
static
int
Open
(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
);
static
void
Close
(
vlc_va_t
*
);
vlc_module_begin
()
...
...
@@ -113,7 +113,7 @@ static int Setup(vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
return
VLC_SUCCESS
;
}
static
int
Open
(
vlc_va_t
*
va
,
int
codec
,
const
es_format_t
*
fmt
)
static
int
Open
(
vlc_va_t
*
va
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
union
{
...
...
@@ -125,7 +125,7 @@ static int Open(vlc_va_t *va, int codec, const es_format_t *fmt)
if
(
unlikely
(
sys
==
NULL
))
return
VLC_ENOMEM
;
msg_Dbg
(
va
,
"codec %d (%4.4s) profile %d level %d"
,
c
odec
,
u
.
str
,
msg_Dbg
(
va
,
"codec %d (%4.4s) profile %d level %d"
,
c
tx
->
codec_id
,
u
.
str
,
fmt
->
i_profile
,
fmt
->
i_level
);
sys
->
context
.
decoder
=
DECODER_MAGIC
;
...
...
modules/codec/avcodec/va.c
View file @
d4d02c57
...
...
@@ -33,9 +33,9 @@ static int vlc_va_Start(void *func, va_list ap)
vlc_va_t
*
va
=
va_arg
(
ap
,
vlc_va_t
*
);
AVCodecContext
*
ctx
=
va_arg
(
ap
,
AVCodecContext
*
);
const
es_format_t
*
fmt
=
va_arg
(
ap
,
const
es_format_t
*
);
int
(
*
open
)(
vlc_va_t
*
,
int
,
const
es_format_t
*
)
=
func
;
int
(
*
open
)(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
)
=
func
;
return
open
(
va
,
ctx
->
codec_id
,
fmt
);
return
open
(
va
,
ctx
,
fmt
);
}
static
void
vlc_va_Stop
(
void
*
func
,
va_list
ap
)
...
...
modules/codec/avcodec/vaapi.c
View file @
d4d02c57
...
...
@@ -46,7 +46,7 @@
vaCreateSurfaces(d, w, h, f, ns, s)
#endif
static
int
Create
(
vlc_va_t
*
,
int
,
const
es_format_t
*
);
static
int
Create
(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
);
static
void
Delete
(
vlc_va_t
*
);
vlc_module_begin
()
...
...
@@ -541,7 +541,8 @@ static void Delete( vlc_va_t *va )
free
(
sys
);
}
static
int
Create
(
vlc_va_t
*
p_va
,
int
i_codec_id
,
const
es_format_t
*
fmt
)
static
int
Create
(
vlc_va_t
*
p_va
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
if
(
!
vlc_xlib_init
(
VLC_OBJECT
(
p_va
)
)
)
{
...
...
@@ -551,7 +552,7 @@ static int Create( vlc_va_t *p_va, int i_codec_id, const es_format_t *fmt )
(
void
)
fmt
;
int
err
=
Open
(
p_va
,
i_
codec_id
);
int
err
=
Open
(
p_va
,
ctx
->
codec_id
);
if
(
err
)
return
err
;
...
...
modules/codec/avcodec/vda.c
View file @
d4d02c57
...
...
@@ -39,7 +39,7 @@
#include <libavcodec/vda.h>
#include <VideoDecodeAcceleration/VDADecoder.h>
static
int
Open
(
vlc_va_t
*
,
int
,
const
es_format_t
*
);
static
int
Open
(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
);
static
void
Close
(
vlc_va_t
*
);
static
const
int
nvda_pix_fmt_list
[]
=
{
0
,
1
};
...
...
@@ -272,10 +272,11 @@ static void Close( vlc_va_t *external )
free
(
p_va
);
}
static
int
Open
(
vlc_va_t
*
external
,
int
i_codec_id
,
const
es_format_t
*
fmt
)
static
int
Open
(
vlc_va_t
*
external
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
msg_Dbg
(
external
,
"opening VDA module"
);
if
(
i_
codec_id
!=
AV_CODEC_ID_H264
)
if
(
ctx
->
codec_id
!=
AV_CODEC_ID_H264
)
{
msg_Warn
(
external
,
"input codec isn't H264, canceling VDA decoding"
);
return
VLC_EGENERIC
;
...
...
modules/hw/vdpau/avcodec.c
View file @
d4d02c57
...
...
@@ -38,7 +38,7 @@
#include "vlc_vdpau.h"
#include "../../codec/avcodec/va.h"
static
int
Open
(
vlc_va_t
*
,
int
,
const
es_format_t
*
);
static
int
Open
(
vlc_va_t
*
,
AVCodecContext
*
,
const
es_format_t
*
);
static
void
Close
(
vlc_va_t
*
);
vlc_module_begin
()
...
...
@@ -169,13 +169,13 @@ static int Setup(vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
return
Init
(
va
,
ctxp
,
chromap
,
width
,
height
);
}
static
int
Open
(
vlc_va_t
*
va
,
int
codec
,
const
es_format_t
*
fmt
)
static
int
Open
(
vlc_va_t
*
va
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
VdpStatus
err
;
VdpDecoderProfile
profile
;
int
level
;
switch
(
c
odec
)
switch
(
c
tx
->
codec_id
)
{
case
AV_CODEC_ID_MPEG1VIDEO
:
profile
=
VDP_DECODER_PROFILE_MPEG1
;
...
...
@@ -262,7 +262,7 @@ static int Open(vlc_va_t *va, int codec, const es_format_t *fmt)
break
;
default:
msg_Err
(
va
,
"unknown codec %d"
,
c
odec
);
msg_Err
(
va
,
"unknown codec %d"
,
c
tx
->
codec_id
);
return
VLC_EGENERIC
;
}
...
...
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