[gst-devel] Re: [gst-cvs] theuraeus gst-plugins: gst-plugins/gst-libs/gst/riff/
David I. Lehn
dlehn at vt.edu
Thu Dec 12 09:05:04 CET 2002
* Christian Schaller <theuraeus at users.sourceforge.net> [20021212 06:46]:
> RCS file: /cvsroot/gstreamer/gst-plugins/gst-libs/gst/riff/riffutil.c,v
...
> - return (fourcc[0] << 0) | (fourcc[1] << 8) |
> - (fourcc[2] << 16) | (fourcc[3] << 24);
> + return GUINT32_FROM_LE((gulong)(fourcc[0] << 0) | (fourcc[1] << 8) |
> + (fourcc[2] << 16) | (fourcc[3] << 24));
...
> + id = GUINT32_FROM_LE(id);
> fourcc[0] = (id >> 0) & 0xff;
> fourcc[1] = (id >> 8) & 0xff;
> fourcc[2] = (id >> 16) & 0xff;
Perhaps it would be better to consolidate this into the macros in
gstprops.h? Probably could use the standard macros and fix them up for
endianness issues. Or at least put the endian macros around the
standard ones.
#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
-dave
More information about the gstreamer-devel
mailing list