From ae82126a56898c37b4e242cc370dfa28c151c471 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sun, 29 Jun 2008 19:52:51 +0000 Subject: gst/avi/avi-ids.h: Add vprp chunk related structures. Original commit message from CVS: * gst/avi/avi-ids.h: Add vprp chunk related structures. * gst/avi/gstavidemux.c: (gst_avi_demux_riff_parse_vprp), (gst_avi_demux_parse_stream): Parse optional vprp chunk and add calculated pixel-aspect-ratio to caps. Fixes #539482. * gst/avi/gstavimux.h: * gst/avi/gstavimux.c: (gst_avi_mux_pad_reset), (gst_avi_mux_vidsink_set_caps), (gst_avi_mux_riff_get_avi_header): Add a vprp chunk if non-trival pixel-aspect-ratio provided in caps. --- gst/avi/avi-ids.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gst/avi/avi-ids.h') diff --git a/gst/avi/avi-ids.h b/gst/avi/avi-ids.h index f9e2dd31..8ca550bf 100644 --- a/gst/avi/avi-ids.h +++ b/gst/avi/avi-ids.h @@ -45,4 +45,33 @@ typedef struct _gst_riff_avih { guint32 length; } gst_riff_avih; +/* vprp (video properties) ODML header */ +/* see ODML spec for some/more explanation */ +#define GST_RIFF_TAG_vprp GST_MAKE_FOURCC ('v','p','r','p') +#define GST_RIFF_VPRP_VIDEO_FIELDS (2) + +typedef struct _gst_riff_vprp_video_field_desc { + guint32 compressed_bm_height; + guint32 compressed_bm_width; + guint32 valid_bm_height; + guint32 valid_bm_width; + guint32 valid_bm_x_offset; + guint32 valid_bm_y_offset; + guint32 video_x_t_offset; + guint32 video_y_start; +} gst_riff_vprp_video_field_desc; + +typedef struct _gst_riff_vprp { + guint32 format_token; /* whether fields defined by standard */ + guint32 standard; /* video display standard, UNKNOWN, PAL, etc */ + guint32 vert_rate; /* vertical refresh rate */ + guint32 hor_t_total; /* width */ + guint32 vert_lines; /* height */ + guint32 aspect; /* aspect ratio high word:low word */ + guint32 width; /* active width */ + guint32 height; /* active height */ + guint32 fields; /* field count */ + gst_riff_vprp_video_field_desc field_info[GST_RIFF_VPRP_VIDEO_FIELDS]; +} gst_riff_vprp; + #endif /* __GST_AVI_H__ */ -- cgit