Updated VideoStreamEncoder to destroy encoder_queue_ before encoder_switch_experiment_.
Bug: none Change-Id: I0d72fd0b851bd3f9b5021bc9b51af5da882483dd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157044 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29484}
This commit is contained in:
parent
4ed0b52c12
commit
e5d0fe0dff
@ -525,11 +525,11 @@ VideoStreamEncoder::VideoStreamEncoder(
|
||||
frame_encode_metadata_writer_(this),
|
||||
experiment_groups_(GetExperimentGroups()),
|
||||
next_frame_id_(0),
|
||||
encoder_switch_experiment_(ParseEncoderSwitchFieldTrial()),
|
||||
encoder_switch_requested_(false),
|
||||
encoder_queue_(task_queue_factory->CreateTaskQueue(
|
||||
"EncoderQueue",
|
||||
TaskQueueFactory::Priority::NORMAL)),
|
||||
encoder_switch_experiment_(ParseEncoderSwitchFieldTrial()),
|
||||
encoder_switch_requested_(false) {
|
||||
TaskQueueFactory::Priority::NORMAL)) {
|
||||
RTC_DCHECK(encoder_stats_observer);
|
||||
RTC_DCHECK(overuse_detector_);
|
||||
RTC_DCHECK_GE(number_of_cores, 1);
|
||||
|
||||
@ -389,10 +389,6 @@ class VideoStreamEncoder : public VideoStreamEncoderInterface,
|
||||
std::array<std::array<int64_t, kMaxEncoderBuffers>, kMaxSimulcastStreams>
|
||||
encoder_buffer_state_ RTC_GUARDED_BY(encoded_image_lock_);
|
||||
|
||||
// All public methods are proxied to |encoder_queue_|. It must must be
|
||||
// destroyed first to make sure no tasks are run that use other members.
|
||||
rtc::TaskQueue encoder_queue_;
|
||||
|
||||
struct EncoderSwitchExperiment {
|
||||
struct Thresholds {
|
||||
absl::optional<DataRate> bitrate;
|
||||
@ -429,6 +425,10 @@ class VideoStreamEncoder : public VideoStreamEncoderInterface,
|
||||
// track of whether a request has been made or not.
|
||||
bool encoder_switch_requested_ RTC_GUARDED_BY(&encoder_queue_);
|
||||
|
||||
// All public methods are proxied to |encoder_queue_|. It must must be
|
||||
// destroyed first to make sure no tasks are run that use other members.
|
||||
rtc::TaskQueue encoder_queue_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(VideoStreamEncoder);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user