[Gstreamer-openmax] [PATCH 1/2] fixes for building for 64bit host
Felipe Contreras
felipe.contreras at gmail.com
Fri Feb 26 14:04:29 PST 2010
On Fri, Feb 26, 2010 at 8:10 PM, Clark, Rob <rob at ti.com> wrote:
>
> On Feb 26, 2010, at 5:47 AM, Felipe Contreras wrote:
>
>> On Thu, Feb 25, 2010 at 3:55 AM, Rob Clark <rob at ti.com> wrote:
>>> ---
>>> omx/gstomx_base_filter.c | 12 ++++++------
>>> omx/gstomx_base_sink.c | 2 +-
>>> 2 files changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/omx/gstomx_base_filter.c b/omx/gstomx_base_filter.c
>>> index 287f50c..b0353cb 100644
>>> --- a/omx/gstomx_base_filter.c
>>> +++ b/omx/gstomx_base_filter.c
>>> @@ -40,11 +40,11 @@ log_buffer (GstOmxBaseFilter *self,
>>> OMX_BUFFERHEADERTYPE *omx_buffer)
>>> {
>>> GST_DEBUG_OBJECT (self, "omx_buffer: "
>>> - "size=%" G_GUINT32_FORMAT ", "
>>> - "len=%" G_GUINT32_FORMAT ", "
>>> - "flags=%" G_GUINT32_FORMAT ", "
>>> - "offset=%" G_GUINT32_FORMAT ", "
>>> - "timestamp=%" G_GUINT64_FORMAT,
>>> + "size=%lu, "
>>> + "len=%lu, "
>>> + "flags=%lu, "
>>> + "offset=%lu, "
>>> + "timestamp=%lld",
>>> omx_buffer->nAllocLen, omx_buffer->nFilledLen, omx_buffer->nFlags,
>>> omx_buffer->nOffset, omx_buffer->nTimeStamp);
>>> }
>>
>> Interesting, so G_GUINT32_FORMAT doesn't work with OMX_U32.
>>
>> Probably because of this:
>> /** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */
>> typedef unsigned long OMX_U32;
>>
>> Can you do a sizeof(OMX_U32) in your 64-bit system? I guess it's 64
>> bits, and if so, that's a bug in the header files and I wonder if
>> communication between different omx components (64bit client vs 32bit
>> implementation) might be screwed.
>>
>
>
> yup, this becomes 8 bytes.. if I build w/ -m32 to force 32bit binary, then it goes back to 4 bytes. But the compiler complains in either case.
>
> It would be better if OMX header used stdint types for better portability.. but I guess not much thought has gone into using OMX on 64bit platform yet.
stdint is only C99, so I don't think they would have gone for that.
> It is your call on merging this patch.. I don't think it should hurt anything, but probably most people won't need it. But I'll leave it in my own working tree since I need it to build on my laptop.
It wouldn't hurt anything but it feels like a hack, however, I don't
see any better solution for now (modifying the omx headers is very
tempting, but probably a big no-no).
ACK'ed.
Cheers.
--
Felipe Contreras
More information about the Gstreamer-openmax
mailing list