Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: talk/app/webrtc/objc/RTCAVFoundationVideoSource.mm

Issue 1770003002: Renamed VideoSourceInterface to VideoTrackSourceInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 21 matching lines...) Expand all
32 #import "RTCPeerConnectionFactory+Internal.h" 32 #import "RTCPeerConnectionFactory+Internal.h"
33 #import "RTCVideoSource+Internal.h" 33 #import "RTCVideoSource+Internal.h"
34 34
35 @implementation RTCAVFoundationVideoSource 35 @implementation RTCAVFoundationVideoSource
36 36
37 - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory 37 - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory
38 constraints:(RTCMediaConstraints*)constraints { 38 constraints:(RTCMediaConstraints*)constraints {
39 NSParameterAssert(factory); 39 NSParameterAssert(factory);
40 rtc::scoped_ptr<webrtc::AVFoundationVideoCapturer> capturer; 40 rtc::scoped_ptr<webrtc::AVFoundationVideoCapturer> capturer;
41 capturer.reset(new webrtc::AVFoundationVideoCapturer()); 41 capturer.reset(new webrtc::AVFoundationVideoCapturer());
42 rtc::scoped_refptr<webrtc::VideoSourceInterface> source = 42 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source =
43 factory.nativeFactory->CreateVideoSource(capturer.release(), 43 factory.nativeFactory->CreateVideoSource(capturer.release(), constraints.c onstraints);
44 constraints.constraints);
45 return [super initWithMediaSource:source]; 44 return [super initWithMediaSource:source];
46 } 45 }
47 46
48 - (BOOL)useBackCamera { 47 - (BOOL)useBackCamera {
49 return self.capturer->GetUseBackCamera(); 48 return self.capturer->GetUseBackCamera();
50 } 49 }
51 50
52 - (void)setUseBackCamera:(BOOL)useBackCamera { 51 - (void)setUseBackCamera:(BOOL)useBackCamera {
53 self.capturer->SetUseBackCamera(useBackCamera); 52 self.capturer->SetUseBackCamera(useBackCamera);
54 } 53 }
55 54
56 - (AVCaptureSession*)captureSession { 55 - (AVCaptureSession*)captureSession {
57 return self.capturer->GetCaptureSession(); 56 return self.capturer->GetCaptureSession();
58 } 57 }
59 58
60 - (webrtc::AVFoundationVideoCapturer*)capturer { 59 - (webrtc::AVFoundationVideoCapturer*)capturer {
61 cricket::VideoCapturer* capturer = self.videoSource->GetVideoCapturer(); 60 cricket::VideoCapturer* capturer = self.videoSource->GetVideoCapturer();
62 // This should be safe because no one should have changed the underlying video 61 // This should be safe because no one should have changed the underlying video
63 // source. 62 // source.
64 webrtc::AVFoundationVideoCapturer* foundationCapturer = 63 webrtc::AVFoundationVideoCapturer* foundationCapturer =
65 static_cast<webrtc::AVFoundationVideoCapturer*>(capturer); 64 static_cast<webrtc::AVFoundationVideoCapturer*>(capturer);
66 return foundationCapturer; 65 return foundationCapturer;
67 } 66 }
68 67
69 @end 68 @end
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/objc/RTCPeerConnectionFactory.mm » ('j') | webrtc/api/videocapturertracksource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698