mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-15 14:50:39 +01:00

Mechanically generated by running this command: tools_webrtc/do-renames.sh update all-renames.txt && git cl format Then manually updating: tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc Bug: webrtc:10159 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833 Reviewed-on: https://webrtc-review.googlesource.com/c/115653 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26226}
55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
/*
|
|
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef PC_VIDEO_TRACK_SOURCE_H_
|
|
#define PC_VIDEO_TRACK_SOURCE_H_
|
|
|
|
#include "api/media_stream_interface.h"
|
|
#include "api/notifier.h"
|
|
#include "api/video/video_sink_interface.h"
|
|
#include "media/base/media_channel.h"
|
|
#include "rtc_base/system/rtc_export.h"
|
|
#include "rtc_base/thread_checker.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// VideoTrackSource is a convenience base class for implementations of
|
|
// VideoTrackSourceInterface.
|
|
class RTC_EXPORT VideoTrackSource : public Notifier<VideoTrackSourceInterface> {
|
|
public:
|
|
explicit VideoTrackSource(bool remote);
|
|
void SetState(SourceState new_state);
|
|
|
|
SourceState state() const override { return state_; }
|
|
bool remote() const override { return remote_; }
|
|
|
|
bool is_screencast() const override { return false; }
|
|
absl::optional<bool> needs_denoising() const override {
|
|
return absl::nullopt;
|
|
}
|
|
|
|
bool GetStats(Stats* stats) override { return false; }
|
|
|
|
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
|
const rtc::VideoSinkWants& wants) override;
|
|
void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override;
|
|
|
|
protected:
|
|
virtual rtc::VideoSourceInterface<VideoFrame>* source() = 0;
|
|
|
|
private:
|
|
rtc::ThreadChecker worker_thread_checker_;
|
|
SourceState state_;
|
|
const bool remote_;
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // PC_VIDEO_TRACK_SOURCE_H_
|