Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit bd8124b

Browse files
jianjunztaste1981
authored andcommitted
Fix undefined symbols error for iOS. (#174)
Some features are only available on Windows and Linux.
1 parent b306cf0 commit bd8124b

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

talk/owt/sdk/base/peerconnectiondependencyfactory.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ void PeerConnectionDependencyFactory::
140140
#endif
141141
rtc::scoped_refptr<AudioDeviceModule> adm;
142142

143+
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
143144
// Raw audio frame
144145
// if adm is nullptr, voe_base will initilize it with the default internal
145146
// adm.
146-
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
147147
if (GlobalConfiguration::GetCustomizedAudioInputEnabled()) {
148148
// Create ADM on worker thred as RegisterAudioCallback is invoked there.
149149
adm = worker_thread->Invoke<rtc::scoped_refptr<AudioDeviceModule>>(

talk/owt/sdk/base/stream.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void Stream::SetAudioTracksEnabled(bool enabled) {
150150
}
151151
}
152152

153+
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
153154
void Stream::AttachVideoRenderer(VideoRendererInterface& renderer) {
154155
if (media_stream_ == nullptr) {
155156
RTC_LOG(LS_ERROR) << "Cannot attach an audio only stream to a renderer.";
@@ -197,8 +198,6 @@ void Stream::AttachAudioPlayer(AudioPlayerInterface& player) {
197198
RTC_LOG(LS_INFO) << "Attached the stream to a renderer.";
198199
}
199200

200-
201-
#if defined(WEBRTC_WIN)
202201
void Stream::AttachVideoRenderer(VideoRenderWindow& render_window) {
203202
if (media_stream_ == nullptr) {
204203
RTC_LOG(LS_ERROR) << "Cannot attach an audio only stream to a renderer.";

talk/owt/sdk/include/cpp/owt/base/stream.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ class Stream {
7575
virtual void EnableAudio();
7676
/// Enable all video tracks of the stream.
7777
virtual void EnableVideo();
78-
/// Attach the stream to a renderer to receive ARGB/I420 frames for local or
79-
/// remote stream. Be noted if you turned hardware acceleration on, calling
80-
/// this API on remote stream will have no effect.
81-
virtual void AttachVideoRenderer(VideoRendererInterface& renderer);
82-
/// Attach the stream to an audio player that receives PCM data besides sending to
83-
/// audio output device.
84-
virtual void AttachAudioPlayer(AudioPlayerInterface& player);
8578
/**
8679
@brief Returns a user-defined attribute map.
8780
@details These attributes are defined by publisher. P2P mode always return
@@ -98,10 +91,17 @@ class Stream {
9891
from mixed stream, it will be set as kMixed.
9992
*/
10093
virtual StreamSourceInfo Source() const;
101-
#if defined(WEBRTC_WIN)
94+
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
95+
/// Attach the stream to a renderer to receive ARGB/I420 frames for local or
96+
/// remote stream. Be noted if you turned hardware acceleration on, calling
97+
/// this API on remote stream will have no effect.
98+
virtual void AttachVideoRenderer(VideoRendererInterface& renderer);
10299
/// Attach the stream to a renderer to receive frames from decoder.
103100
/// Both I420 frame and native surface is supported.
104101
virtual void AttachVideoRenderer(VideoRenderWindow& render_window);
102+
/// Attach the stream to an audio player that receives PCM data besides sending to
103+
/// audio output device.
104+
virtual void AttachAudioPlayer(AudioPlayerInterface& player);
105105
#endif
106106
/// Detach the stream from its renderer.
107107
virtual void DetachVideoRenderer();

0 commit comments

Comments
 (0)