qmediaformat.sip 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // qmediaformat.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 QMediaFormat
  23. {
  24. %TypeHeaderCode
  25. #include <qmediaformat.h>
  26. %End
  27. public:
  28. enum FileFormat
  29. {
  30. UnspecifiedFormat,
  31. WMV,
  32. AVI,
  33. Matroska,
  34. MPEG4,
  35. Ogg,
  36. QuickTime,
  37. WebM,
  38. Mpeg4Audio,
  39. AAC,
  40. WMA,
  41. MP3,
  42. FLAC,
  43. Wave,
  44. };
  45. enum class AudioCodec
  46. {
  47. Unspecified,
  48. MP3,
  49. AAC,
  50. AC3,
  51. EAC3,
  52. FLAC,
  53. DolbyTrueHD,
  54. Opus,
  55. Vorbis,
  56. Wave,
  57. WMA,
  58. ALAC,
  59. };
  60. enum class VideoCodec
  61. {
  62. Unspecified,
  63. MPEG1,
  64. MPEG2,
  65. MPEG4,
  66. H264,
  67. H265,
  68. VP8,
  69. VP9,
  70. AV1,
  71. Theora,
  72. WMV,
  73. MotionJPEG,
  74. };
  75. enum ConversionMode
  76. {
  77. Encode,
  78. Decode,
  79. };
  80. enum ResolveFlags
  81. {
  82. NoFlags,
  83. RequiresVideo,
  84. };
  85. QMediaFormat(QMediaFormat::FileFormat format = QMediaFormat::UnspecifiedFormat);
  86. QMediaFormat(const QMediaFormat &other);
  87. ~QMediaFormat();
  88. void swap(QMediaFormat &other /Constrained/);
  89. QMediaFormat::FileFormat fileFormat() const;
  90. void setFileFormat(QMediaFormat::FileFormat f);
  91. void setVideoCodec(QMediaFormat::VideoCodec codec);
  92. QMediaFormat::VideoCodec videoCodec() const;
  93. void setAudioCodec(QMediaFormat::AudioCodec codec);
  94. QMediaFormat::AudioCodec audioCodec() const;
  95. bool isSupported(QMediaFormat::ConversionMode mode) const;
  96. QMimeType mimeType() const;
  97. QList<QMediaFormat::FileFormat> supportedFileFormats(QMediaFormat::ConversionMode m);
  98. QList<QMediaFormat::VideoCodec> supportedVideoCodecs(QMediaFormat::ConversionMode m);
  99. QList<QMediaFormat::AudioCodec> supportedAudioCodecs(QMediaFormat::ConversionMode m);
  100. static QString fileFormatName(QMediaFormat::FileFormat c);
  101. static QString audioCodecName(QMediaFormat::AudioCodec c);
  102. static QString videoCodecName(QMediaFormat::VideoCodec c);
  103. static QString fileFormatDescription(QMediaFormat::FileFormat c);
  104. static QString audioCodecDescription(QMediaFormat::AudioCodec c);
  105. static QString videoCodecDescription(QMediaFormat::VideoCodec c);
  106. void resolveForEncoding(QMediaFormat::ResolveFlags flags);
  107. bool operator==(const QMediaFormat &other) const;
  108. bool operator!=(const QMediaFormat &other) const;
  109. };
  110. %End