IJKSDLGLViewProtocol.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * IJKSDLGLViewProtocol.h
  3. *
  4. * Copyright (c) 2017 Bilibili
  5. * Copyright (c) 2017 raymond <raymondzheng1412@gmail.com>
  6. *
  7. * This file is part of ijkPlayer.
  8. *
  9. * ijkPlayer is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2.1 of the License, or (at your option) any later version.
  13. *
  14. * ijkPlayer is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with ijkPlayer; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. #ifndef IJKSDLGLViewProtocol_h
  24. #define IJKSDLGLViewProtocol_h
  25. #import <UIKit/UIKit.h>
  26. typedef struct IJKOverlay IJKOverlay;
  27. struct IJKOverlay {
  28. int w;
  29. int h;
  30. UInt32 format;
  31. int planes;
  32. UInt16 *pitches;
  33. UInt8 **pixels;
  34. int sar_num;
  35. int sar_den;
  36. CVPixelBufferRef pixel_buffer;
  37. };
  38. @protocol IJKSDLGLViewProtocol <NSObject>
  39. - (UIImage*) snapshot;
  40. @property(nonatomic, readonly) CGFloat fps;
  41. @property(nonatomic) CGFloat scaleFactor;
  42. @property(nonatomic) BOOL isThirdGLView;
  43. - (void) display_pixels: (IJKOverlay *) overlay;
  44. @end
  45. #endif /* IJKSDLGLViewProtocol_h */