[gst-devel] alignment issues

Benjamin Otte in7y118 at public.uni-hamburg.de
Sun Apr 4 06:42:12 CEST 2004


I'd say put them in the GStreamer core into gst/gstutils.h.
I'm not sure if we should #ifdef them to use G_UNIT_FROM_BE by default
and these macros only in those special cases.
But that's probably premature optimization.

Benjamin


On Sat, 3 Apr 2004, Daniel Gazard wrote:

> Ronald Bultje <rbultje at ronald.bitfreak.net> writes:
>
> Hi,
>
> > [..]
> >> May be there are other similar problems elsewhere. If someone is
> >> interested, I can send my patches (I have to clean up the code
> >> before).
> >
> > Please do. I sort-of dislike memcpy() though... Can you think of a quick
> > macro to do this? E.g.:
> >
> > #define GST_READ_UINT32_BE(data) (data[0] << 24 | \
> > 				  data[1] << 16 | \
> > 				  data[2] <<  8 | \
> > 				  data[3]         )
> >
> > (etc.)
> >
> > Same for uint64, 16, all also LE and maybe even several write macros. Such
> > code should go somewhere in GStreamer core, I guess, since those are used
> > virtually everywhere.
>
> Ok, I will do something similar with your macro above (which should be
> more efficient than a memcpy !). I am a bit overbook those days but I
> expect to be able submit a patch in the current of the next week.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>





More information about the gstreamer-devel mailing list