Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
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
...
@@ -403,149 +403,149 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
goto
done
;
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
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
goto
done
;
}
}
for
(
i
=
0
;
i
<
codec_count
;
i
++
)
{
types
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_supported_types_id
);
int
j
;
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
int
type_count
;
goto
done
;
int
is_encoder
;
}
info
=
(
*
env
)
->
CallStaticObjectMethod
(
env
,
jfields
.
mediacodec_list_class
,
jfields
.
get_codec_info_at_id
,
i
);
is_encoder
=
(
*
env
)
->
CallBooleanMethod
(
env
,
info
,
jfields
.
is_encoder_id
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
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
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
goto
done
;
}
}
is_encoder
=
(
*
env
)
->
CallBooleanMethod
(
env
,
info
,
jfields
.
is_encoder_id
);
supported_type
=
ff_jni_jstring_to_utf_chars
(
env
,
type
,
log_ctx
);
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
if
(
!
supported_type
)
{
goto
done
;
goto
done
;
}
}
if
(
is_encoder
!=
encoder
)
{
if
(
!
av_strcasecmp
(
supported_type
,
mime
))
{
goto
done_with_info
;
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
);
name
=
ff_jni_jstring_to_utf_chars
(
env
,
codec_name
,
log_ctx
);
for
(
j
=
0
;
j
<
type_count
;
j
++
)
{
if
(
!
name
)
{
int
k
;
goto
done
;
int
profile_count
;
}
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
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
goto
done
;
}
}
supported_type
=
ff_jni_jstring_to_utf_chars
(
env
,
type
,
log_ctx
);
profile_levels
=
(
*
env
)
->
GetObjectField
(
env
,
capabilities
,
jfields
.
profile_levels_id
);
if
(
!
supported_type
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
goto
done
;
}
}
if
(
!
av_strcasecmp
(
supported_type
,
mime
))
{
profile_count
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
codec_name
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
jfields
.
get_name_id
);
for
(
k
=
0
;
k
<
profile_count
;
k
++
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
int
supported_profile
=
0
;
goto
done
;
}
name
=
ff_jni_jstring_to_utf_chars
(
env
,
codec_name
,
log_ctx
);
if
(
profile
<
0
)
{
if
(
!
name
)
{
found_codec
=
1
;
goto
done
;
break
;
}
}
if
(
strstr
(
name
,
"OMX.google"
))
{
profile_level
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
profile_levels
,
k
);
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
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
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
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
goto
done
;
goto
done
;
}
}
profile_count
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
found_codec
=
profile
==
supported_profile
;
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
;
}
supported_profile
=
(
*
env
)
->
GetIntField
(
env
,
profile_level
,
jfields
.
profile_id
);
if
(
profile_level
)
{
if
(
ff_jni_exception_check
(
env
,
1
,
log_ctx
)
<
0
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_level
);
goto
done
;
profile_level
=
NULL
;
}
}
found_codec
=
profile
==
supported_profile
;
if
(
profile_level
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_level
);
profile_level
=
NULL
;
}
if
(
found_codec
)
{
if
(
found_codec
)
{
break
;
break
;
}
}
}
}
}
}
done_with_type:
done_with_type:
if
(
profile_levels
)
{
if
(
profile_levels
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_levels
);
(
*
env
)
->
DeleteLocalRef
(
env
,
profile_levels
);
profile_levels
=
NULL
;
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
);
}
}
done_with_info:
if
(
capabilities
)
{
if
(
info
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
capabilities
);
(
*
env
)
->
DeleteLocalRef
(
env
,
info
);
capabilities
=
NULL
;
info
=
NULL
;
}
}
if
(
type
s
)
{
if
(
type
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
type
s
);
(
*
env
)
->
DeleteLocalRef
(
env
,
type
);
type
s
=
NULL
;
type
=
NULL
;
}
}
av_freep
(
&
supported_type
);
if
(
found_codec
)
{
if
(
found_codec
)
{
break
;
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:
done:
if
(
format
)
{
if
(
format
)
{
(
*
env
)
->
DeleteLocalRef
(
env
,
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