mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 19:47:27 +00:00
winegstreamer: Merge video_indeo into video field.
This commit is contained in:
parent
6e90dff6e7
commit
8ff54f9d34
|
@ -845,22 +845,22 @@ static void mf_media_type_to_wg_format_video_indeo(IMFMediaType *type, uint32_t
|
|||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)))
|
||||
{
|
||||
format->u.video_indeo.width = frame_size >> 32;
|
||||
format->u.video_indeo.height = (UINT32)frame_size;
|
||||
format->u.video.width = frame_size >> 32;
|
||||
format->u.video.height = (UINT32)frame_size;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_RATE, &frame_rate)) && (UINT32)frame_rate)
|
||||
{
|
||||
format->u.video_indeo.fps_n = frame_rate >> 32;
|
||||
format->u.video_indeo.fps_d = (UINT32)frame_rate;
|
||||
format->u.video.fps_n = frame_rate >> 32;
|
||||
format->u.video.fps_d = (UINT32)frame_rate;
|
||||
}
|
||||
else
|
||||
{
|
||||
format->u.video_indeo.fps_n = 1;
|
||||
format->u.video_indeo.fps_d = 1;
|
||||
format->u.video.fps_n = 1;
|
||||
format->u.video.fps_d = 1;
|
||||
}
|
||||
|
||||
format->u.video_indeo.version = version;
|
||||
format->u.video.version = version;
|
||||
}
|
||||
|
||||
void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format)
|
||||
|
|
|
@ -119,7 +119,8 @@ struct wg_format
|
|||
* Uncompressed(RGB and YUV): width, height, fps_n, fps_d, padding.
|
||||
* CINEPAK: width, height, fps_n, fps_d.
|
||||
* H264: width, height, fps_n, fps_d, profile, level, codec_data_len, codec_data.
|
||||
* WMV: width, height, fps_n, fps_d, codec_data_len, codec_data. */
|
||||
* WMV: width, height, fps_n, fps_d, codec_data_len, codec_data.
|
||||
* INDEO: width, height, fps_n, fps_d, version. */
|
||||
struct
|
||||
{
|
||||
wg_video_format format;
|
||||
|
@ -131,16 +132,11 @@ struct wg_format
|
|||
RECT padding;
|
||||
uint32_t profile;
|
||||
uint32_t level;
|
||||
uint32_t version;
|
||||
uint32_t codec_data_len;
|
||||
unsigned char codec_data[64];
|
||||
} video;
|
||||
struct
|
||||
{
|
||||
int32_t width, height;
|
||||
uint32_t fps_n, fps_d;
|
||||
uint32_t version;
|
||||
} video_indeo;
|
||||
struct
|
||||
{
|
||||
int32_t width, height;
|
||||
uint32_t fps_n, fps_d;
|
||||
|
|
|
@ -822,14 +822,14 @@ static GstCaps *wg_format_to_caps_video_indeo(const struct wg_format *format)
|
|||
if (!(caps = gst_caps_new_empty_simple("video/x-indeo")))
|
||||
return NULL;
|
||||
|
||||
if (format->u.video_indeo.width)
|
||||
gst_caps_set_simple(caps, "width", G_TYPE_INT, format->u.video_indeo.width, NULL);
|
||||
if (format->u.video_indeo.height)
|
||||
gst_caps_set_simple(caps, "height", G_TYPE_INT, format->u.video_indeo.height, NULL);
|
||||
if (format->u.video_indeo.fps_d || format->u.video_indeo.fps_n)
|
||||
gst_caps_set_simple(caps, "framerate", GST_TYPE_FRACTION, format->u.video_indeo.fps_n, format->u.video_indeo.fps_d, NULL);
|
||||
if (format->u.video_indeo.version)
|
||||
gst_caps_set_simple(caps, "indeoversion", G_TYPE_INT, format->u.video_indeo.version, NULL);
|
||||
if (format->u.video.width)
|
||||
gst_caps_set_simple(caps, "width", G_TYPE_INT, format->u.video.width, NULL);
|
||||
if (format->u.video.height)
|
||||
gst_caps_set_simple(caps, "height", G_TYPE_INT, format->u.video.height, NULL);
|
||||
if (format->u.video.fps_d || format->u.video.fps_n)
|
||||
gst_caps_set_simple(caps, "framerate", GST_TYPE_FRACTION, format->u.video.fps_n, format->u.video.fps_d, NULL);
|
||||
if (format->u.video.version)
|
||||
gst_caps_set_simple(caps, "indeoversion", G_TYPE_INT, format->u.video.version, NULL);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue