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
d6e34004
Commit
d6e34004
authored
5 years ago
by
Pierre Lespagnol
Browse files
Options
Downloads
Patches
Plain Diff
accel: enable hardware encoding with videotoolbox on macOS
Change-Id: Icc6a87f62aaf80f867d7dd3ef6927f9940e724a0
parent
4ec9e1a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/media/media_encoder.cpp
+3
-0
3 additions, 0 deletions
src/media/media_encoder.cpp
src/media/video/accel.cpp
+1
-1
1 addition, 1 deletion
src/media/video/accel.cpp
with
4 additions
and
1 deletion
src/media/media_encoder.cpp
+
3
−
0
View file @
d6e34004
...
...
@@ -564,8 +564,11 @@ MediaEncoder::prepareEncoderContext(AVCodec* outputCodec, bool is_video)
encoderCtx
->
max_b_frames
=
0
;
encoderCtx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
#ifdef RING_ACCEL
// Keep YUV format for macOS
#if !(defined(__APPLE__) && !TARGET_OS_IOS)
if
(
accel_
)
encoderCtx
->
pix_fmt
=
accel_
->
getFormat
();
#endif
#endif
// Fri Jul 22 11:37:59 EDT 2011:tmatth:XXX: DON'T set this, we want our
...
...
This diff is collapsed.
Click to expand it.
src/media/video/accel.cpp
+
1
−
1
View file @
d6e34004
...
...
@@ -335,7 +335,7 @@ HardwareAccel::initAPI(bool linkable, AVBufferRef* framesCtx)
if
(
linkable
&&
framesCtx
)
link
=
linkHardware
(
framesCtx
);
// we don't need frame context for videotoolbox
if
(
format
_
==
AV_
PIX_FMT
_VIDEOTOOLBOX
||
link
||
initFrame
())
{
if
(
hwType
_
==
AV_
HWDEVICE_TYPE
_VIDEOTOOLBOX
||
link
||
initFrame
())
{
return
0
;
}
}
...
...
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