blob: becdc8e562db9f38437219b2a7c038aecf786590 [file] [log] [blame]
Markus Handell15f2ff42019-11-22 10:34:37 +01001/*
2 * Copyright 2019 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 PC_VIDEO_RTP_TRACK_SOURCE_H_
12#define PC_VIDEO_RTP_TRACK_SOURCE_H_
13
14#include "media/base/video_broadcaster.h"
15#include "pc/video_track_source.h"
16
17namespace webrtc {
18
19// Video track source in use by VideoRtpReceiver
20class VideoRtpTrackSource : public VideoTrackSource {
21 public:
22 VideoRtpTrackSource();
23
24 // VideoTrackSource
25 rtc::VideoSourceInterface<VideoFrame>* source() override;
26 rtc::VideoSinkInterface<VideoFrame>* sink();
27
28 private:
29 // |broadcaster_| is needed since the decoder can only handle one sink.
30 // It might be better if the decoder can handle multiple sinks and consider
31 // the VideoSinkWants.
32 rtc::VideoBroadcaster broadcaster_;
33
34 RTC_DISALLOW_COPY_AND_ASSIGN(VideoRtpTrackSource);
35};
36
37} // namespace webrtc
38
39#endif // PC_VIDEO_RTP_TRACK_SOURCE_H_