Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6744bd2b
Commit
6744bd2b
authored
Jul 23, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hwdummy: improve assertions
parent
82c6d789
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
modules/codec/avcodec/hwdummy.c
modules/codec/avcodec/hwdummy.c
+12
-5
No files found.
modules/codec/avcodec/hwdummy.c
View file @
6744bd2b
...
...
@@ -47,6 +47,9 @@ vlc_module_begin()
add_shortcut
(
"dummy"
)
vlc_module_end
()
#define DECODER_MAGIC 0x12345678
#define SURFACE_MAGIC 0x87654321
struct
vlc_va_sys_t
{
AVVDPAUContext
context
;
...
...
@@ -60,17 +63,15 @@ static int Lock(vlc_va_t *va, AVFrame *ff)
ff
->
linesize
[
i
]
=
0
;
}
ff
->
data
[
0
]
=
(
void
*
)
va
;
/* must be non-NULL */
ff
->
data
[
3
]
=
(
void
*
)
va
;
ff
->
opaque
=
(
void
*
)
va
;
ff
->
data
[
0
]
=
(
void
*
)
(
uintptr_t
)
SURFACE_MAGIC
;
/* must be non-NULL */
ff
->
data
[
3
]
=
(
void
*
)
(
uintptr_t
)
SURFACE_MAGIC
;
ff
->
opaque
=
(
void
*
)
(
uintptr_t
)
SURFACE_MAGIC
;
return
VLC_SUCCESS
;
}
static
void
Unlock
(
vlc_va_t
*
va
,
AVFrame
*
ff
)
{
(
void
)
va
;
assert
(
ff
->
opaque
==
va
);
ff
->
data
[
0
]
=
ff
->
data
[
3
]
=
NULL
;
ff
->
opaque
=
NULL
;
}
...
...
@@ -82,6 +83,8 @@ static VdpStatus Render(VdpDecoder decoder, VdpVideoSurface target,
{
(
void
)
decoder
;
(
void
)
target
;
(
void
)
picture_info
;
(
void
)
bitstream_buffer_count
;
(
void
)
bitstream_buffers
;
assert
(
decoder
==
DECODER_MAGIC
);
assert
(
target
==
SURFACE_MAGIC
);
return
VDP_STATUS_OK
;
}
...
...
@@ -89,6 +92,9 @@ static int Copy(vlc_va_t *va, picture_t *pic, AVFrame *ff)
{
(
void
)
va
;
(
void
)
ff
;
assert
((
uintptr_t
)
ff
->
data
[
3
]
==
SURFACE_MAGIC
);
assert
((
uintptr_t
)
ff
->
opaque
==
SURFACE_MAGIC
);
/* Put some dummy picture content */
memset
(
pic
->
p
[
0
].
p_pixels
,
0xF0
,
pic
->
p
[
0
].
i_pitch
*
pic
->
p
[
0
].
i_visible_lines
);
...
...
@@ -128,6 +134,7 @@ static int Open(vlc_va_t *va, int codec, const es_format_t *fmt)
msg_Dbg
(
va
,
"codec %d (%4.4s) profile %d level %d"
,
codec
,
u
.
str
,
fmt
->
i_profile
,
fmt
->
i_level
);
sys
->
context
.
decoder
=
DECODER_MAGIC
;
sys
->
context
.
render
=
Render
;
va
->
sys
=
sys
;
...
...
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