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" 15 #include "rtc_base/thread.h" 16 17 namespace webrtc { 18 19 // Creates a proxy source for `source` which makes sure the real 20 // VideoTrackSourceInterface implementation is destroyed on the signaling thread 21 // and marshals calls to `worker_thread` and `signaling_thread`. 22 rtc::scoped_refptr<VideoTrackSourceInterface> RTC_EXPORT 23 CreateVideoTrackSourceProxy(rtc::Thread* signaling_thread, 24 rtc::Thread* worker_thread, 25 VideoTrackSourceInterface* source); 26 27 } // namespace webrtc 28 29 #endif // API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_ 30