webrtc/pc/videotracksource.h
Danil Chapovalov 66cadcc6b9 Replace rtc::Optional with absl::optional in pc
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'pc'

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ide3b9eb32df7f25991f898ac58fcb119c9f8ae12
Reviewed-on: https://webrtc-review.googlesource.com/84181
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23669}
2018-06-19 20:55:07 +00:00

54 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_VIDEOTRACKSOURCE_H_
#define PC_VIDEOTRACKSOURCE_H_
#include "api/mediastreaminterface.h"
#include "api/notifier.h"
#include "api/video/video_sink_interface.h"
#include "media/base/mediachannel.h"
#include "rtc_base/thread_checker.h"
namespace webrtc {
// VideoTrackSource is a convenience base class for implementations of
// VideoTrackSourceInterface.
class 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_VIDEOTRACKSOURCE_H_