Loading...
Searching...
No Matches
DirectShowPixelFormat.hpp
Go to the documentation of this file.
1#pragma once
2
19
20#include <score_plugin_gfx_export.h>
21
22#include <cstdint>
23
24extern "C" {
25#include <libavcodec/codec_id.h>
26}
27
28namespace score::gfx::interop
29{
30
32constexpr uint32_t directShowFourcc(char a, char b, char c, char d) noexcept
33{
34 return uint32_t(uint8_t(a)) | (uint32_t(uint8_t(b)) << 8)
35 | (uint32_t(uint8_t(c)) << 16) | (uint32_t(uint8_t(d)) << 24);
36}
37
40SCORE_PLUGIN_GFX_EXPORT
41Video::VideoPixelFormat fromDirectShowFourcc(uint32_t fourcc) noexcept;
42
50SCORE_PLUGIN_GFX_EXPORT
51AVCodecID directShowFourccCodec(uint32_t fourcc) noexcept;
52
55SCORE_PLUGIN_GFX_EXPORT
56bool isDirectShowCompressedFourcc(uint32_t fourcc) noexcept;
57
58} // namespace score::gfx::interop
constexpr uint32_t directShowFourcc(char a, char b, char c, char d) noexcept
Build a fourcc the way DirectShow spells it, least-significant byte first.
Definition DirectShowPixelFormat.hpp:32
Vendor-neutral pixel format vocabulary + descriptive metadata.
VideoPixelFormat
Definition VideoPixelFormat.hpp:235