blob: 2af3aedb229a9385f139b7891f142e3327969e10 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:361/*
kjellanderb24317b2016-02-10 15:54:432 * Copyright 2011 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:363 *
kjellanderb24317b2016-02-10 15:54:434 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:369 */
10
11// This file includes proxy classes for tracks. The purpose is
12// to make sure tracks are only accessed from the signaling thread.
13
Markus Handella1b82012021-05-26 16:56:3014#ifndef PC_MEDIA_STREAM_TRACK_PROXY_H_
15#define PC_MEDIA_STREAM_TRACK_PROXY_H_
henrike@webrtc.org28e20752013-07-10 00:45:3616
oprypin803dc292017-02-01 09:55:5917#include <string>
18
Steve Anton10542f22019-01-11 17:11:0019#include "api/media_stream_interface.h"
Markus Handella1b82012021-05-26 16:56:3020#include "pc/proxy.h"
henrike@webrtc.org28e20752013-07-10 00:45:3621
22namespace webrtc {
23
Markus Handella1b82012021-05-26 16:56:3024// TODO(deadbeef): Move this to .cc file. What threads methods are called on is
25// an implementation detail.
Mirko Bonadei9d9b8de2021-02-26 08:51:2626BEGIN_PRIMARY_PROXY_MAP(AudioTrack)
27PROXY_PRIMARY_THREAD_DESTRUCTOR()
Tomas Gunnarssonfc83cdc2020-09-10 11:04:5028BYPASS_PROXY_CONSTMETHOD0(std::string, kind)
29BYPASS_PROXY_CONSTMETHOD0(std::string, id)
Yves Gerey665174f2018-06-19 13:03:0530PROXY_CONSTMETHOD0(TrackState, state)
31PROXY_CONSTMETHOD0(bool, enabled)
Tommi816134a2021-05-24 14:54:4132BYPASS_PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource)
Yves Gerey665174f2018-06-19 13:03:0533PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*)
34PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*)
35PROXY_METHOD1(bool, GetSignalLevel, int*)
36PROXY_METHOD0(rtc::scoped_refptr<AudioProcessorInterface>, GetAudioProcessor)
Tomas Gunnarssone7b4c132022-02-14 11:03:2937PROXY_METHOD1(bool, set_enabled, bool)
Yves Gerey665174f2018-06-19 13:03:0538PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
39PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
Markus Handell3d46d0b2021-05-27 19:42:5740END_PROXY_MAP(AudioTrack)
henrike@webrtc.org28e20752013-07-10 00:45:3641
nisse72c8d2b2016-04-15 10:49:0742BEGIN_PROXY_MAP(VideoTrack)
Mirko Bonadei9d9b8de2021-02-26 08:51:2643PROXY_PRIMARY_THREAD_DESTRUCTOR()
Tomas Gunnarssonfc83cdc2020-09-10 11:04:5044BYPASS_PROXY_CONSTMETHOD0(std::string, kind)
45BYPASS_PROXY_CONSTMETHOD0(std::string, id)
Tomas Gunnarssone7b4c132022-02-14 11:03:2946PROXY_SECONDARY_CONSTMETHOD0(TrackState, state)
Tomas Gunnarsson250c31d2022-02-14 22:48:4147PROXY_CONSTMETHOD0(bool, enabled)
48PROXY_METHOD1(bool, set_enabled, bool)
Tomas Gunnarssondfd69c22022-02-15 12:56:5049PROXY_CONSTMETHOD0(ContentHint, content_hint)
50PROXY_METHOD1(void, set_content_hint, ContentHint)
Mirko Bonadei9d9b8de2021-02-26 08:51:2651PROXY_SECONDARY_METHOD2(void,
52 AddOrUpdateSink,
53 rtc::VideoSinkInterface<VideoFrame>*,
54 const rtc::VideoSinkWants&)
55PROXY_SECONDARY_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
Markus Handelldbef2bd2021-12-22 09:47:2756PROXY_SECONDARY_METHOD0(void, RequestRefreshFrame)
Tommi816134a2021-05-24 14:54:4157BYPASS_PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource)
henrike@webrtc.org28e20752013-07-10 00:45:3658
Yves Gerey665174f2018-06-19 13:03:0559PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
60PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
Markus Handell3d46d0b2021-05-27 19:42:5761END_PROXY_MAP(VideoTrack)
henrike@webrtc.org28e20752013-07-10 00:45:3662
63} // namespace webrtc
64
Markus Handella1b82012021-05-26 16:56:3065#endif // PC_MEDIA_STREAM_TRACK_PROXY_H_