Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
f65a6529
Commit
f65a6529
authored
5 years ago
by
Pierre Lespagnol
Browse files
Options
Downloads
Patches
Plain Diff
media/video: fix default bitrate video
Change-Id: Ieaf01c576efd98bf9083f01dd5777df97b7d3799
parent
e3cf52c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/media/media_codec.h
+1
-1
1 addition, 1 deletion
src/media/media_codec.h
src/media/media_encoder.cpp
+1
-4
1 addition, 4 deletions
src/media/media_encoder.cpp
with
2 additions
and
5 deletions
src/media/media_codec.h
+
1
−
1
View file @
f65a6529
...
...
@@ -64,7 +64,6 @@ struct SystemCodecInfo
static
constexpr
unsigned
DEFAULT_H264_MAX_QUALITY
{
20
};
static
constexpr
unsigned
DEFAULT_VP8_MIN_QUALITY
{
50
};
static
constexpr
unsigned
DEFAULT_VP8_MAX_QUALITY
{
20
};
static
constexpr
unsigned
DEFAULT_VIDEO_BITRATE
{
1200
};
// in Kbits/second
#endif
// indicates that the codec does not use quality factor
...
...
@@ -72,6 +71,7 @@ struct SystemCodecInfo
static
constexpr
unsigned
DEFAULT_MIN_BITRATE
{
600
};
static
constexpr
unsigned
DEFAULT_MAX_BITRATE
{
6000
};
static
constexpr
unsigned
DEFAULT_VIDEO_BITRATE
{
1200
};
// in Kbits/second
SystemCodecInfo
(
unsigned
avcodecId
,
const
std
::
string
&
name
,
const
std
::
string
&
libName
,
MediaType
mediaType
,
...
...
This diff is collapsed.
Click to expand it.
src/media/media_encoder.cpp
+
1
−
4
View file @
f65a6529
...
...
@@ -199,7 +199,7 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
else
if
(
systemCodecInfo
.
mediaType
==
MEDIA_AUDIO
)
mediaType
=
AVMEDIA_TYPE_AUDIO
;
encoderCtx
=
initCodec
(
mediaType
,
static_cast
<
AVCodecID
>
(
systemCodecInfo
.
avcodecId
),
framesCtx
,
0
);
encoderCtx
=
initCodec
(
mediaType
,
static_cast
<
AVCodecID
>
(
systemCodecInfo
.
avcodecId
),
framesCtx
,
SystemCodecInfo
::
DEFAULT_VIDEO_BITRATE
);
// add video stream to outputformat context
AVStream
*
stream
=
avformat_new_stream
(
outputCtx_
,
outputCodec_
);
...
...
@@ -690,9 +690,6 @@ MediaEncoder::initCodec(AVMediaType mediaType, AVCodecID avcodecId, AVBufferRef*
}
#endif
if
(
!
br
)
br
=
std
::
atoi
(
libav_utils
::
getDictValue
(
options_
,
"max_rate"
));
// Only clamp video bitrate
if
(
mediaType
==
AVMEDIA_TYPE_VIDEO
&&
br
>
0
)
{
if
(
br
<
SystemCodecInfo
::
DEFAULT_MIN_BITRATE
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment