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

Commit 39ed411

Browse files
JinChengShiJinChengShi
andauthored
Enable AttachVideoRenderer of VideoRendererInterface on linux. (#470)
Co-authored-by: JinChengShi <[email protected]>
1 parent 3d15b28 commit 39ed411

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

talk/owt/sdk/base/stream.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void Stream::AttachAudioPlayer(AudioPlayerInterface& player) {
204204
RTC_LOG(LS_INFO) << "Attached the stream to a renderer.";
205205
}
206206

207-
#if defined(WEBRTC_WIN)
207+
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
208208
void Stream::AttachVideoRenderer(VideoRendererInterface& renderer) {
209209
if (media_stream_ == nullptr) {
210210
RTC_LOG(LS_ERROR) << "Cannot attach an audio only stream to a renderer.";

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,19 @@ class Stream {
114114
*/
115115
virtual StreamSourceInfo Source() const;
116116

117+
/// Attach the stream to an audio player that receives PCM data besides sending to
118+
/// audio output device.
117119
virtual void AttachAudioPlayer(AudioPlayerInterface& player);
118120

119121
#if defined(WEBRTC_LINUX)
122+
/// Attach the stream to a Linux VA renderer.
123+
virtual void AttachVideoRenderer(VideoRendererVaInterface& renderer);
124+
125+
#endif
126+
#if defined(WEBRTC_WIN) || defined(WEBRTC_LINUX)
120127
/// Attach the stream to a renderer to receive ARGB/I420 frames for local or
121128
/// remote stream. Be noted if you turned hardware acceleration on, calling
122129
/// this API on remote stream will have no effect.
123-
virtual void AttachVideoRenderer(VideoRendererVaInterface& renderer);
124-
/// Attach the stream to an audio player that receives PCM data besides sending to
125-
/// audio output device.
126-
#endif
127-
#if defined(WEBRTC_WIN)
128-
/// Attach the stream to a Linux VA renderer.
129130
virtual void AttachVideoRenderer(VideoRendererInterface& renderer);
130131
#endif
131132

0 commit comments

Comments
 (0)