RTCVideoSource.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2015 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. #import <Foundation/Foundation.h>
  11. #import <WebRTC/RTCMacros.h>
  12. #import <WebRTC/RTCMediaSource.h>
  13. #import <WebRTC/RTCVideoCapturer.h>
  14. NS_ASSUME_NONNULL_BEGIN
  15. RTC_OBJC_EXPORT
  16. @interface RTC_OBJC_TYPE (RTCVideoSource) : RTC_OBJC_TYPE(RTCMediaSource) <RTC_OBJC_TYPE(RTCVideoCapturerDelegate)>
  17. - (instancetype)init NS_UNAVAILABLE;
  18. /**
  19. * Calling this function will cause frames to be scaled down to the
  20. * requested resolution. Also, frames will be cropped to match the
  21. * requested aspect ratio, and frames will be dropped to match the
  22. * requested fps. The requested aspect ratio is orientation agnostic and
  23. * will be adjusted to maintain the input orientation, so it doesn't
  24. * matter if e.g. 1280x720 or 720x1280 is requested.
  25. */
  26. - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps;
  27. @end
  28. NS_ASSUME_NONNULL_END