| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 11 #ifndef WEBRTC_API_VIDEOSOURCEINTERFACE_H_ |
| 12 #define WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 12 #define WEBRTC_API_VIDEOSOURCEINTERFACE_H_ |
| 13 | 13 |
| 14 #include "webrtc/api/mediastreaminterface.h" | 14 #include "webrtc/api/mediastreaminterface.h" |
| 15 #include "webrtc/media/base/mediachannel.h" | |
| 16 #include "webrtc/media/base/videosourceinterface.h" | |
| 17 | 15 |
| 18 namespace webrtc { | 16 // TODO(perkj): Remove this file once Chrome build files doesn't depend on it. |
| 19 | |
| 20 // VideoSourceInterface is a reference counted source used for VideoTracks. | |
| 21 // The same source can be used in multiple VideoTracks. | |
| 22 // The methods are only supposed to be called by the PeerConnection | |
| 23 // implementation. | |
| 24 class VideoSourceInterface : | |
| 25 public MediaSourceInterface, | |
| 26 public rtc::VideoSourceInterface<cricket::VideoFrame> { | |
| 27 public: | |
| 28 // Get access to the source implementation of cricket::VideoCapturer. | |
| 29 // This can be used for receiving frames and state notifications. | |
| 30 // But it should not be used for starting or stopping capturing. | |
| 31 virtual cricket::VideoCapturer* GetVideoCapturer() = 0; | |
| 32 | |
| 33 virtual void Stop() = 0; | |
| 34 virtual void Restart() = 0; | |
| 35 | |
| 36 virtual const cricket::VideoOptions* options() const = 0; | |
| 37 | |
| 38 protected: | |
| 39 virtual ~VideoSourceInterface() {} | |
| 40 }; | |
| 41 | |
| 42 // TODO(perkj): Rename webrtc::VideoSourceInterface to | |
| 43 // webrtc::VideoTrackSourceInterface | |
| 44 using VideoTrackSourceInterface = VideoSourceInterface; | |
| 45 | |
| 46 } // namespace webrtc | |
| 47 | 17 |
| 48 #endif // WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 18 #endif // WEBRTC_API_VIDEOSOURCEINTERFACE_H_ |
| OLD | NEW |