CoolVideoInfo.m 700 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // Created by Caijinglong on 2019-03-15.
  3. //
  4. #import "CoolVideoInfo.h"
  5. @implementation CoolVideoInfo {
  6. }
  7. - (instancetype)init {
  8. self = [super init];
  9. if (self) {
  10. self.degree = 0;
  11. }
  12. return self;
  13. }
  14. - (NSDictionary *)toMap {
  15. NSMutableDictionary *dict = [NSMutableDictionary new];
  16. dict[@"width"] = @((int) self.size.width);
  17. dict[@"height"] = @((int) self.size.height);
  18. dict[@"duration"] = @(self.duration);
  19. dict[@"currentPosition"] = @(self.currentPosition);
  20. dict[@"isPlaying"] = @(self.isPlaying);
  21. dict[@"degree"] = @(self.degree);
  22. dict[@"tcpSpeed"] = @(self.tcpSpeed);
  23. dict[@"outputFps"] = @(self.outputFps);
  24. return dict;
  25. }
  26. @end