AudioSource allows implementations to return settings
So far the code assumed that there is only one implementation of AudioSourceInterface: LocalAudioSource. That is not true. This change allows custom implementations to still set options (such as audio network adaptation) on the source. Long term solution should include refactoring options so that they are passed to peer connection or call object, and not be defined on audio source. Bug: webrtc:9719 Change-Id: Ic3b92219502bc73a964adbbb9c5cd7156aa382e1 Reviewed-on: https://webrtc-review.googlesource.com/c/110681 Commit-Queue: Peter Slatala <psla@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25626}
This commit is contained in:
committed by
Commit Bot
parent
bc4cf89d91
commit
95ca6e1692
@ -23,6 +23,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/audio_options.h"
|
||||
#include "api/video/video_frame.h"
|
||||
#include "api/video/video_sink_interface.h"
|
||||
#include "api/video/video_source_interface.h"
|
||||
@ -207,6 +208,11 @@ class AudioSourceInterface : public MediaSourceInterface {
|
||||
// TODO(tommi): Make pure virtual.
|
||||
virtual void AddSink(AudioTrackSinkInterface* sink) {}
|
||||
virtual void RemoveSink(AudioTrackSinkInterface* sink) {}
|
||||
|
||||
// Returns options for the AudioSource.
|
||||
// (for some of the settings this approach is broken, e.g. setting
|
||||
// audio network adaptation on the source is the wrong layer of abstraction).
|
||||
virtual const cricket::AudioOptions options() const;
|
||||
};
|
||||
|
||||
// Interface of the audio processor used by the audio track to collect
|
||||
|
||||
Reference in New Issue
Block a user