/* * Copyright 2018 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 VIDEO_VIDEO_ANALYZER_H_ #define VIDEO_VIDEO_ANALYZER_H_
// Implements VideoSinkInterface to receive captured frames from a // FrameGeneratorCapturer. Implements VideoSourceInterface to be able to act // as a source to VideoSendStream. // It forwards all input frames to the VideoAnalyzer for later comparison and // forwards the captured frames to the VideoSendStream. class CapturedFrameForwarder : public rtc::VideoSinkInterface<VideoFrame>, public rtc::VideoSourceInterface<VideoFrame> { public:
CapturedFrameForwarder(VideoAnalyzer* analyzer,
Clock* clock, int frames_to_capture,
TimeDelta test_duration); void SetSource(rtc::VideoSourceInterface<VideoFrame>* video_source);
// Called when `send_stream_.SetSource()` is called. void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, const rtc::VideoSinkWants& wants)
RTC_LOCKS_EXCLUDED(lock_) override;
// Called by `send_stream_` when `send_stream_.SetSource()` is called. void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink)
RTC_LOCKS_EXCLUDED(lock_) override;
void PollStats() RTC_LOCKS_EXCLUDED(comparison_lock_); staticvoid FrameComparisonThread(void* obj); bool CompareFrames(); bool PopComparison(FrameComparison* comparison); // Increment counter for number of frames received for comparison. void FrameRecorded() RTC_EXCLUSIVE_LOCKS_REQUIRED(comparison_lock_); // Returns true if all frames to be compared have been taken from the queue. bool AllFramesRecorded() RTC_LOCKS_EXCLUDED(comparison_lock_); bool AllFramesRecordedLocked() RTC_EXCLUSIVE_LOCKS_REQUIRED(comparison_lock_); // Increase count of number of frames processed. Returns true if this was the // last frame to be processed. bool FrameProcessed() RTC_LOCKS_EXCLUDED(comparison_lock_); void PrintResults() RTC_LOCKS_EXCLUDED(lock_, comparison_lock_); void PerformFrameComparison(const FrameComparison& comparison)
RTC_LOCKS_EXCLUDED(comparison_lock_); void PrintResult(absl::string_view result_type, const SamplesStatsCounter& stats,
webrtc::test::Unit unit,
webrtc::test::ImprovementDirection improvement_direction); void PrintResultWithExternalMean(
absl::string_view result_type, double mean, const SamplesStatsCounter& stats,
webrtc::test::Unit unit,
webrtc::test::ImprovementDirection improvement_direction); void PrintSamplesToFile(void) RTC_LOCKS_EXCLUDED(comparison_lock_); void AddCapturedFrameForComparison(const VideoFrame& video_frame)
RTC_LOCKS_EXCLUDED(lock_, comparison_lock_);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.