| Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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. |
| 9 | */ |
| 10 | |
| 11 | #ifndef API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_ |
| 12 | #define API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_ |
| 13 | |
| 14 | #include "api/media_stream_interface.h" |
| Dor Hen | 28ce65c | 2024-09-04 11:55:22 | [diff] [blame] | 15 | #include "api/scoped_refptr.h" |
| 16 | #include "rtc_base/system/rtc_export.h" |
| Mirko Bonadei | 9d9c2d5 | 2022-10-07 21:47:49 | [diff] [blame] | 17 | #include "rtc_base/thread.h" |
| Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 18 | |
| 19 | namespace webrtc { |
| 20 | |
| Artem Titov | 0e61fdd | 2021-07-25 19:50:14 | [diff] [blame] | 21 | // Creates a proxy source for `source` which makes sure the real |
| Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 22 | // VideoTrackSourceInterface implementation is destroyed on the signaling thread |
| Artem Titov | 0e61fdd | 2021-07-25 19:50:14 | [diff] [blame] | 23 | // and marshals calls to `worker_thread` and `signaling_thread`. |
| Evan Shrubsole | ee5ab34 | 2025-04-15 14:49:46 | [diff] [blame] | 24 | scoped_refptr<VideoTrackSourceInterface> RTC_EXPORT |
| Evan Shrubsole | 6a9a1ae | 2025-03-21 12:54:15 | [diff] [blame] | 25 | CreateVideoTrackSourceProxy(Thread* signaling_thread, |
| 26 | Thread* worker_thread, |
| Markus Handell | e93fe6c | 2021-05-20 20:46:31 | [diff] [blame] | 27 | VideoTrackSourceInterface* source); |
| 28 | |
| 29 | } // namespace webrtc |
| 30 | |
| 31 | #endif // API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_ |