FBScreenRecordingContainer.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. *
  3. * Copyright (c) 2015-present, Facebook, Inc.
  4. * All rights reserved.
  5. *
  6. * This source code is licensed under the BSD-style license found in the
  7. * LICENSE file in the root directory of this source tree. An additional grant
  8. * of patent rights can be found in the PATENTS file in the same directory.
  9. */
  10. #import <Foundation/Foundation.h>
  11. NS_ASSUME_NONNULL_BEGIN
  12. @class FBScreenRecordingPromise;
  13. @interface FBScreenRecordingContainer : NSObject
  14. /** The amount of video FPS */
  15. @property (readonly, nonatomic) NSUInteger fps;
  16. /** Codec to use, where 0 is h264, 1 - HEVC */
  17. @property (readonly, nonatomic) long long codec;
  18. /** Keep the currently active screen resording promise. Equals to nil if no active screen recordings are running */
  19. @property (readonly, nonatomic, nullable) FBScreenRecordingPromise* screenRecordingPromise;
  20. /** The timestamp of the video startup as Unix float seconds */
  21. @property (readonly, nonatomic, nullable) NSNumber *startedAt;
  22. /**
  23. @return singleton instance
  24. */
  25. + (instancetype)sharedInstance;
  26. /**
  27. Keeps current screen recording promise
  28. @param screenRecordingPromise a promise to set
  29. @param fps FPS value
  30. @param codec Codec value
  31. */
  32. - (void)storeScreenRecordingPromise:(FBScreenRecordingPromise *)screenRecordingPromise
  33. fps:(NSUInteger)fps
  34. codec:(long long)codec;
  35. /**
  36. Resets the current screen recording promise
  37. */
  38. - (void)reset;
  39. /**
  40. Transforms the container content to a dictionary.
  41. @return May return nil if no screen recording is currently running
  42. */
  43. - (nullable NSDictionary *)toDictionary;
  44. @end
  45. NS_ASSUME_NONNULL_END