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
d149b6c0
Commit
d149b6c0
authored
Apr 27, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: renome p_extra_buffer to p_csd0_buffer
Since it's the buffer containing the "csd-0" configuration buffer.
parent
a56ed71a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
modules/codec/omxil/android_mediacodec.c
modules/codec/omxil/android_mediacodec.c
+21
-21
No files found.
modules/codec/omxil/android_mediacodec.c
View file @
d149b6c0
...
...
@@ -142,8 +142,8 @@ struct decoder_sys_t
int
stride
,
slice_height
;
char
*
name
;
void
*
p_
extra
_buffer
;
size_t
i_
extra
_buffer
;
void
*
p_
csd0
_buffer
;
size_t
i_
csd0
_buffer
;
bool
allocated
;
bool
started
;
...
...
@@ -530,50 +530,50 @@ loopclean:
jfields
.
create_video_format
,
(
*
env
)
->
NewStringUTF
(
env
,
mime
),
p_dec
->
fmt_in
.
video
.
i_width
,
p_dec
->
fmt_in
.
video
.
i_height
);
if
(
p_dec
->
fmt_in
.
i_extra
&&
!
p_sys
->
p_
extra
_buffer
)
{
if
(
p_dec
->
fmt_in
.
i_extra
&&
!
p_sys
->
p_
csd0
_buffer
)
{
uint32_t
size
=
p_dec
->
fmt_in
.
i_extra
;
int
buf_size
=
p_dec
->
fmt_in
.
i_extra
+
20
;
/* Don't free p_
extra
_buffer until Format use it, so until MediaCodec
/* Don't free p_
csd0
_buffer until Format use it, so until MediaCodec
* is closed */
p_sys
->
p_
extra
_buffer
=
malloc
(
buf_size
);
if
(
!
p_sys
->
p_
extra
_buffer
)
p_sys
->
p_
csd0
_buffer
=
malloc
(
buf_size
);
if
(
!
p_sys
->
p_
csd0
_buffer
)
{
msg_Warn
(
p_dec
,
"extra buffer allocation failed"
);
goto
error
;
}
if
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_H264
&&
((
uint8_t
*
)
p_dec
->
fmt_in
.
p_extra
)[
0
]
==
1
)
{
convert_sps_pps
(
p_dec
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
p_sys
->
p_
extra
_buffer
,
buf_size
,
p_sys
->
p_
csd0
_buffer
,
buf_size
,
&
size
,
&
p_sys
->
nal_size
);
}
else
if
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_HEVC
)
{
convert_hevc_nal_units
(
p_dec
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
p_sys
->
p_
extra
_buffer
,
buf_size
,
p_sys
->
p_
csd0
_buffer
,
buf_size
,
&
size
,
&
p_sys
->
nal_size
);
}
else
{
memcpy
(
p_sys
->
p_
extra
_buffer
,
p_dec
->
fmt_in
.
p_extra
,
size
);
memcpy
(
p_sys
->
p_
csd0
_buffer
,
p_dec
->
fmt_in
.
p_extra
,
size
);
}
p_sys
->
i_
extra
_buffer
=
size
;
p_sys
->
i_
csd0
_buffer
=
size
;
}
if
(
p_sys
->
p_
extra
_buffer
)
if
(
p_sys
->
p_
csd0
_buffer
)
{
jobject
j
extra
_buffer
;
jobject
j
csd0
_buffer
;
j
extra
_buffer
=
(
*
env
)
->
NewDirectByteBuffer
(
env
,
p_sys
->
p_extra
_buffer
,
p_sys
->
i_extra
_buffer
);
if
(
CHECK_EXCEPTION
()
||
!
j
extra
_buffer
)
j
csd0
_buffer
=
(
*
env
)
->
NewDirectByteBuffer
(
env
,
p_sys
->
p_csd0
_buffer
,
p_sys
->
i_csd0
_buffer
);
if
(
CHECK_EXCEPTION
()
||
!
j
csd0
_buffer
)
{
msg_Warn
(
p_dec
,
"java extra buffer allocation failed"
);
free
(
p_sys
->
p_
extra
_buffer
);
p_sys
->
p_
extra
_buffer
=
NULL
;
free
(
p_sys
->
p_
csd0
_buffer
);
p_sys
->
p_
csd0
_buffer
=
NULL
;
goto
error
;
}
(
*
env
)
->
CallVoidMethod
(
env
,
format
,
jfields
.
set_bytebuffer
,
(
*
env
)
->
NewStringUTF
(
env
,
"csd-0"
),
j
extra
_buffer
);
(
*
env
)
->
DeleteLocalRef
(
env
,
j
extra
_buffer
);
j
csd0
_buffer
);
(
*
env
)
->
DeleteLocalRef
(
env
,
j
csd0
_buffer
);
}
p_sys
->
direct_rendering
=
var_InheritBool
(
p_dec
,
CFG_PREFIX
"dr"
);
...
...
@@ -803,7 +803,7 @@ static void CloseDecoder(vlc_object_t *p_this)
else
msg_Warn
(
p_dec
,
"Can't get a JNIEnv, can't close mediacodec !"
);
free
(
p_sys
->
p_
extra
_buffer
);
free
(
p_sys
->
p_
csd0
_buffer
);
free
(
p_sys
->
name
);
ArchitectureSpecificCopyHooksDestroy
(
p_sys
->
pixel_format
,
&
p_sys
->
architecture_specific_data
);
free
(
p_sys
->
pp_inflight_pictures
);
...
...
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