qvideoframeformat.sip 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. // qvideoframeformat.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtMultimedia Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %If (Qt_6_2_0 -)
  22. class QVideoFrameFormat
  23. {
  24. %TypeHeaderCode
  25. #include <qvideoframeformat.h>
  26. %End
  27. public:
  28. enum PixelFormat
  29. {
  30. Format_Invalid,
  31. Format_YUV420P,
  32. Format_YUV422P,
  33. %If (Qt_6_4_0 -)
  34. Format_YUV420P10,
  35. %End
  36. Format_YV12,
  37. Format_UYVY,
  38. Format_YUYV,
  39. Format_NV12,
  40. Format_NV21,
  41. Format_IMC1,
  42. Format_IMC2,
  43. Format_IMC3,
  44. Format_IMC4,
  45. Format_Y8,
  46. Format_Y16,
  47. Format_P010,
  48. Format_P016,
  49. Format_Jpeg,
  50. Format_SamplerExternalOES,
  51. Format_ARGB8888,
  52. Format_ARGB8888_Premultiplied,
  53. Format_XRGB8888,
  54. Format_BGRA8888,
  55. Format_BGRA8888_Premultiplied,
  56. Format_BGRX8888,
  57. Format_ABGR8888,
  58. Format_XBGR8888,
  59. Format_RGBA8888,
  60. Format_RGBX8888,
  61. Format_AYUV,
  62. Format_AYUV_Premultiplied,
  63. Format_SamplerRect,
  64. };
  65. enum Direction
  66. {
  67. TopToBottom,
  68. BottomToTop,
  69. };
  70. enum YCbCrColorSpace
  71. {
  72. YCbCr_Undefined,
  73. YCbCr_BT601,
  74. YCbCr_BT709,
  75. YCbCr_xvYCC601,
  76. YCbCr_xvYCC709,
  77. YCbCr_JPEG,
  78. %If (Qt_6_3_0 -)
  79. YCbCr_BT2020,
  80. %End
  81. };
  82. QVideoFrameFormat();
  83. QVideoFrameFormat(const QSize &size, QVideoFrameFormat::PixelFormat pixelFormat);
  84. QVideoFrameFormat(const QVideoFrameFormat &format);
  85. ~QVideoFrameFormat();
  86. bool operator==(const QVideoFrameFormat &format) const;
  87. bool operator!=(const QVideoFrameFormat &format) const;
  88. bool isValid() const;
  89. QVideoFrameFormat::PixelFormat pixelFormat() const;
  90. QSize frameSize() const;
  91. void setFrameSize(const QSize &size);
  92. void setFrameSize(int width, int height);
  93. int frameWidth() const;
  94. int frameHeight() const;
  95. int planeCount() const;
  96. QRect viewport() const;
  97. void setViewport(const QRect &viewport);
  98. QVideoFrameFormat::Direction scanLineDirection() const;
  99. void setScanLineDirection(QVideoFrameFormat::Direction direction);
  100. qreal frameRate() const;
  101. void setFrameRate(qreal rate);
  102. QVideoFrameFormat::YCbCrColorSpace yCbCrColorSpace() const;
  103. void setYCbCrColorSpace(QVideoFrameFormat::YCbCrColorSpace colorSpace);
  104. bool isMirrored() const;
  105. void setMirrored(bool mirrored);
  106. static QVideoFrameFormat::PixelFormat pixelFormatFromImageFormat(QImage::Format format);
  107. static QImage::Format imageFormatFromPixelFormat(QVideoFrameFormat::PixelFormat format);
  108. %If (Qt_6_2_0 -)
  109. static QString pixelFormatToString(QVideoFrameFormat::PixelFormat pixelFormat);
  110. %End
  111. %If (Qt_6_4_0 -)
  112. enum ColorSpace
  113. {
  114. ColorSpace_Undefined,
  115. ColorSpace_BT601,
  116. ColorSpace_BT709,
  117. ColorSpace_AdobeRgb,
  118. ColorSpace_BT2020,
  119. };
  120. %End
  121. %If (Qt_6_4_0 -)
  122. enum ColorTransfer
  123. {
  124. ColorTransfer_Unknown,
  125. ColorTransfer_BT709,
  126. ColorTransfer_BT601,
  127. ColorTransfer_Linear,
  128. ColorTransfer_Gamma22,
  129. ColorTransfer_Gamma28,
  130. ColorTransfer_ST2084,
  131. ColorTransfer_STD_B67,
  132. };
  133. %End
  134. %If (Qt_6_4_0 -)
  135. enum ColorRange
  136. {
  137. ColorRange_Unknown,
  138. ColorRange_Video,
  139. ColorRange_Full,
  140. };
  141. %End
  142. %If (Qt_6_4_0 -)
  143. QVideoFrameFormat::ColorSpace colorSpace() const;
  144. %End
  145. %If (Qt_6_4_0 -)
  146. void setColorSpace(QVideoFrameFormat::ColorSpace colorSpace);
  147. %End
  148. %If (Qt_6_4_0 -)
  149. QVideoFrameFormat::ColorTransfer colorTransfer() const;
  150. %End
  151. %If (Qt_6_4_0 -)
  152. void setColorTransfer(QVideoFrameFormat::ColorTransfer colorTransfer);
  153. %End
  154. %If (Qt_6_4_0 -)
  155. QVideoFrameFormat::ColorRange colorRange() const;
  156. %End
  157. %If (Qt_6_4_0 -)
  158. void setColorRange(QVideoFrameFormat::ColorRange range);
  159. %End
  160. %If (Qt_6_8_0 -)
  161. qreal streamFrameRate() const;
  162. %End
  163. %If (Qt_6_8_0 -)
  164. void setStreamFrameRate(qreal rate);
  165. %End
  166. %If (Qt_6_8_0 -)
  167. QtVideo::Rotation rotation() const;
  168. %End
  169. %If (Qt_6_8_0 -)
  170. void setRotation(QtVideo::Rotation rotation);
  171. %End
  172. };
  173. %End