blob: e0f94dc881c77cdbcb538f6028a3e59d76352138 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * 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:36 +00009 */
10
Henrik Kjellander15583c12016-02-10 10:53:12 +010011#ifndef WEBRTC_API_VIDEOSOURCEPROXY_H_
12#define WEBRTC_API_VIDEOSOURCEPROXY_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
Henrik Kjellander15583c12016-02-10 10:53:12 +010014#include "webrtc/api/proxy.h"
15#include "webrtc/api/videosourceinterface.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000016
17namespace webrtc {
18
19// VideoSourceProxy makes sure the real VideoSourceInterface implementation is
20// destroyed on the signaling thread and marshals all method calls to the
21// signaling thread.
22BEGIN_PROXY_MAP(VideoSource)
23 PROXY_CONSTMETHOD0(SourceState, state)
tommi6eca7e32015-12-15 04:27:11 -080024 PROXY_CONSTMETHOD0(bool, remote)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000025 PROXY_METHOD0(cricket::VideoCapturer*, GetVideoCapturer)
perkj@webrtc.org8f605e82015-02-17 13:53:56 +000026 PROXY_METHOD0(void, Stop)
27 PROXY_METHOD0(void, Restart)
perkjf2880a02016-03-03 01:51:52 -080028 PROXY_METHOD2(void, AddOrUpdateSink,
29 rtc::VideoSinkInterface<cricket::VideoFrame>*,
30 const rtc::VideoSinkWants&)
nissee73afba2016-01-28 04:47:08 -080031 PROXY_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<cricket::VideoFrame>*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000032 PROXY_CONSTMETHOD0(const cricket::VideoOptions*, options)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033 PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
34 PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
35END_PROXY()
36
37} // namespace webrtc
38
Henrik Kjellander15583c12016-02-10 10:53:12 +010039#endif // WEBRTC_API_VIDEOSOURCEPROXY_H_