This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIView+LKViewUtil.h" | |
#import "LKMacro.h" | |
#import <QuartzCore/QuartzCore.h> | |
@implementation UIView (LKViewUtil) | |
- (void)centerizeInRect:(CGRect)rect | |
{ | |
self.frame = CGRectMake((rect.size.width - self.frame.size.width)/2.0, | |
(rect.size.height - self.frame.size.height)/2.0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use AppleScript version "2.4" | |
use scripting additions | |
use framework "Foundation" | |
use framework "AppKit" | |
my lockscrn() | |
on lockscrn() | |
set bundle to current application's NSBundle's bundleWithPath:"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu/" | |
bundle's load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use AppleScript version "2.4" | |
use scripting additions | |
use framework "Foundation" | |
use framework "AppKit" | |
on run {input, parameters} | |
set bundle to current application's NSBundle's bundleWithPath:"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu/" | |
bundle's load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
# | |
# Use of this source code is governed by a BSD-style license | |
# that can be found in the LICENSE file in the root of the source | |
# tree. An additional intellectual property rights grant can be found | |
# in the file PATENTS. All contributing project authors may | |
# be found in the AUTHORS file in the root of the source tree. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MyVideoSourceFilter : NSObject<RTCVideoCapturerDelegate> | |
- (instancetype)initWithSource:(RTCVideoSource *)source; | |
@end | |
@implementation MyVideoSourceFilter | |
- (instancetype)initWithSource:(RTCVideoSource *)source { | |
if (self = [super init]) { | |
self.source = source; | |
} | |
return self; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
RTCVideoSource *source = [factory videoSource]; | |
RTCVideoCapturer *capturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:source]; | |
RTCVideoTrack *trakc = [factory videoTrackWithSource:source trackId:trackId]; | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RTCVideoSource *source = [factory videoSource]; | |
// VideoSourceからFilterを準備し | |
MyVideoSourceFilter *filter = [[MyVideoSourceFilter alloc] initWithSource:source]; | |
// Capturerには、Filterを渡す | |
RTCVideoCapturer *capturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:filter]; | |
RTCVideoTrack *trakc = [factory videoTrackWithSource:source trackId:trackId]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (instancetype)initWithSource:(RTCVideoSource *)source { | |
if (self = [super init]) { | |
self.source = source; | |
// CI ContextとColorSpaceを準備しておく | |
self.context = | |
[CIContext contextWithOptions:@{kCIContextUseSoftwareRenderer: @NO}]; | |
_colorSpace = CGColorSpaceCreateDeviceRGB(); | |
self.filters = @[].mutableCopy; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool PeerConnection::AddStream(MediaStreamInterface* local_stream) { | |
TRACE_EVENT0("webrtc", "PeerConnection::AddStream"); | |
if (IsClosed()) { | |
return false; | |
} | |
if (!CanAddLocalMediaStream(local_streams_, local_stream)) { | |
return false; | |
} | |
local_streams_->AddStream(local_stream); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var channelListener: SoraAudioChannel.Listener = object : SoraAudioChannel.Listener { | |
override fun onConnect(channel: SoraAudioChannel) { | |
ui?.changeStateText("CONNECTED") | |
} | |
override fun onClose(channel: SoraAudioChannel) { | |
ui?.changeStateText("CLOSED") | |
close() |
OlderNewer