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
346b3c5c
Commit
346b3c5c
authored
Jun 15, 2016
by
Matthieu Bouron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/mediacodec: re-indent after previous commit
parent
e452abc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
93 deletions
+93
-93
mediacodec_wrapper.c
libavcodec/mediacodec_wrapper.c
+93
-93
No files found.
libavcodec/mediacodec_wrapper.c
View file @
346b3c5c
...
...
@@ -403,149 +403,149 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
goto
done
;
}
codec_count
=
(
*
env
)
->
CallStaticIntMethod
(
env
,
jfields
.
mediacodec_list_class
,
jfields
.
get_codec_count_id
);
codec_count
=
(
*
env
)
->
CallStaticIntMethod
(
env
,
jfields
.
mediacodec_list_class
,
jfields
.
get_codec_count_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
for
(
i
=
0
;
i
<
codec_count
;
i
++
)
{
int
j
;
int
type_count
;
int
is_encoder
;
info
=
(
*
env
)
->
CallStaticObjectMethod
(
env
,
jfields
.
mediacodec_list_class
,
jfields
.
get_codec_info_at_id
,
i
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
for
(
i
=
0
;
i
<
codec_count
;
i
++
)
{
int
j
;
int
type_count
;
int
is_encoder
;
types
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_supported_types_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
info
=
(
*
env
)
->
CallStaticObjectMethod
(
env
,
jfields
.
mediacodec_list_class
,
jfields
.
get_codec_info_at_id
,
i
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
is_encoder
=
(
*
env
)
->
CallBooleanMethod
(
env
,
info
,
jfields
.
is_encoder_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
if
(
is_encoder
!=
encoder
)
{
goto
done_with_info
;
}
types
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_supported_types_id
);
type_count
=
(
*
env
)
->
GetArrayLength
(
env
,
types
);
for
(
j
=
0
;
j
<
type_count
;
j
++
)
{
int
k
;
int
profile_count
;
type
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
types
,
j
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
is_encoder
=
(
*
env
)
->
CallBooleanMethod
(
env
,
info
,
jfields
.
is_encoder_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
supported_type
=
ff_jni_jstring_to_utf_chars
(
env
,
type
,
log_ctx
);
if
(
!
supported_type
)
{
goto
done
;
}
if
(
is_encoder
!=
encoder
)
{
goto
done_with_info
;
}
if
(
!
av_strcasecmp
(
supported_type
,
mime
))
{
codec_name
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_name_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
type_count
=
(
*
env
)
->
GetArrayLength
(
env
,
types
);
for
(
j
=
0
;
j
<
type_count
;
j
++
)
{
int
k
;
int
profile_count
;
name
=
ff_jni_jstring_to_utf_chars
(
env
,
codec_name
,
log_ctx
);
if
(
!
name
)
{
goto
done
;
}
type
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
types
,
j
);
if
(
strstr
(
name
,
"OMX.google"
))
{
av_freep
(
&
name
);
goto
done_with_type
;
}
capabilities
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_codec_capabilities_id
,
type
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
supported_type
=
ff_jni_jstring_to_utf_chars
(
env
,
type
,
log_ctx
);
if
(
!
supported_type
)
{
profile_levels
=
(
*
env
)
->
GetObjectField
(
env
,
capabilities
,
jfields
.
profile_levels_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
if
(
!
av_strcasecmp
(
supported_type
,
mime
))
{
codec_name
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_name_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
profile_count
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
for
(
k
=
0
;
k
<
profile_count
;
k
++
)
{
int
supported_profile
=
0
;
name
=
ff_jni_jstring_to_utf_chars
(
env
,
codec_name
,
log_ctx
);
if
(
!
name
)
{
goto
done
;
if
(
profile
<
0
)
{
found_codec
=
1
;
break
;
}
if
(
strstr
(
name
,
"OMX.google"
))
{
av_freep
(
&
name
);
goto
done_with_type
;
}
capabilities
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_codec_capabilities_id
,
type
);
profile_level
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
profile_levels
,
k
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
profile_levels
=
(
*
env
)
->
GetObjectField
(
env
,
capabilities
,
jfields
.
profile_levels
_id
);
supported_profile
=
(
*
env
)
->
GetIntField
(
env
,
profile_level
,
jfields
.
profile
_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
profile_count
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
for
(
k
=
0
;
k
<
profile_count
;
k
++
)
{
int
supported_profile
=
0
;
if
(
profile
<
0
)
{
found_codec
=
1
;
break
;
}
profile_level
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
profile_levels
,
k
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
found_codec
=
profile
==
supported_profile
;
supported_profile
=
(
*
env
)
->
GetIntField
(
env
,
profile_level
,
jfields
.
profile_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
}
found_codec
=
profile
==
supported_profile
;
if
(
profile_level
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_level
);
profile_level
=
NULL
;
}
if
(
profile_level
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_level
);
profile_level
=
NULL
;
}
if
(
found_codec
)
{
break
;
}
if
(
found_codec
)
{
break
;
}
}
}
done_with_type:
if
(
profile_levels
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_levels
);
profile_levels
=
NULL
;
}
if
(
capabilities
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
capabilities
);
capabilities
=
NULL
;
}
if
(
type
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
type
);
type
=
NULL
;
}
av_freep
(
&
supported_type
);
if
(
found_codec
)
{
break
;
}
av_freep
(
&
name
);
if
(
profile_levels
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_levels
);
profile_levels
=
NULL
;
}
done_with_info:
if
(
info
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
info
);
info
=
NULL
;
if
(
capabilities
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
capabilities
);
capabilities
=
NULL
;
}
if
(
type
s
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
type
s
);
type
s
=
NULL
;
if
(
type
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
type
);
type
=
NULL
;
}
av_freep
(
&
supported_type
);
if
(
found_codec
)
{
break
;
}
av_freep
(
&
name
);
}
done_with_info:
if
(
info
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
info
);
info
=
NULL
;
}
if
(
types
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
types
);
types
=
NULL
;
}
if
(
found_codec
)
{
break
;
}
}
done:
if
(
format
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
format
);
...
...
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