Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3c9185bf
Commit
3c9185bf
authored
Apr 04, 2020
by
Thilo Borgmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/avfoundation.m: Remove transport controls for iOS.
parent
68d9c0be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
avfoundation.m
libavdevice/avfoundation.m
+10
-2
No files found.
libavdevice/avfoundation.m
View file @
3c9185bf
...
...
@@ -168,6 +168,7 @@ static void unlock_frames(AVFContext* ctx)
_context
=
context
;
// start observing if a device is set for it
#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
if
(
_context
->
observed_device
)
{
NSString
*
keyPath
=
NSStringFromSelector
(
@selector
(
transportControlsPlaybackMode
));
NSKeyValueObservingOptions
options
=
NSKeyValueObservingOptionNew
;
...
...
@@ -177,14 +178,19 @@ static void unlock_frames(AVFContext* ctx)
options:
options
context:
_context
];
}
#endif
}
return
self
;
}
-
(
void
)
dealloc
{
// stop observing if a device is set for it
#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
if
(
_context
->
observed_device
)
{
NSString
*
keyPath
=
NSStringFromSelector
(
@selector
(
transportControlsPlaybackMode
));
[
_context
->
observed_device
removeObserver
:
self
forKeyPath
:
keyPath
];
}
#endif
[
super
dealloc
];
}
...
...
@@ -537,6 +543,7 @@ static int add_video_device(AVFormatContext *s, AVCaptureDevice *video_device)
}
[
ctx
->
video_output
setAlwaysDiscardsLateVideoFrames
:
ctx
->
drop_late_frames
];
#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// check for transport control support and set observer device if supported
int
trans_ctrl
=
[
video_device
transportControlsSupported
];
AVCaptureDeviceTransportControlsPlaybackMode
trans_mode
=
[
video_device
transportControlsPlaybackMode
];
...
...
@@ -545,6 +552,7 @@ static int add_video_device(AVFormatContext *s, AVCaptureDevice *video_device)
ctx
->
observed_mode
=
trans_mode
;
ctx
->
observed_device
=
video_device
;
}
#endif
ctx
->
avf_delegate
=
[[
AVFFrameReceiver
alloc
]
initWithContext
:
ctx
];
...
...
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