Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: webrtc/voice_engine/channel.h

Issue 1949533002: WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Retained Channel API by adding overloads; also add intended AudioReceiveStream API Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/voice_engine/channel.h
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index ac49e287521a917085f1490f43d36a094e8695fa..7c2d2cfa90fc46cd16c2efdb42868f849e93102f 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -175,10 +175,18 @@ class Channel
uint32_t instanceId,
RtcEventLog* const event_log,
const Config& config);
+ static int32_t CreateChannel(
+ Channel*& channel,
+ int32_t channelId,
+ uint32_t instanceId,
+ RtcEventLog* const event_log,
+ const Config& config,
+ std::shared_ptr<AudioDecoderFactory> decoder_factory);
Channel(int32_t channelId,
uint32_t instanceId,
RtcEventLog* const event_log,
- const Config& config);
+ const Config& config,
+ std::shared_ptr<AudioDecoderFactory> decoder_factory);
int32_t Init();
int32_t SetEngineInformation(Statistics& engineStatistics,
OutputMixer& outputMixer,
@@ -191,6 +199,12 @@ class Channel
void SetSink(std::unique_ptr<AudioSinkInterface> sink);
+ // TODO(ossu): Don't use! It's only here to confirm that the decoder factory
+ // passed into AudioReceiveStream is the same as the one set when creating the
+ // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can
+ // go.
+ const std::shared_ptr<AudioDecoderFactory>& GetAudioDecoderFactory() const;
+
// API methods
// VoEBase
@@ -574,6 +588,9 @@ class Channel
std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
+
+ // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed.
+ std::shared_ptr<AudioDecoderFactory> decoder_factory_;
};
} // namespace voe

Powered by Google App Engine
This is Rietveld 408576698