Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ePirats Workarounds Group
VLC
Commits
74ff08ca
Commit
74ff08ca
authored
7 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
chromecast: try to encode with QSV if possible
It will be handled by the GPU so use less resource.
parent
11bd3483
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/stream_out/chromecast/cast.cpp
+40
-0
40 additions, 0 deletions
modules/stream_out/chromecast/cast.cpp
with
40 additions
and
0 deletions
modules/stream_out/chromecast/cast.cpp
+
40
−
0
View file @
74ff08ca
...
...
@@ -929,6 +929,45 @@ static std::string GetVencVPXOption( sout_stream_t * /* p_stream */,
return
"venc=vpx{quality-mode=1}"
;
}
static
std
::
string
GetVencQSVH264Option
(
sout_stream_t
*
/* p_stream */
,
const
video_format_t
*
/* p_vid */
,
int
i_quality
)
{
std
::
stringstream
ssout
;
static
const
char
video_target_usage_quality
[]
=
"quality"
;
static
const
char
video_target_usage_balanced
[]
=
"balanced"
;
static
const
char
video_target_usage_speed
[]
=
"speed"
;
static
const
char
video_bitrate_high
[]
=
"vb=8000000"
;
static
const
char
video_bitrate_low
[]
=
"vb=3000000"
;
const
char
*
psz_video_target_usage
;
const
char
*
psz_video_bitrate
;
switch
(
i_quality
)
{
case
CONVERSION_QUALITY_HIGH
:
psz_video_target_usage
=
video_target_usage_quality
;
psz_video_bitrate
=
video_bitrate_high
;
break
;
case
CONVERSION_QUALITY_MEDIUM
:
psz_video_target_usage
=
video_target_usage_balanced
;
psz_video_bitrate
=
video_bitrate_high
;
break
;
case
CONVERSION_QUALITY_LOW
:
psz_video_target_usage
=
video_target_usage_balanced
;
psz_video_bitrate
=
video_bitrate_low
;
break
;
default:
case
CONVERSION_QUALITY_LOWCPU
:
psz_video_target_usage
=
video_target_usage_speed
;
psz_video_bitrate
=
video_bitrate_low
;
break
;
}
ssout
<<
"venc=qsv{target-usage="
<<
psz_video_target_usage
<<
"},"
<<
psz_video_bitrate
;
return
ssout
.
str
();
}
static
std
::
string
GetVencX264Option
(
sout_stream_t
*
/* p_stream */
,
const
video_format_t
*
p_vid
,
int
i_quality
)
...
...
@@ -1008,6 +1047,7 @@ static struct
#ifdef __APPLE__
{
.
fcc
=
VLC_CODEC_H264
,
.
get_opt
=
GetVencAvcodecVTOption
},
#endif
{
.
fcc
=
VLC_CODEC_H264
,
.
get_opt
=
GetVencQSVH264Option
},
{
.
fcc
=
VLC_CODEC_H264
,
.
get_opt
=
GetVencX264Option
},
{
.
fcc
=
VLC_CODEC_VP8
,
.
get_opt
=
GetVencVPXOption
},
{
.
fcc
=
VLC_CODEC_H264
,
.
get_opt
=
NULL
},
...
...
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