| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 /* | 
|  | 2  *  Copyright 2012 The WebRTC project authors. All Rights Reserved. | 
|  | 3  * | 
|  | 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 | 
|  | 6  *  tree. An additional intellectual property rights grant can be found | 
|  | 7  *  in the file PATENTS.  All contributing project authors may | 
|  | 8  *  be found in the AUTHORS file in the root of the source tree. | 
|  | 9  */ | 
|  | 10 | 
|  | 11 #ifndef WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 
|  | 12 #define WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 
|  | 13 | 
|  | 14 #include "talk/media/base/mediachannel.h" | 
|  | 15 #include "webrtc/api/mediastreaminterface.h" | 
|  | 16 | 
|  | 17 namespace webrtc { | 
|  | 18 | 
|  | 19 // VideoSourceInterface is a reference counted source used for VideoTracks. | 
|  | 20 // The same source can be used in multiple VideoTracks. | 
|  | 21 // The methods are only supposed to be called by the PeerConnection | 
|  | 22 // implementation. | 
|  | 23 class VideoSourceInterface : public MediaSourceInterface { | 
|  | 24  public: | 
|  | 25   // Get access to the source implementation of cricket::VideoCapturer. | 
|  | 26   // This can be used for receiving frames and state notifications. | 
|  | 27   // But it should not be used for starting or stopping capturing. | 
|  | 28   virtual cricket::VideoCapturer* GetVideoCapturer() = 0; | 
|  | 29 | 
|  | 30   // Stop the video capturer. | 
|  | 31   virtual void Stop() = 0; | 
|  | 32   virtual void Restart() = 0; | 
|  | 33 | 
|  | 34   // Adds |output| to the source to receive frames. | 
|  | 35   virtual void AddSink(cricket::VideoRenderer* output) = 0; | 
|  | 36   virtual void RemoveSink(cricket::VideoRenderer* output) = 0; | 
|  | 37   virtual const cricket::VideoOptions* options() const = 0; | 
|  | 38   virtual cricket::VideoRenderer* FrameInput() = 0; | 
|  | 39 | 
|  | 40  protected: | 
|  | 41   virtual ~VideoSourceInterface() {} | 
|  | 42 }; | 
|  | 43 | 
|  | 44 }  // namespace webrtc | 
|  | 45 | 
|  | 46 #endif  // WEBRTC_API_VIDEOSOURCEINTERFACE_H_ | 
| OLD | NEW | 
|---|