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