Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
bf97dc85
Commit
bf97dc85
authored
May 22, 2018
by
François Grisez
Browse files
Set the default profile and level in conformance with RFC 7798.
parent
0f57f21e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
src/android/media-codec-encoder.cpp
src/android/media-codec-encoder.cpp
+2
-2
src/android/media-codec-encoder.h
src/android/media-codec-encoder.h
+2
-0
src/android/media-codec-h264-encoder.cpp
src/android/media-codec-h264-encoder.cpp
+2
-0
src/android/media-codec-h265-encoder.cpp
src/android/media-codec-h265-encoder.cpp
+4
-1
No files found.
src/android/media-codec-encoder.cpp
View file @
bf97dc85
...
...
@@ -291,8 +291,8 @@ int MediaCodecEncoderFilterImpl::encConfigure() {
AMediaFormat_setInt32
(
format
,
"bitrate"
,
(
_vconf
.
required_bitrate
*
9
)
/
10
);
/*take a margin*/
AMediaFormat_setInt32
(
format
,
"frame-rate"
,
_vconf
.
fps
);
AMediaFormat_setInt32
(
format
,
"bitrate-mode"
,
1
);
AMediaFormat_setInt32
(
format
,
"profile"
,
1
);
// AVCProfileBaseline
AMediaFormat_setInt32
(
format
,
"level"
,
1024
);
// AVCL
evel
32
AMediaFormat_setInt32
(
format
,
"profile"
,
_profile
);
AMediaFormat_setInt32
(
format
,
"level"
,
_l
evel
);
ms_message
(
"MSMediaCodecH264Enc: AMediaImage is available."
);
status
=
tryColorFormat
(
format
,
0x7f420888
);
/*the new "flexible YUV", appeared in API23*/
...
...
src/android/media-codec-encoder.h
View file @
bf97dc85
...
...
@@ -68,6 +68,8 @@ protected:
const
MSVideoConfiguration
*
_vconfList
;
MSVideoConfiguration
_vconf
;
bool
_avpfEnabled
=
false
;
int
_profile
=
0
;
int
_level
=
0
;
MSFilter
*
_f
=
nullptr
;
std
::
string
_mime
;
...
...
src/android/media-codec-h264-encoder.cpp
View file @
bf97dc85
...
...
@@ -44,6 +44,8 @@ public:
MediaCodecH264EncoderFilterImpl
(
MSFilter
*
f
)
:
MediaCodecEncoderFilterImpl
(
f
,
"video/avc"
,
new
H264NalPacker
())
{
_vconfList
=
_media_codec_h264_conf_list
;
_profile
=
1
;
// AVCProfileBaseline
_level
=
1024
;
// AVCLevel32
}
~
MediaCodecH264EncoderFilterImpl
()
{
...
...
src/android/media-codec-h265-encoder.cpp
View file @
bf97dc85
...
...
@@ -24,7 +24,10 @@ namespace mediastreamer {
class
MediaCodecH265EncoderFilterImpl
:
public
MediaCodecEncoderFilterImpl
{
public:
MediaCodecH265EncoderFilterImpl
(
MSFilter
*
f
)
:
MediaCodecEncoderFilterImpl
(
f
,
"video/hevc"
,
new
H265NalPacker
(
f
->
factory
))
{}
MediaCodecH265EncoderFilterImpl
(
MSFilter
*
f
)
:
MediaCodecEncoderFilterImpl
(
f
,
"video/hevc"
,
new
H265NalPacker
(
f
->
factory
))
{
_profile
=
1
;
// HEVCProfileMain
_level
=
256
;
// HEVCMainTierLevel31
}
static
void
onFilterInit
(
MSFilter
*
f
)
{
f
->
data
=
new
MediaCodecH265EncoderFilterImpl
(
f
);
...
...
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