encoder: rework GstVaapiCodedBuffer and related proxy.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 3 Dec 2013 15:11:46 +0000 (16:11 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 4 Dec 2013 18:14:38 +0000 (19:14 +0100)
commit0fb7c605080e926a4ff3a7b01337281d968148b5
tree331f77ccba441aa2972d266e6269b3d52bdca074
parent7a3316543610e0728272d7b1e6cb873c0c884426
encoder: rework GstVaapiCodedBuffer and related proxy.

Refactor the GstVaapiCodedBuffer APIs so that to more clearly separate
public and private interfaces. Besides, the map/unmap APIs should not
be exposed as is but appropriate accessors should be provided instead.

* GstVaapiCodedBuffer: VA coded buffer abstraction
- gst_vaapi_coded_buffer_get_size(): get coded buffer size.
- gst_vaapi_coded_buffer_copy_into(): copy coded buffer into GstBuffer

* GstVaapiCodedBufferPool: pool of VA coded buffer objects
- gst_vaapi_coded_buffer_pool_new(): create a pool of coded buffers of
  the specified max size, and bound to the supplied encoder

* GstVaapiCodedBufferProxy: pool-allocated VA coded buffer object proxy
- gst_vaapi_coded_buffer_proxy_new_from_pool(): create coded buf from pool
- gst_vaapi_coded_buffer_proxy_get_buffer(): get underlying coded buffer
- gst_vaapi_coded_buffer_proxy_get_buffer_size(): get coded buffer size

Rationale: more optimized transfer functions might be provided in the
future, thus rendering the map/unmap mechanism obsolete or sub-optimal.

https://bugzilla.gnome.org/show_bug.cgi?id=719775
20 files changed:
gst-libs/gst/vaapi/Makefile.am
gst-libs/gst/vaapi/gstvaapicodedbuffer.c [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbuffer.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbuffer_priv.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbufferpool.c [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbufferpool.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbufferproxy.c [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbufferproxy.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapicodedbufferproxy_priv.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapiencoder.c
gst-libs/gst/vaapi/gstvaapiencoder.h
gst-libs/gst/vaapi/gstvaapiencoder_h264.c
gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
gst-libs/gst/vaapi/gstvaapiencoder_objects.c
gst-libs/gst/vaapi/gstvaapiencoder_objects.h
gst-libs/gst/vaapi/gstvaapiencoder_priv.h
gst-libs/gst/vaapi/gstvaapivideopool.h
gst/vaapi/gstvaapiencode.c
gst/vaapi/gstvaapiencode.h
gst/vaapi/gstvaapivideometa.c