video_track_source_proxy.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright 2012 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. #ifndef API_VIDEO_TRACK_SOURCE_PROXY_H_
  11. #define API_VIDEO_TRACK_SOURCE_PROXY_H_
  12. #include "api/media_stream_interface.h"
  13. #include "api/proxy.h"
  14. namespace webrtc {
  15. // Makes sure the real VideoTrackSourceInterface implementation is destroyed on
  16. // the signaling thread and marshals all method calls to the signaling thread.
  17. // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
  18. // are called on is an implementation detail.
  19. BEGIN_PROXY_MAP(VideoTrackSource)
  20. PROXY_SIGNALING_THREAD_DESTRUCTOR()
  21. PROXY_CONSTMETHOD0(SourceState, state)
  22. BYPASS_PROXY_CONSTMETHOD0(bool, remote)
  23. BYPASS_PROXY_CONSTMETHOD0(bool, is_screencast)
  24. PROXY_CONSTMETHOD0(absl::optional<bool>, needs_denoising)
  25. PROXY_METHOD1(bool, GetStats, Stats*)
  26. PROXY_WORKER_METHOD2(void,
  27. AddOrUpdateSink,
  28. rtc::VideoSinkInterface<VideoFrame>*,
  29. const rtc::VideoSinkWants&)
  30. PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
  31. PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
  32. PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
  33. PROXY_CONSTMETHOD0(bool, SupportsEncodedOutput)
  34. PROXY_WORKER_METHOD0(void, GenerateKeyFrame)
  35. PROXY_WORKER_METHOD1(void,
  36. AddEncodedSink,
  37. rtc::VideoSinkInterface<RecordableEncodedFrame>*)
  38. PROXY_WORKER_METHOD1(void,
  39. RemoveEncodedSink,
  40. rtc::VideoSinkInterface<RecordableEncodedFrame>*)
  41. END_PROXY_MAP()
  42. } // namespace webrtc
  43. #endif // API_VIDEO_TRACK_SOURCE_PROXY_H_