henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 15:54:43 | [diff] [blame] | 2 | * Copyright 2011 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 15:54:43 | [diff] [blame] | 4 | * 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.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 9 | */ |
| 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 Handell | a1b8201 | 2021-05-26 16:56:30 | [diff] [blame] | 14 | #ifndef PC_MEDIA_STREAM_TRACK_PROXY_H_ |
| 15 | #define PC_MEDIA_STREAM_TRACK_PROXY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 16 | |
oprypin | 803dc29 | 2017-02-01 09:55:59 | [diff] [blame] | 17 | #include <string> |
| 18 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 19 | #include "api/media_stream_interface.h" |
Markus Handell | a1b8201 | 2021-05-26 16:56:30 | [diff] [blame] | 20 | #include "pc/proxy.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 21 | |
| 22 | namespace webrtc { |
| 23 | |
Markus Handell | a1b8201 | 2021-05-26 16:56:30 | [diff] [blame] | 24 | // TODO(deadbeef): Move this to .cc file. What threads methods are called on is |
| 25 | // an implementation detail. |
Mirko Bonadei | 9d9b8de | 2021-02-26 08:51:26 | [diff] [blame] | 26 | BEGIN_PRIMARY_PROXY_MAP(AudioTrack) |
| 27 | PROXY_PRIMARY_THREAD_DESTRUCTOR() |
Tomas Gunnarsson | fc83cdc | 2020-09-10 11:04:50 | [diff] [blame] | 28 | BYPASS_PROXY_CONSTMETHOD0(std::string, kind) |
| 29 | BYPASS_PROXY_CONSTMETHOD0(std::string, id) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 30 | PROXY_CONSTMETHOD0(TrackState, state) |
| 31 | PROXY_CONSTMETHOD0(bool, enabled) |
Tommi | 816134a | 2021-05-24 14:54:41 | [diff] [blame] | 32 | BYPASS_PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 33 | PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*) |
| 34 | PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*) |
| 35 | PROXY_METHOD1(bool, GetSignalLevel, int*) |
| 36 | PROXY_METHOD0(rtc::scoped_refptr<AudioProcessorInterface>, GetAudioProcessor) |
Tomas Gunnarsson | e7b4c13 | 2022-02-14 11:03:29 | [diff] [blame] | 37 | PROXY_METHOD1(bool, set_enabled, bool) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 38 | PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) |
| 39 | PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) |
Markus Handell | 3d46d0b | 2021-05-27 19:42:57 | [diff] [blame] | 40 | END_PROXY_MAP(AudioTrack) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 41 | |
nisse | 72c8d2b | 2016-04-15 10:49:07 | [diff] [blame] | 42 | BEGIN_PROXY_MAP(VideoTrack) |
Mirko Bonadei | 9d9b8de | 2021-02-26 08:51:26 | [diff] [blame] | 43 | PROXY_PRIMARY_THREAD_DESTRUCTOR() |
Tomas Gunnarsson | fc83cdc | 2020-09-10 11:04:50 | [diff] [blame] | 44 | BYPASS_PROXY_CONSTMETHOD0(std::string, kind) |
| 45 | BYPASS_PROXY_CONSTMETHOD0(std::string, id) |
Tomas Gunnarsson | e7b4c13 | 2022-02-14 11:03:29 | [diff] [blame] | 46 | PROXY_SECONDARY_CONSTMETHOD0(TrackState, state) |
Tomas Gunnarsson | 250c31d | 2022-02-14 22:48:41 | [diff] [blame] | 47 | PROXY_CONSTMETHOD0(bool, enabled) |
| 48 | PROXY_METHOD1(bool, set_enabled, bool) |
Tomas Gunnarsson | dfd69c2 | 2022-02-15 12:56:50 | [diff] [blame] | 49 | PROXY_CONSTMETHOD0(ContentHint, content_hint) |
| 50 | PROXY_METHOD1(void, set_content_hint, ContentHint) |
Mirko Bonadei | 9d9b8de | 2021-02-26 08:51:26 | [diff] [blame] | 51 | PROXY_SECONDARY_METHOD2(void, |
| 52 | AddOrUpdateSink, |
| 53 | rtc::VideoSinkInterface<VideoFrame>*, |
| 54 | const rtc::VideoSinkWants&) |
| 55 | PROXY_SECONDARY_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*) |
Markus Handell | dbef2bd | 2021-12-22 09:47:27 | [diff] [blame] | 56 | PROXY_SECONDARY_METHOD0(void, RequestRefreshFrame) |
Tommi | 816134a | 2021-05-24 14:54:41 | [diff] [blame] | 57 | BYPASS_PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 58 | |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 59 | PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) |
| 60 | PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) |
Markus Handell | 3d46d0b | 2021-05-27 19:42:57 | [diff] [blame] | 61 | END_PROXY_MAP(VideoTrack) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 62 | |
| 63 | } // namespace webrtc |
| 64 | |
Markus Handell | a1b8201 | 2021-05-26 16:56:30 | [diff] [blame] | 65 | #endif // PC_MEDIA_STREAM_TRACK_PROXY_H_ |