Results 1 to 4 of 4

Thread: Confused about when OMX_AllocateBuffer should be called?

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    2

    Confused about when OMX_AllocateBuffer should be called?

    Dear Friends,

    I am confused about whether compoent's OMX_AllocateBuffer should be called in non-tunneled.

    In IL 1.2 spec:
    For a port connected to the IL client, the IL client may allocate the buffers itself and then pass them to the port via an OMX_UseBuffer call on the port, or it may direct the port to perform the allocation via an OMX_AllocateBuffer call on the port. For each port, the IL client shall exclusively use OMX_UseBuffer or OMX_AllocateBuffer.

    How IL client to decied it should allocate the buffers itself or it should use compenent's OMX_AllocateBuffer? Is OMX_AllocateBuffer should be supported by all component? Is any component like video decoder which just just want it reuse the buffer from other components(like demuxer and video sink) or client?

    Thanks

  2. #2
    Member
    Join Date
    May 2008
    Location
    California, USA
    Posts
    51

    Re: Confused about when OMX_AllocateBuffer should be called?

    Quote Originally Posted by guoyin.chen
    I am confused about whether compoent's OMX_AllocateBuffer should be called in non-tunneled.
    OMX_AllocateBuffer can only be used in non-tunnelled communication, i.e. it may only be called by the IL client on a port that is not tunnelled with other components.

    In this type of communication (sometimes, slightly incorrectly, referred to as "base profile" communication), the IL client is always the buffer supplier. It choses to use OMX_UseBuffer or OMX_AllocateBuffer (one choice for all buffers on a port).
    Quote Originally Posted by guoyin.chen
    How IL client to decied it should allocate the buffers itself or it should use compenent's OMX_AllocateBuffer?
    If the IL client is able to use component-allocated buffers without any overhead (e.g. extra copies), then it should (by using OMX_AllocateBuffer). If it can't, then it may want to allocate the buffers itself. The optimal decision will depend upon which (IL client or component) takes the biggest hit when not allocating buffers itself.
    Quote Originally Posted by guoyin.chen
    Is OMX_AllocateBuffer should be supported by all component?
    Yes.
    Roger Nixon, Broadcom Corporation

  3. #3
    Junior Member
    Join Date
    Sep 2008
    Posts
    2

    Re: Confused about when OMX_AllocateBuffer should be called?

    Thanks for your reply!
    If the IL client is able to use component-allocated buffers without any overhead (e.g. extra copies), then it should (by using OMX_AllocateBuffer). If it can't, then it may want to allocate the buffers itself. The optimal decision will depend upon which (IL client or component) takes the biggest hit when not allocating buffers itself.
    Still, one question is How client knows which one is the biggest hit? The compoent looks like a black box to client. Client dont know which one is best for compent. And there is not way for compoent to tell Client that the component perfer using OMX_AllocateBuffer or letting client allocating the buffers. So does all this depend on client code?


    Best Regards

  4. #4
    Member
    Join Date
    May 2008
    Location
    California, USA
    Posts
    51

    Re: Confused about when OMX_AllocateBuffer should be called?

    Quote Originally Posted by guoyin.chen
    Still, one question is How client knows which one is the biggest hit?
    In general, it doesn't. If you want optimal performance, then you need to code some platform / component-specific knowledge into your client.

    Thanks,

    Roger
    Roger Nixon, Broadcom Corporation

Similar Threads

  1. OMX_AllocateBuffer failing
    By chandrashekar in forum OpenMAX IL
    Replies: 3
    Last Post: 10-13-2011, 12:55 AM
  2. Replies: 3
    Last Post: 01-01-1970, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •