diff options
author | Brian Cameron <brian.cameron@sun.com> | 2003-07-07 16:55:59 +0000 |
---|---|---|
committer | Brian Cameron <brian.cameron@sun.com> | 2003-07-07 16:55:59 +0000 |
commit | d0f73a22628e7cbd9acacf9a4e9eaf919508f4d1 (patch) | |
tree | d836fa0bfd5b0193ee8b43a5083d836fed5cb104 /gst/avi | |
parent | 292fec2a0bd1f221a46ad69c5100995d04c01057 (diff) |
Support ISO style variable length macros
Original commit message from CVS:
Support ISO style variable length macros
Diffstat (limited to 'gst/avi')
-rw-r--r-- | gst/avi/gstavidemux.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index ad0b1ef3..8beea334 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -487,6 +487,26 @@ gst_avi_demux_streaminfo (GstAviDemux *avi_demux) /* video/audio pad/caps stuff */ +#ifdef G_HAVE_ISO_VARARGS + +#define GST_AVI_VID_CAPS_NEW(name, mimetype, ...) \ + (strf != NULL) ? \ + GST_CAPS_NEW (name, \ + mimetype, \ + "width", GST_PROPS_INT (width), \ + "height", GST_PROPS_INT (height), \ + "framerate", GST_PROPS_FLOAT (framerate), \ + __VA_ARGS__) \ + : \ + GST_CAPS_NEW (name, \ + mimetype, \ + "width", GST_PROPS_INT_RANGE (16, 4096), \ + "height", GST_PROPS_INT_RANGE (16, 4096), \ + "framerate", GST_PROPS_FLOAT_RANGE (0., G_MAXFLOAT), \ + __VA_ARGS__) + +#elif defined(G_HAVE_GNUC_VARARGS) + #define GST_AVI_VID_CAPS_NEW(name, mimetype, props...) \ (strf != NULL) ? \ GST_CAPS_NEW (name, \ @@ -502,6 +522,7 @@ gst_avi_demux_streaminfo (GstAviDemux *avi_demux) "height", GST_PROPS_INT_RANGE (16, 4096), \ "framerate", GST_PROPS_FLOAT_RANGE (0., G_MAXFLOAT), \ ##props) +#endif static GstCaps * gst_avi_demux_video_caps (guint32 codec_fcc, @@ -761,6 +782,25 @@ gst_avi_demux_strf_vids (GstAviDemux *avi_demux) gst_element_add_pad (GST_ELEMENT (avi_demux), srcpad); } +#ifdef G_HAVE_ISO_VARARGS + +#define GST_AVI_AUD_CAPS_NEW(name, mimetype, ...) \ + (strf != NULL) ? \ + GST_CAPS_NEW (name, \ + mimetype, \ + "rate", GST_PROPS_INT (rate), \ + "channels", GST_PROPS_INT (channels), \ + __VA_ARGS__) \ + : \ + GST_CAPS_NEW (name, \ + mimetype, \ + "rate", GST_PROPS_INT_RANGE (8000, 96000), \ + "channels", GST_PROPS_INT_RANGE (1, 2), \ + __VA_ARGS__) + + +#elif defined(G_HAVE_GNUC_VARARGS) + #define GST_AVI_AUD_CAPS_NEW(name, mimetype, props...) \ (strf != NULL) ? \ GST_CAPS_NEW (name, \ @@ -774,7 +814,7 @@ gst_avi_demux_strf_vids (GstAviDemux *avi_demux) "rate", GST_PROPS_INT_RANGE (8000, 96000), \ "channels", GST_PROPS_INT_RANGE (1, 2), \ ##props) - +#endif static GstCaps * gst_avi_demux_audio_caps (guint16 codec_id, |