Provide the option of injecting rtc::TaskQueue when creating RtcEventLogImpl via factory methods.

Bug: webrtc:9004
Change-Id: Ia7cc96074dbf84f576e5fb0762866b213ec8e69f
Reviewed-on: https://webrtc-review.googlesource.com/63022
Commit-Queue: Dino Radaković <dinor@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22520}
This commit is contained in:
Dino Radaković
2018-03-20 18:15:39 +01:00
committed by Commit Bot
parent fe48ee9e2c
commit e9d2e4d3fb
6 changed files with 38 additions and 5 deletions

View File

@ -17,6 +17,7 @@
#include "api/rtceventlogoutput.h"
#include "logging/rtc_event_log/events/rtc_event.h"
#include "rtc_base/task_queue.h"
namespace webrtc {
@ -37,6 +38,12 @@ class RtcEventLog {
// Factory method to create an RtcEventLog object.
static std::unique_ptr<RtcEventLog> Create(EncodingType encoding_type);
// Factory method to create an RtcEventLog object which uses the given
// rtc::TaskQueue for emitting output.
static std::unique_ptr<RtcEventLog> Create(
EncodingType encoding_type,
std::unique_ptr<rtc::TaskQueue> task_queue);
// Create an RtcEventLog object that does nothing.
static std::unique_ptr<RtcEventLog> CreateNull();