Commit graph

111 commits

Author SHA1 Message Date
Matthieu Bouron
44ead80f5f Fix missing files in distribution tarball.
https://bugzilla.gnome.org/show_bug.cgi?id=719776

[Additional fixes and clean-ups]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-12-06 14:16:28 +01:00
Gwenole Beauchesne
0fb7c60508 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
2013-12-04 19:14:38 +01:00
Matthieu Bouron
76174922bc Fix build with GStreamer >= 1.3.
http://bugzilla.gnome.org/show_bug.cgi?id=715183

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-27 15:08:40 +01:00
XuGuangxin
d753c2226a encoder: add mpeg2 encoder.
Add initial support for MPEG-2 encoding. I/P/B frames are supported.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
652245fb87 encoder: add h264 encoder.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
8174a35737 Add initial infrastructure for video encoding.
Add initial API for video encoding: only basic interfaces and small
encoder objects are implemented so far.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
99947d0592 libs: add generic bitstream writer.
GstBitWriter provides a bit writer that can write any number of bits
to a pre-allocated memory buffer. Helper functions are also provided
to write any number of bits from 8, 16, 32 and 64 bit variables.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Ross Burton
bc8a87d8bb build: link libgstvaapi-wayland against videoutils.
This library is using symbols that don't exist in GStreamer 0.10 so
it needs to link to built-in implementation (libgstvaapi-videoutils).

https://bugzilla.gnome.org/show_bug.cgi?id=712282

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-22 11:23:03 +01:00
Gwenole Beauchesne
f09008a8d1 Add initial infrastructure for video processing.
Add initial API for video processing: only scaling and color format
conversion operations are supported.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
d8ffc2c150 libs: drop some public APIs.
Don't expose GstVaapiContext APIs and make them totally private to
libgstvaapi core library. That API would also tend to disappear in
a future revision. Likewise, don't expose GstVaapiDisplayCache API
but keep symbols visible so that the various render backends could
share a common display cache implementation in libgstvaapi.

Try to clean-up the documentation from any stale entry too.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
2b0a4a0304 image: clean image API up.
Don't expose functions that reference a GstVaapiImageRaw, those are
meant to be internal only for implementing subpictures sync. Also add
a few private definitions to avoid functions calls for retrieving
image size and format information.
2013-07-26 13:16:52 +02:00
Gwenole Beauchesne
0af0849a92 x11: implement pixmap rendering with RENDER extension.
Use hardware accelerated XRenderComposite() function, from the RENDER
extension, to blit a pixmap to screen. Besides, this can also support
cropping and scaling.
2013-07-22 15:45:10 +02:00
Gwenole Beauchesne
373329e6ff x11: implement pixmap API.
Implement the new render-to-pixmap API. The only supported pixmap format
that will work is xRGB, with native byte ordering. Others might work but
they were not tested.
2013-07-22 15:45:10 +02:00
Gwenole Beauchesne
5cabf4e305 Add initial Pixmap API.
Add API to transfer VA urfaces to native pixmaps. Also add an API to
render a native pixmap, for completeness. In general, rendering to
pixmap would only be useful to certain VA drivers and use cases on
X11 display servers. e.g. GLX_EXT_texture_from_pixmap (TFP) handled
in an upper layer.
2013-07-22 15:43:28 +02:00
Gwenole Beauchesne
7fa4973f8a Fix new video format API.
Fix new internal video format API, based on GstVideoFormat, to not
clobber with system symbols. So replace the gst_video_format_* prefix
with gst_vaapi_video_format_ prefix, even if the format type remains
GstVideoFormat.
2013-07-15 14:42:33 +02:00
Gwenole Beauchesne
cb808f91aa libs: drop GstVaapiImageFormat helpers.
Drop GstVaapiImageFormat helpers since everything was moved to the new
GstVideoFormat based API. Don't bother with backwards compatibility and
just bump the library major version afterwards.
2013-07-09 17:16:35 +02:00
Gwenole Beauchesne
430598cf00 Add new video format API.
Leverage GstVideoFormat utilities from core GStreamer to provide an
adaptation layer to VA image formats.
2013-07-09 17:16:35 +02:00
Gwenole Beauchesne
4ffdc98ab4 libs: drop obsolete function helpers and objects.
Drop obsolete GstVaapiID related function helpers for passing them as
GValues.
2013-05-07 17:51:27 +02:00
Gwenole Beauchesne
2e6ff64a34 libs: use GstVaapiMiniObject for video object pools.
Port GstVaapiVideoPool, GstVaapiSurfacePool and GstVaapiImagePool to
GstVaapiMiniObject. Drop gst_vaapi_video_pool_get_caps() since it was
no longer used for a long time. Make object allocators static, i.e.
local to the shared library.
2013-05-07 17:51:27 +02:00
Gwenole Beauchesne
8402b04ac9 libs: use GstVaapiObject for window objects. 2013-05-07 17:51:27 +02:00
Gwenole Beauchesne
1f15c28a1b Port GstVaapiObject to GstVaapiMiniObject. 2013-05-07 17:51:27 +02:00
Gwenole Beauchesne
a24e216466 decoder: rename GstVaapiDecoderFrame to GstVaapiParserFrame.
Rename GstVaapiDecoderFrame to GstVaapiParserFrame because this data
structure was only useful to parsing and a proper GstvaapiDecoderFrame
instance will be created instead.
2013-04-16 19:11:02 +02:00
Gwenole Beauchesne
c7dff071c7 surfaceproxy: add more attributes for raw decoding modes.
Add more attributes for raw decoding modes, i.e. directly through the
libgstvaapi helper library. In particular, add presentation timestamp,
duration and a couple of flags (interlaced, TFF, RFF, one-field).
2013-04-16 19:07:24 +02:00
Víctor Manuel Jáquez Leal
2db47c0ade build: link libgstvaapi-glx-1.0.so against libdl.
Ensure libgstvaapi-glx*.so builds against libdl since dlsym() is used
to resolve glXGetProcAddress() from GLX libraries. This fix builds on
Fedora 17.

https://bugzilla.gnome.org/show_bug.cgi?id=698046

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-04-15 15:04:29 +02:00
Gwenole Beauchesne
aedef381b2 Fix make dist to include all source files, in any case.
Fix make dist to allow build for either GStreamer 0.10 or 1.0. i.e. make
sure to include all source files in either case while generating source
tarballs.
2013-04-10 15:43:28 +02:00
Gwenole Beauchesne
140fa66be3 plugins: integrate GstVaapiVideoMeta from libgstvaapi.
Move GstVaapiVideoMeta from core libgstvaapi decoding library to the
actual plugin elements. That's only useful there. Also inline reference
counting code from GstVaapiMiniObject.
2013-03-26 10:33:27 +01:00
Gwenole Beauchesne
4cf44e3ad2 plugins: integrate GstVaapiVideoBuffer from libgstvaapi.
Move GstVaapiVideoBuffer from core libgstvaapi decoding library to the
actual plugin elements. That's only useful there.
2013-03-21 18:16:14 +01:00
Gwenole Beauchesne
17e7e67c1f plugins: integrate GstVaapiVideoConverterGLX from libgstvaapi.
Make sure libgstvaapi core decoding library doesn't include un-needed
dependencies. So, move out GstVaapiVideoConverterGLX to plugins instead.
Besides, even if the vaapisink element is not used, we are bound to have
a correctly populated GstSurfaceBuffer from vaapidecode.

Also clean-up the file along the way.
2013-03-21 18:16:14 +01:00
Gwenole Beauchesne
833ebf9cae sysdeps: split out GStreamer API compatibility glue to "gstcompat.h". 2013-03-20 18:30:09 +01:00
Gwenole Beauchesne
4dd6035dac configure: rename GST_MAJORMINOR to GST_API_VERSION. 2013-03-20 11:44:10 +01:00
Gwenole Beauchesne
655f400e1c display: dump gstreamer-vaapi version for debugging purposes. 2013-01-18 14:49:15 +01:00
Gwenole Beauchesne
d6bbc652b4 videobuffer: wrap video meta into a surface buffer.
Make GstVaapiVideoBuffer a simple wrapper for video meta. This buffer is
no longer necessary but for compatibility with GStreamer 0.10 APIs or users
expecting a GstSurfaceBuffer like Clutter.
2013-01-05 18:02:31 +01:00
Gwenole Beauchesne
b1636c3585 videobuffer: add video meta information.
Add new GstVaapiVideoMeta object that holds all information needed to
convey gst-vaapi specific data as a GstBuffer.
2013-01-05 18:02:31 +01:00
Gwenole Beauchesne
9e643a6147 Add videoutils submodule for GstVideoDecoder APIs. 2012-12-21 16:01:16 +01:00
Gwenole Beauchesne
f5294b813a Bump library major version.
Increase library major so that to cope with API/ABI incompatible changes
since 0.4.x series and avoid user issues.
2012-12-18 15:31:52 +01:00
Gwenole Beauchesne
f5e6444b78 decoder: add new "decoder-frame" object.
Introduce a new GstVaapiDecoderFrame that is just a list of decoder units
(GstVaapiDecoderUnit objects) that constitute a frame. This object is just
an extension to GstVideoCodecFrame for VA decoder purposes. It is available
as the user-data member element.

This is a libgstvaapi internal object.
2012-12-18 15:31:51 +01:00
Gwenole Beauchesne
49dbb9af50 decoder: add new "decoder-unit" object.
Introduce GstVaapiDecoderUnit which represents a fragment of the source
stream to be decoded. For instance, a decode-unit will be a NAL unit for
H.264 streams, an EBDU for VC-1 streams, and a video packet for MPEG-2
streams.

This is a libgstvaapi internal object.
2012-12-18 15:31:51 +01:00
Gwenole Beauchesne
44945ac9eb Add GstVaapiMiniObject.
Introduce a new reference counted object that is very lightweight and
also provides flags and user-data functionalities. Initialization and
finalization times are reduced by up to a factor 5x vs GstMiniObject
from GStreamer 0.10 stack.

This is a libgstvaapi internal object.
2012-12-18 15:31:50 +01:00
Gwenole Beauchesne
1d669a3e12 libs: only export gst_vaapi_*() symbols.
This fixes symbol clashes between the gst-vaapi built-in codecparsers/
library and the system-provided one, mainly used by videoparses/. Now,
only symbols with the gst_vaapi_* prefix will be exported, if they are
not marked as "hidden" to libgstvaapi.
2012-12-17 14:12:15 +01:00
Gwenole Beauchesne
ca8b5035de Fix build with the GNU gold linker.
In particular, fix libgstvaapi-glx DSO dependencies to include libgstbase
and libgstvideo libs, e.g. for gst_video_buffer_get_overlay_composition().
2012-11-15 15:02:23 +01:00
Gwenole Beauchesne
cee782a177 codecparsers: jpeg: use submodule sources. 2012-10-11 14:19:38 +02:00
Gwenole Beauchesne
30a8c566b7 display: fix physical display size when display is rotated. 2012-09-06 13:39:50 +02:00
Gwenole Beauchesne
4a1127dd7c vaapisink: drop obsolete GstVaapiVideoSink interface.
This interface was deprecated since 0.3.x series when the GstVideoContext
interface was added to the main GStreamer APIs.
2012-08-29 13:20:17 +02:00
Gwenole Beauchesne
657f0a4a6f Add initial support for VA/DRM. 2012-08-01 16:40:17 +02:00
Gwenole Beauchesne
7070961202 Fix build without X11 (again).
Don't try to build libgstvaapi-x11.so.* if X11 was disabled. Also shuffle
files list wrt. x11, glx and wayland backends.
2012-07-31 17:58:43 +02:00
Sreerenj Balachandran
621bb12be6 Add initial support for VA/Wayland.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-07-25 15:31:42 +02:00
Gwenole Beauchesne
b6c97e31ee configure: improve checks for GLX. 2012-07-20 14:44:27 +02:00
Gwenole Beauchesne
562d98ec56 Drop obsolete GstVaapiTSB.
It has been replaced with a GstAdapter and gst_adapter_prev_pts().
2012-07-19 17:58:21 +02:00
Gwenole Beauchesne
9d440fafb3 Drop all references to USE_CODEC_PARSERS. 2012-07-19 17:30:36 +02:00
Gwenole Beauchesne
7f47ac3bea Drop FFmpeg-based decoders.
GStreamer codecparsers-based decoders are the only supported decoders now.
Though, FFmpeg decoders are still available in gstreamer-vaapi 0.3.x series.
2012-07-19 17:30:36 +02:00