Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 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 MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ | |
| 12 #define MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ | |
| 13 | |
| 14 #include "webrtc/media/base/videosinkinterface.h" | |
| 15 | |
| 16 namespace rtc { | |
| 17 | |
| 18 template <typename VideoFrameT> | |
| 19 class VideoSourceInterface { | |
| 20 public: | |
| 21 virtual void AddSink(VideoSinkInterface<VideoFrameT>* sink) = 0; | |
| 22 virtual void RemoveSink(VideoSinkInterface<VideoFrameT>* sink) = 0; | |
| 23 | |
| 24 protected: | |
| 25 virtual ~VideoSourceInterface() {}; | |
| 26 }; | |
| 27 | |
| 28 template <typename VideoFrameT> | |
| 29 class VideoSourceBase : public VideoSourceInterface<VideoFrameT> { | |
|
pthatcher
2016/02/01 18:40:54
Where is the impl of this?
perkj_webrtc
2016/02/02 16:24:00
Sorry - maybe I was unclear yesterday- the cl was
| |
| 30 public: | |
| 31 void AddSink(VideoSinkInterface<VideoFrameT>* sink) override; | |
| 32 void RemoveSink(VideoSinkInterface<VideoFrameT>* sink) override; | |
| 33 | |
| 34 protected: | |
| 35 virtual ~VideoSourceBase(); | |
| 36 | |
| 37 bool HasSinks() const { return !sinks_.empty(); } | |
| 38 void DeliverFrame(const VideoFrameT*); | |
|
pthatcher
2016/02/01 18:40:54
Can you call this DeliverFrameToSinks, or better,
nisse-webrtc
2016/02/02 09:52:30
I'm not entirely sure we should have a general mux
perkj_webrtc
2016/02/02 16:24:00
Done.
| |
| 39 | |
| 40 private: | |
| 41 VideoSinkCapabilities capabilities_; | |
|
pthatcher
2016/02/01 18:40:54
Is this a merged capabilities? Is it worth storin
perkj_webrtc
2016/02/02 16:24:00
First attempt I would just like this to handle the
| |
| 42 std::vector<VideoSinkInterface<VideoFrameT>*> sinks_; | |
| 43 }; | |
| 44 | |
| 45 } // namespace rtc | |
| 46 #endif // MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ | |
| OLD | NEW |