Commit fb096d54 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Introduce an intermediate media format structure.

The fundamental idea here is to provide a type which can be used in the unixlib interface. Obviously GstCaps can't be used from PE, and while AM_MEDIA_TYPE can in theory be used from the Unix library, allocation of the format block makes things a little tricky. Moreover, we'd ideally like to use the same backend for DirectShow and Media Foundation, and while it wouldn't be a problem currently, in general AM_MEDIA_TYPE is not quite expressive enough to translate from GstCaps to IMFMediaType, and the latter can't be used from the Unix library. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a3e7cfd4
......@@ -66,6 +66,66 @@ static inline const char *debugstr_time(REFERENCE_TIME time)
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
struct wg_format
{
enum wg_major_type
{
WG_MAJOR_TYPE_UNKNOWN,
WG_MAJOR_TYPE_VIDEO,
WG_MAJOR_TYPE_AUDIO,
} major_type;
union
{
struct
{
enum wg_video_format
{
WG_VIDEO_FORMAT_UNKNOWN,
WG_VIDEO_FORMAT_BGRA,
WG_VIDEO_FORMAT_BGRx,
WG_VIDEO_FORMAT_BGR,
WG_VIDEO_FORMAT_RGB15,
WG_VIDEO_FORMAT_RGB16,
WG_VIDEO_FORMAT_AYUV,
WG_VIDEO_FORMAT_I420,
WG_VIDEO_FORMAT_NV12,
WG_VIDEO_FORMAT_UYVY,
WG_VIDEO_FORMAT_YUY2,
WG_VIDEO_FORMAT_YV12,
WG_VIDEO_FORMAT_YVYU,
WG_VIDEO_FORMAT_CINEPAK,
} format;
uint32_t width, height;
uint32_t fps_n, fps_d;
} video;
struct
{
enum wg_audio_format
{
WG_AUDIO_FORMAT_UNKNOWN,
WG_AUDIO_FORMAT_U8,
WG_AUDIO_FORMAT_S16LE,
WG_AUDIO_FORMAT_S24LE,
WG_AUDIO_FORMAT_S32LE,
WG_AUDIO_FORMAT_F32LE,
WG_AUDIO_FORMAT_F64LE,
WG_AUDIO_FORMAT_MPEG1_LAYER1,
WG_AUDIO_FORMAT_MPEG1_LAYER2,
WG_AUDIO_FORMAT_MPEG1_LAYER3,
} format;
uint32_t channels;
uint32_t rate;
} audio;
} u;
};
extern LONG object_locks;
HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment