[-]
[+]
|
Changed |
_service:tar_git:gst-vaapi.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,6 +1,6 @@
<services>
<service name="tar_git">
- <param name="url">https://git.merproject.org/piggz/gst-vaapi.git</param>
+ <param name="url">https://git.sailfishos.org/abranson/gst-vaapi.git</param>
<param name="branch">master</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Deleted |
_service:tar_git:gstreamer1.0-vaapi-1.14.1.tar.xz/gstreamer-vaapi/gst-libs/gst/base/Makefile.am
^
|
@@ -1,47 +0,0 @@
-noinst_LTLIBRARIES = \
- libgstvaapi-baseutils.la \
- $(NULL)
-
-source_c = \
- gstbitwriter.c \
- $(NULL)
-
-source_h = \
- gstbitwriter.h \
- $(NULL)
-
-libgstvaapi_baseutils_cflags = \
- -DGST_USE_UNSTABLE_API \
- -I$(top_srcdir)/gst-libs \
- -I$(top_builddir)/gst-libs \
- $(GST_BASE_CFLAGS) \
- $(GST_CFLAGS) \
- $(NULL)
-
-libgstvaapi_baseutils_libs = \
- $(GST_BASE_LIBS) \
- $(GST_LIBS) \
- $(NULL)
-
-nodist_libgstvaapi_baseutils_la_SOURCES = \
- $(source_c) \
- $(NULL)
-
-libgstvaapi_baseutils_la_CFLAGS = \
- $(libgstvaapi_baseutils_cflags) \
- $(NULL)
-
-libgstvaapi_baseutils_la_LIBADD = \
- $(libgstvaapi_baseutils_libs) \
- $(NULL)
-
-libgstvaapi_baseutils_la_LDFLAGS = \
- $(GST_ALL_LDFLAGS) \
- $(NULL)
-
-EXTRA_DIST = \
- $(source_c) \
- $(source_h) \
- $(NULL)
-
--include $(top_srcdir)/git.mk
|
[-]
[+]
|
Deleted |
_service:tar_git:gstreamer1.0-vaapi-1.14.1.tar.xz/gstreamer-vaapi/gst-libs/gst/base/gstbitwriter.c
^
|
@@ -1,278 +0,0 @@
-/*
- * gstbitwriter.c - bitstream writer
- *
- * Copyright (C) 2013 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#define GST_BIT_WRITER_DISABLE_INLINES
-
-#include "gstbitwriter.h"
-
-/**
- * gst_bit_writer_init:
- * @bitwriter: a #GstBitWriter instance
- * @reserved_bits: reserved bits to allocate data
- *
- * Initializes a #GstBitWriter instance and allocate @reserved_bits
- * data inside.
- *
- * Cleanup function: gst_bit_writer_clear
- */
-void
-gst_bit_writer_init (GstBitWriter * bitwriter, guint32 reserved_bits)
-{
- bitwriter->bit_size = 0;
- bitwriter->data = NULL;
- bitwriter->bit_capacity = 0;
- bitwriter->auto_grow = TRUE;
- if (reserved_bits)
- _gst_bit_writer_check_space (bitwriter, reserved_bits);
-}
-
-/**
- * gst_bit_writer_init_fill:
- * @bitwriter: a #GstBitWriter instance
- * @data: allocated data
- * @bits: size of allocated @data in bits
- *
- * Initializes a #GstBitWriter instance with alocated @data and @bit outside.
- *
- * Cleanup function: gst_bit_writer_clear
- */
-void
-gst_bit_writer_init_fill (GstBitWriter * bitwriter, guint8 * data, guint bits)
-{
- bitwriter->bit_size = 0;
- bitwriter->data = data;
- bitwriter->bit_capacity = bits;
- bitwriter->auto_grow = FALSE;
-}
-
-/**
- * gst_bit_writer_clear:
- * @bitwriter: a #GstBitWriter instance
- * @free_data: flag to free #GstBitWriter allocated data
- *
- * Clear a #GstBitWriter instance and destroy allocated data inside
- * if @free_data is %TRUE.
- */
-void
-gst_bit_writer_clear (GstBitWriter * bitwriter, gboolean free_data)
-{
- if (bitwriter->auto_grow && bitwriter->data && free_data)
- g_free (bitwriter->data);
-
- bitwriter->data = NULL;
- bitwriter->bit_size = 0;
- bitwriter->bit_capacity = 0;
-}
-
-/**
- * gst_bit_writer_new:
- * @bitwriter: a #GstBitWriter instance
- * @reserved_bits: reserved bits to allocate data
- *
- * Create a #GstBitWriter instance and allocate @reserved_bits data inside.
- *
- * Free-function: gst_bit_writer_free
- *
- * Returns: a new #GstBitWriter instance
- */
-GstBitWriter *
-gst_bit_writer_new (guint32 reserved_bits)
-{
- GstBitWriter *ret = g_slice_new0 (GstBitWriter);
-
- gst_bit_writer_init (ret, reserved_bits);
-
- return ret;
-}
-
-/**
- * gst_bit_writer_new_fill:
- * @bitwriter: a #GstBitWriter instance
- * @data: allocated data
- * @bits: size of allocated @data in bits
- *
- * Create a #GstBitWriter instance with allocated @data and @bit outside.
- *
- * Free-function: gst_bit_writer_free
- *
- * Returns: a new #GstBitWriter instance
- */
-GstBitWriter *
-gst_bit_writer_new_fill (guint8 * data, guint bits)
-{
- GstBitWriter *ret = g_slice_new0 (GstBitWriter);
-
- gst_bit_writer_init_fill (ret, data, bits);
-
- return ret;
-}
-
-/**
- * gst_bit_writer_free:
- * @bitwriter: a #GstBitWriter instance
- * @free_data: flag to free @data which is allocated inside
- *
- * Clear a #GstBitWriter instance and destroy allocated data inside if
- * @free_data is %TRUE
- */
-void
-gst_bit_writer_free (GstBitWriter * writer, gboolean free_data)
-{
- g_return_if_fail (writer != NULL);
-
- gst_bit_writer_clear (writer, free_data);
-
- g_slice_free (GstBitWriter, writer);
-}
-
-/**
- * gst_bit_writer_get_size:
- * @bitwriter: a #GstBitWriter instance
- *
- * Get size of written @data
- *
- * Returns: size of bits written in @data
- */
-guint
-gst_bit_writer_get_size (GstBitWriter * bitwriter)
-{
- return _gst_bit_writer_get_size_inline (bitwriter);
-}
-
-/**
- * gst_bit_writer_get_data:
- * @bitwriter: a #GstBitWriter instance
- *
- * Get written @data pointer
- *
- * Returns: @data pointer
- */
-guint8 *
-gst_bit_writer_get_data (GstBitWriter * bitwriter)
-{
- return _gst_bit_writer_get_data_inline (bitwriter);
-}
-
-/**
- * gst_bit_writer_get_data:
- * @bitwriter: a #GstBitWriter instance
- * @pos: new position of data end
- *
- * Set the new postion of data end which should be the new size of @data.
- *
- * Returns: %TRUE if successful, %FALSE otherwise
- */
-gboolean
-gst_bit_writer_set_pos (GstBitWriter * bitwriter, guint pos)
-{
- return _gst_bit_writer_set_pos_inline (bitwriter, pos);
-}
-
-/**
- * gst_bit_writer_put_bits_uint8:
- * @bitwriter: a #GstBitWriter instance
- * @value: value of #guint8 to write
- * @nbits: number of bits to write
- *
- * Write @nbits bits of @value to #GstBitWriter.
- *
- * Returns: %TRUE if successful, %FALSE otherwise.
- */
-
|
[-]
[+]
|
Deleted |
_service:tar_git:gstreamer1.0-vaapi-1.14.1.tar.xz/gstreamer-vaapi/gst-libs/gst/base/gstbitwriter.h
^
|
@@ -1,361 +0,0 @@
-/*
- * gstbitwriter.h - bitstream writer
- *
- * Copyright (C) 2013 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#ifndef GST_BIT_WRITER_H
-#define GST_BIT_WRITER_H
-
-#include <gst/gst.h>
-#include <string.h>
-
-G_BEGIN_DECLS
-
-#define GST_BIT_WRITER_DATA(writer) ((writer)->data)
-#define GST_BIT_WRITER_BIT_SIZE(writer) ((writer)->bit_size)
-#define GST_BIT_WRITER(writer) ((GstBitWriter *) (writer))
-
-typedef struct _GstBitWriter GstBitWriter;
-
-/**
- * GstBitWriter:
- * @data: Allocated @data for bit writer to write
- * @bit_size: Size of written @data in bits
- *
- * Private:
- * @bit_capacity: Capacity of the allocated @data
- * @auto_grow: @data space can auto grow
- *
- * A bit writer instance.
- */
-struct _GstBitWriter
-{
- guint8 *data;
- guint bit_size;
-
- /*< private >*/
- guint bit_capacity;
- gboolean auto_grow;
- gpointer _gst_reserved[GST_PADDING];
-};
-
-GstBitWriter *
-gst_bit_writer_new (guint32 reserved_bits) G_GNUC_MALLOC;
-
-GstBitWriter *
-gst_bit_writer_new_fill (guint8 * data, guint bits) G_GNUC_MALLOC;
-
-void
-gst_bit_writer_free (GstBitWriter * writer, gboolean free_data);
-
-void
-gst_bit_writer_init (GstBitWriter * bitwriter, guint32 reserved_bits);
-
-void
-gst_bit_writer_init_fill (GstBitWriter * bitwriter, guint8 * data, guint bits);
-
-void
-gst_bit_writer_clear (GstBitWriter * bitwriter, gboolean free_data);
-
-guint
-gst_bit_writer_get_size (GstBitWriter * bitwriter);
-
-guint8 *
-gst_bit_writer_get_data (GstBitWriter * bitwriter);
-
-gboolean
-gst_bit_writer_set_pos (GstBitWriter * bitwriter, guint pos);
-
-guint
-gst_bit_writer_get_space (GstBitWriter * bitwriter);
-
-gboolean
-gst_bit_writer_put_bits_uint8 (GstBitWriter * bitwriter,
- guint8 value, guint nbits);
-
-gboolean
-gst_bit_writer_put_bits_uint16 (GstBitWriter * bitwriter,
- guint16 value, guint nbits);
-
-gboolean
-gst_bit_writer_put_bits_uint32 (GstBitWriter * bitwriter,
- guint32 value, guint nbits);
-
-gboolean
-gst_bit_writer_put_bits_uint64 (GstBitWriter * bitwriter,
- guint64 value, guint nbits);
-
-gboolean
-gst_bit_writer_put_bytes (GstBitWriter * bitwriter, const guint8 * data,
- guint nbytes);
-
-gboolean
-gst_bit_writer_align_bytes (GstBitWriter * bitwriter, guint8 trailing_bit);
-
-static const guint8 _gst_bit_writer_bit_filling_mask[9] = {
- 0x00, 0x01, 0x03, 0x07,
- 0x0F, 0x1F, 0x3F, 0x7F,
- 0xFF
-};
-
-/* Aligned to 256 bytes */
-#define __GST_BITS_WRITER_ALIGNMENT_MASK 2047
-#define __GST_BITS_WRITER_ALIGNED(bitsize) \
- (((bitsize) + __GST_BITS_WRITER_ALIGNMENT_MASK)&(~__GST_BITS_WRITER_ALIGNMENT_MASK))
-
-static inline gboolean
-_gst_bit_writer_check_space (GstBitWriter * bitwriter, guint32 bits)
-{
- guint32 new_bit_size = bits + bitwriter->bit_size;
- guint32 clear_pos;
-
- g_assert (bitwriter->bit_size <= bitwriter->bit_capacity);
- if (new_bit_size <= bitwriter->bit_capacity)
- return TRUE;
-
- if (!bitwriter->auto_grow)
- return FALSE;
-
- /* auto grow space */
- new_bit_size = __GST_BITS_WRITER_ALIGNED (new_bit_size);
- g_assert (new_bit_size
- && ((new_bit_size & __GST_BITS_WRITER_ALIGNMENT_MASK) == 0));
- clear_pos = ((bitwriter->bit_size + 7) >> 3);
- bitwriter->data = g_realloc (bitwriter->data, (new_bit_size >> 3));
- memset (bitwriter->data + clear_pos, 0, (new_bit_size >> 3) - clear_pos);
- bitwriter->bit_capacity = new_bit_size;
- return TRUE;
-}
-
-#undef __GST_BITS_WRITER_ALIGNMENT_MASK
-#undef __GST_BITS_WRITER_ALIGNED
-
-#define __GST_BIT_WRITER_WRITE_BITS_UNCHECKED(bits) \
-static inline void \
-gst_bit_writer_put_bits_uint##bits##_unchecked( \
- GstBitWriter *bitwriter, \
- guint##bits value, \
- guint nbits \
-) \
-{ \
- guint byte_pos, bit_offset; \
- guint8 *cur_byte; \
- guint fill_bits; \
- \
- byte_pos = (bitwriter->bit_size >> 3); \
- bit_offset = (bitwriter->bit_size & 0x07); \
- cur_byte = bitwriter->data + byte_pos; \
- g_assert (nbits <= bits); \
- g_assert( bit_offset < 8 && \
- bitwriter->bit_size <= bitwriter->bit_capacity); \
- \
- while (nbits) { \
- fill_bits = ((8 - bit_offset) < nbits ? (8 - bit_offset) : nbits); \
- nbits -= fill_bits; \
- bitwriter->bit_size += fill_bits; \
- \
- *cur_byte |= (((value >> nbits) & _gst_bit_writer_bit_filling_mask[fill_bits]) \
- << (8 - bit_offset - fill_bits)); \
- ++cur_byte; \
- bit_offset = 0; \
- } \
- g_assert(cur_byte <= \
- (bitwriter->data + (bitwriter->bit_capacity >> 3))); \
-}
-
-__GST_BIT_WRITER_WRITE_BITS_UNCHECKED (8)
-__GST_BIT_WRITER_WRITE_BITS_UNCHECKED (16)
-__GST_BIT_WRITER_WRITE_BITS_UNCHECKED (32)
-__GST_BIT_WRITER_WRITE_BITS_UNCHECKED (64)
-#undef __GST_BIT_WRITER_WRITE_BITS_UNCHECKED
-
-static inline guint
-gst_bit_writer_get_size_unchecked (GstBitWriter * bitwriter)
-{
- return GST_BIT_WRITER_BIT_SIZE (bitwriter);
-}
-
-static inline guint8 *
-gst_bit_writer_get_data_unchecked (GstBitWriter * bitwriter)
-{
- return GST_BIT_WRITER_DATA (bitwriter);
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:gstreamer1.0-vaapi-1.14.1.tar.xz/gstreamer-vaapi/gst-libs/gst/base/meson.build
^
|
@@ -1,22 +0,0 @@
-gstvaapi_baseutils_sources = [
- 'gstbitwriter.c',
-]
-
-gstvaapi_baseutils_headers = [
- 'gstbitwriter.h',
-]
-
-gstvaapi_baseutils_deps = [gstbase_dep]
-
-gstvaapi_baseutils = static_library('gstvaapi-baseutils-@0@'.format(api_version),
- gstvaapi_baseutils_sources,
- c_args : gstreamer_vaapi_args,
- include_directories: [configinc, libsinc],
- version : libversion,
- soversion : soversion,
- dependencies : gstvaapi_baseutils_deps,
-)
-
-gstvaapi_baseutils_dep = declare_dependency(link_with: gstvaapi_baseutils,
- include_directories : [libsinc],
- dependencies : gstvaapi_baseutils_deps)
|
[-]
[+]
|
Added |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/.gitlab-ci.yml
^
|
@@ -0,0 +1 @@
+include: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/1.16/gitlab/ci_template.yml"
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/.gitmodules
^
|
@@ -1,3 +1,3 @@
[submodule "common"]
path = common
- url = https://anongit.freedesktop.org/git/gstreamer/common.git
+ url = https://gitlab.freedesktop.org/gstreamer/common.git
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/ChangeLog
^
|
@@ -1,19 +1,1837 @@
-=== release 1.14.1 ===
+=== release 1.16.1 ===
-2018-05-17 13:36:46 +0100 Tim-Philipp Müller <tim@centricular.com>
+2019-09-23 11:20:44 +0100 Tim-Philipp Müller <tim@centricular.com>
* ChangeLog:
* NEWS:
+ * RELEASE:
* configure.ac:
* gstreamer-vaapi.doap:
* meson.build:
- Release 1.14.1
+ Release 1.16.1
-2018-05-17 13:36:46 +0100 Tim-Philipp Müller <tim@centricular.com>
+2019-09-23 11:20:44 +0100 Tim-Philipp Müller <tim@centricular.com>
* docs/plugins/inspect/plugin-vaapi.xml:
Update docs
+2019-09-18 15:30:03 +1000 Matthew Waters <matthew@centricular.com>
+
+ * gst-libs/gst/vaapi/gstvaapiutils_egl.c:
+ * gst-libs/gst/vaapi/gstvaapiutils_egl.h:
+ egl: Fix racyness in display thread creation
+ Multiple different scenarios could break the display thread creation and
+ end up blocking waiting for thread o be created. Fix them all by
+ correctly waiting for a new boolean to become valid.
+
+2019-09-18 15:29:03 +1000 Matthew Waters <matthew@centricular.com>
+
+ * gst-libs/gst/vaapi/gstvaapiutils_egl.c:
+ egl: don't advertise a wrapped EGLContext as actually wrapped
+ It's not actually wrapped as we create a new EGLContext from the passed
+ in EGLContext. As a result, the created EGLContext was never destroyed.
+
+2019-04-15 16:51:26 +0100 Philippe Normand <philn@igalia.com>
+
+ * gst/vaapi/gstvaapipluginutil.c:
+ pluginutil: Remove Mesa from drivers white list
+ The Mesa Gallium driver is poorly tested currently, leading to bad user
+ experience for AMD users. The driver can be added back to the white list at
+ runtime using the GST_VAAPI_ALL_DRIVERS environment variable.
+
+2019-08-28 12:49:03 -0400 Thibault Saunier <tsaunier@igalia.com>
+
+ * gst/vaapi/gstvaapidecodebin.c:
+ Classify vaapidecodebin as a hardware decoder
+
+2019-08-27 18:12:45 +0800 He Junyan <junyan.he@hotmail.com>
+
+ * gst/vaapi/gstvaapipostproc.c:
+ libs: postproc: fix a memory leak point.
+ filter_ops and filter_formats should already have valid value when
+ the function gst_vaapipostproc_ensure_filter_caps re-enter
+
+2019-08-12 18:41:52 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ * gst/vaapi/gstvaapivideomemory.c:
+ vaapivideomemory: demote error message to info
+ The main reason to demote the message's level is because it is not an
+ error, it's a possible output of the trial and there's a code path
+ that handles it.
+ Secondly, it's very annoying when using gallium driver for radeon.
+
+2019-06-06 17:24:30 +0300 Freyr <freyrnjordrson@gmail.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder_vp8.c:
+ * gst-libs/gst/vaapi/gstvaapiencoder_vp9.c:
+ libs: encoder: vp8,vp9: reset frame_counter when input frame's format changes
+ When input frame's formate changes, vp{8,9} encoders don't reset their frame
+ counter, hence the newly created frame could become a P-frame, leading to some
+ major troubles (sigabrt in libdrm in case of vp9). This patch adds some frame
+ prediction-related reset logic to the `flush' methods of GstVaapiEncoderVP8 and
+ GstVaapiEncoderVP9 implementations.
+
+2019-06-04 13:27:50 +0800 He Junyan <junyan.he@hotmail.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c:
+ libs: mpeg2 encoder: No packed header for SPS and PPS
+ Dislable passing down packed PPS and PPS to driver if driver does
+ not want it.
+ Fix: #168
+
+2019-05-31 13:08:39 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ * gst-libs/gst/vaapi/gstvaapidecoder_vp9.c:
+ libs: dec: vp9: clear parser pointer after release
+ Fix an use-after-release of the parser pointer in VP9 decoder.
+
+2019-05-28 12:09:36 +0300 Freyr666 <sky_rider_93@mail.ru>
+
+ * gst/vaapi/gstvaapiencode.c:
+ vaapiencode: Fixes deadlock in gst_vaapiencode_change_state function
+ This fixes a deadlock in gst_vaapiencode_change_state, which was due to
+ srcpad's chain function was locked waiting for available buffers. Since the
+ coded buffers in codedbuf_queue become available after sinkpad consume the
+ encoded frames, Paused -> Ready state change leads to deadlock. Coded buffers
+ are never consumed and marked free, hence gst_vaapiencode_handle_frame waits for
+ available buffers and holds the stream_lock of the srcpad.
+
+2019-05-16 10:05:17 +0800 Wangfei <fei.w.wang@intel.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
+ libs: enc: h265: reset num_ref_idx_l1_active_minus1 when low delay B.
+ When enable low delay B, the reference list 1 will be same with
+ reference list 0, so need reset the num_ref_idx_l1_active_minus1
+ to num_ref_idx_l0_active_minus1.
+ Fixes: #160
+
+2019-05-10 18:29:10 +0800 He Junyan <junyan.he@hotmail.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
+ * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
+ libs: encoder: not call ensure_num_slices inside g_assert
+ g_assert will take no effect when glib's G_DISABLE_ASSERT macro is
+ defined. The function inside the g_assert will take no effect and
+ we will fail to set the correct slice number.
+
+2019-05-03 10:31:52 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder.c:
+ libs: encoder: continue if roi meta is NULL
+ Coverity scan bug:
+ If the function actually returns a null value, a null pointer
+ dereference will occur.
+ In gst_vaapi_encoder_ensure_param_roi_regions(): Return value of
+ function which returns null is dereferenced without checking
+
+2019-04-15 19:58:14 +0800 He Junyan <junyan.he@hotmail.com>
+
+ * gst-libs/gst/vaapi/gstvaapidecoder_vp9.c:
+ lib: decoder: vp9: Set chroma_type by VP9 bit_depth
+ The decoder's surface chroma type should depend on the bit depth
+ of VP9's parser. For 10bits VP9 stream, we need to use P10LE kind
+ 10 bits surface as the decoder result.
+ Fixes #155
+
+2019-05-02 16:00:57 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ * gst/vaapi/gstvaapipostprocutil.c:
+ vaapipostproc: don't do any color conversion when GL_TEXTURE_UPLOAD
+ https://bugzilla.gnome.org/show_bug.cgi?id=748184 has resurrected
+ with commit 3e992d8a
+ Since gst_vaapi_find_preferred_caps_feature() returns a color format
+ from caps negotiation, different from the default one (NV12), the
+ postproc enables the color transformation. But when GL_TEXTURE_UPLOAD
+ feature is negotiated, no color transformation shall be done.
+ Nonetheless, with commit 3e992d8a the requested format changes
+ firstly, because there's no video sink yet, so ANY caps are
+ negotiated; but later, when there's a video sink and a caps
+ renegotiation, the GL_TEXTURE_UPLOAD is negotiated though the color
+ format conversion still ongoing. It is required to reset that
+ conversion.
+ This patch force default color format when GL_TEXTURE_UPLOAD is
+ selected as preferred, thus avoiding the color conversion.
+ Fixes: #157
+
+2019-04-19 15:49:37 -0700 Julien Isorce <jisorce@oblong.com>
+
+ * gst-libs/gst/vaapi/gstvaapisurface_drm.c:
+ libs: surface: fix double free when dmabuf export fails
+ Happens if vaAcquireBufferHandle fails.
+
+2019-05-02 12:37:18 +0100 Tim-Philipp Müller <tim@centricular.com>
+
+ * .gitlab-ci.yml:
+ ci: use template from 1.16 branch
+
+=== release 1.16.0 ===
+
+2019-04-19 00:38:12 +0100 Tim-Philipp Müller <tim@centricular.com>
+
+ * ChangeLog:
+ * NEWS:
+ * RELEASE:
+ * configure.ac:
+ * gstreamer-vaapi.doap:
+ * meson.build:
+ Release 1.16.0
+
+2019-04-19 00:38:12 +0100 Tim-Philipp Müller <tim@centricular.com>
+
+ * docs/plugins/inspect/plugin-vaapi.xml:
+ Update docs
+
+2019-04-15 19:34:05 +0200 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
+ * gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c:
+ * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
+ libs: encoder: h264,h265: guard VA version for max_qp property
+ This patch fixes a regression from commit 5b1fe9c6.
+ max_qp, in rate control configuration, appeared in libva release
+ 2.1 (API 1.1), thus it is required to guard the VA API version.
+ Fixes: #150
+
+2019-04-08 18:29:35 +0800 He Junyan <junyan.he@hotmail.com>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/NEWS
^
|
@@ -1,17 +1,17 @@
-GSTREAMER 1.14 RELEASE NOTES
+GSTREAMER 1.16 RELEASE NOTES
-GStreamer 1.14.0 was originally released on 19 March 2018.
+GStreamer 1.16.0 was originally released on 19 April 2019.
-The latest bug-fix release in the 1.14 series is 1.14.1 and was released
-on 17 May 2018.
+The latest bug-fix release in the 1.16 series is 1.16.1 and was released
+on 23 September 2019.
-See https://gstreamer.freedesktop.org/releases/1.14/ for the latest
+See https://gstreamer.freedesktop.org/releases/1.16/ for the latest
version of this document.
-_Last updated: Thursday 17 May 2018, 12:00 UTC (log)_
+_Last updated: Sunday 22 September 2019, 21:00 UTC (log)_
Introduction
@@ -20,1321 +20,1718 @@
the stable 1.x API series of your favourite cross-platform multimedia
framework!
-As always, this release is again packed with new features, bug fixes and
-other improvements.
+As always, this release is again packed with many new features, bug
+fixes and other improvements.
Highlights
-- WebRTC support: real-time audio/video streaming to and from web
- browsers
+- GStreamer WebRTC stack gained support for data channels for
+ peer-to-peer communication based on SCTP, BUNDLE support, as well as
+ support for multiple TURN servers.
-- Experimental support for the next-gen royalty-free AV1 video codec
+- AV1 video codec support for Matroska and QuickTime/MP4 containers
+ and more configuration options and supported input formats for the
+ AOMedia AV1 encoder
-- Video4Linux: encoding support, stable element names and faster
- device probing
+- Support for Closed Captions and other Ancillary Data in video
-- Support for the Secure Reliable Transport (SRT) video streaming
- protocol
+- Support for planar (non-interleaved) raw audio
-- RTP Forward Error Correction (FEC) support (ULPFEC)
+- GstVideoAggregator, compositor and OpenGL mixer elements are now in
+ -base
-- RTSP 2.0 support in rtspsrc and gst-rtsp-server
+- New alternate fields interlace mode where each buffer carries a
+ single field
-- ONVIF audio backchannel support in gst-rtsp-server and rtspsrc
+- WebM and Matroska ContentEncryption support in the Matroska demuxer
-- playbin3 gapless playback and pre-buffering support
+- new WebKit WPE-based web browser source element
-- tee, our stream splitter/duplication element, now does allocation
- query aggregation which is important for efficient data handling and
- zero-copy
+- Video4Linux: HEVC encoding and decoding, JPEG encoding, and improved
+ dmabuf import/export
-- QuickTime muxer has a new prefill recording mode that allows file
- import in Adobe Premiere and FinalCut Pro while the file is still
- being written.
+- Hardware-accelerated Nvidia video decoder gained support for VP8/VP9
+ decoding, whilst the encoder gained support for H.265/HEVC encoding.
-- rtpjitterbuffer fast-start mode and timestamp offset adjustment
- smoothing
+- Many improvements to the Intel Media SDK based hardware-accelerated
+ video decoder and encoder plugin (msdk): dmabuf import/export for
+ zero-copy integration with other components; VP9 decoding; 10-bit
+ HEVC encoding; video post-processing (vpp) support including
+ deinterlacing; and the video decoder now handles dynamic resolution
+ changes.
-- souphttpsrc connection sharing, which allows for connection reuse,
- cookie sharing, etc.
+- The ASS/SSA subtitle overlay renderer can now handle multiple
+ subtitles that overlap in time and will show them on screen
+ simultaneously
-- nvdec: new plugin for hardware-accelerated video decoding using the
- NVIDIA NVDEC API
+- The Meson build is now feature-complete (*) and it is now the
+ recommended build system on all platforms. The Autotools build is
+ scheduled to be removed in the next cycle.
-- Adaptive DASH trick play support
+- The GStreamer Rust bindings and Rust plugins module are now
+ officially part of upstream GStreamer.
-- ipcpipeline: new plugin that allows splitting a pipeline across
- multiple processes
+- The GStreamer Editing Services gained a gesdemux element that allows
+ directly playing back serialized edit list with playbin or
+ (uri)decodebin
-- Major gobject-introspection annotation improvements for large parts
- of the library API
-
-- GStreamer C# bindings have been revived and seen many updates and
- fixes
-
-- The externally maintained GStreamer Rust bindings had many usability
- improvements and cover most of the API now. Coinciding with the 1.14
- release, a new release with the 1.14 API additions is happening.
+- Many performance improvements
Major new features and changes
-WebRTC support
+Noteworthy new API
-There is now basic support for WebRTC in GStreamer in form of a new
-webrtcbin element and a webrtc support library. This allows you to build
-applications that set up connections with and stream to and from other
-WebRTC peers, whilst leveraging all of the usual GStreamer features such
-as hardware-accelerated encoding and decoding, OpenGL integration,
-zero-copy and embedded platform support. And it's easy to build and
-integrate into your application too!
-
-WebRTC enables real-time communication of audio, video and data with web
-browsers and native apps, and it is supported or about to be support by
-recent versions of all major browsers and operating systems.
-
-GStreamer's new WebRTC implementation uses libnice for Interactive
-Connectivity Establishment (ICE) to figure out the best way to
-communicate with other peers, punch holes into firewalls, and traverse
-NATs.
-
-The implementation is not complete, but all the basics are there, and
-the code sticks fairly close to the PeerConnection API. Where
-functionality is missing it should be fairly obvious where it needs to
-go.
-
-For more details, background and example code, check out Nirbheek's blog
-post _GStreamer has grown a WebRTC implementation_, as well as Matthew's
-_GStreamer WebRTC_ talk from last year's GStreamer Conference in Prague.
+- GstAggregator has a new "min-upstream-latency" property that forces
+ a minimum aggregate latency for the input branches of an aggregator.
+ This is useful for dynamic pipelines where branches with a higher
+ latency might be added later after the pipeline is already up and
+ running and where a change in the latency would be disruptive. This
+ only applies to the case where at least one of the input branches is
+ live though, it won’t force the aggregator into live mode in the
+ absence of any live inputs.
+
+- GstBaseSink gained a "processing-deadline" property and
+ setter/getter API to configure a processing deadline for live
+ pipelines. The processing deadline is the acceptable amount of time
+ to process the media in a live pipeline before it reaches the sink.
+ This is on top of the systemic latency that is normally reported by
+ the latency query. This defaults to 20ms and should make pipelines
+ such as v4l2src ! xvimagesink not claim that all frames are late in
+ the QoS events. Ideally, this should replace the "max-lateness"
+ property for most applications.
+
+- RTCP Extended Reports (XR) parsing according to RFC 3611:
+ Loss/Duplicate RLE, Packet Receipt Times, Receiver Reference Time,
+ Delay since the last Receiver (DLRR), Statistics Summary, and VoIP
+ Metrics reports. This only provides the ability to parse such
+ packets, generation of XR packets is not supported yet and XR
+ packets are not automatically parsed by rtpbin / rtpsession but must
+ be actively handled by the application.
+
+- a new mode for interlaced video was added where each buffer carries
+ a single field of interlaced video, with buffer flags indicating
+ whether the field is the top field or bottom field. Top and bottom
+ fields are expected to alternate in this mode. Caps for this
+ interlace mode must also carry a format:Interlaced caps feature to
+ ensure backwards compatibility.
-New Elements
-
-- webrtcbin handles the transport aspects of webrtc connections (see
- WebRTC section above for more details)
+- The video library has gained support for three new raw pixel
+ formats:
-- New srtsink and srtsrc elements for the Secure Reliable Transport
- (SRT) video streaming protocol, which aims to be easy to use whilst
- striking a new balance between reliability and latency for low
- latency video streaming use cases. More details about SRT and the
- implementation in GStreamer in Olivier's blog post _SRT in
|
[-]
[+]
|
Added |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/RELEASE
^
|
@@ -0,0 +1,96 @@
+This is GStreamer gstreamer-vaapi 1.16.1.
+
+The GStreamer team is pleased to announce another bug-fix release in the
+stable 1.x API series of your favourite cross-platform multimedia framework!
+
+The 1.16 release series adds new features on top of the 1.14 series and is
+part of the API and ABI-stable 1.x release series of the GStreamer multimedia
+framework.
+
+Full release notes will one day be found at:
+
+ https://gstreamer.freedesktop.org/releases/1.16/
+
+Binaries for Android, iOS, Mac OS X and Windows will usually be provided
+shortly after the release.
+
+This module will not be very useful by itself and should be used in conjunction
+with other GStreamer modules for a complete multimedia experience.
+
+ - gstreamer: provides the core GStreamer libraries and some generic plugins
+
+ - gst-plugins-base: a basic set of well-supported plugins and additional
+ media-specific GStreamer helper libraries for audio,
+ video, rtsp, rtp, tags, OpenGL, etc.
+
+ - gst-plugins-good: a set of well-supported plugins under our preferred
+ license
+
+ - gst-plugins-ugly: a set of well-supported plugins which might pose
+ problems for distributors
+
+ - gst-plugins-bad: a set of plugins of varying quality that have not made
+ their way into one of core/base/good/ugly yet, for one
+ reason or another. Many of these are are production quality
+ elements, but may still be missing documentation or unit
+ tests; others haven't passed the rigorous quality testing
+ we expect yet.
+
+ - gst-libav: a set of codecs plugins based on the ffmpeg library. This is
+ where you can find audio and video decoders and encoders
+ for a wide variety of formats including H.264, AAC, etc.
+
+ - gstreamer-vaapi: hardware-accelerated video decoding and encoding using
+ VA-API on Linux. Primarily for Intel graphics hardware.
+
+ - gst-omx: hardware-accelerated video decoding and encoding, primarily for
+ embedded Linux systems that provide an OpenMax
+ implementation layer such as the Raspberry Pi.
+
+ - gst-rtsp-server: library to serve files or streaming pipelines via RTSP
+
+ - gst-editing-services: library an plugins for non-linear editing
+
+==== Download ====
+
+You can find source releases of gstreamer in the download
+directory: https://gstreamer.freedesktop.org/src/gstreamer/
+
+The git repository and details how to clone it can be found at
+https://gitlab.freedesktop.org/gstreamer/
+
+==== Homepage ====
+
+The project's website is https://gstreamer.freedesktop.org/
+
+==== Support and Bugs ====
+
+We have recently moved from GNOME Bugzilla to GitLab on freedesktop.org
+for bug reports and feature requests:
+
+ https://gitlab.freedesktop.org/gstreamer
+
+Please submit patches via GitLab as well, in form of Merge Requests. See
+
+ https://gstreamer.freedesktop.org/documentation/contribute/
+
+for more details.
+
+For help and support, please subscribe to and send questions to the
+gstreamer-devel mailing list (see below for details).
+
+There is also a #gstreamer IRC channel on the Freenode IRC network.
+
+==== Developers ====
+
+GStreamer source code repositories can be found on GitLab on freedesktop.org:
+
+ https://gitlab.freedesktop.org/gstreamer
+
+and can also be cloned from there and this is also where you can submit
+Merge Requests or file issues for bugs or feature requests.
+
+Interested developers of the core library, plugins, and applications should
+subscribe to the gstreamer-devel list:
+
+ https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/common/gst-glib-gen.mak
^
|
@@ -6,6 +6,7 @@
#glib_gen_prefix=gst_color_balance
#glib_gen_basename=colorbalance
#glib_gen_decl_banner=GST_EXPORT
+#glib_gen_decl_include=\#include <gst/foo/foo-prelude.h>
enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
@@ -15,13 +16,13 @@
mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h
$(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list
- $(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \
+ $(AM_V_GEN)echo "#include \"config.h\"\n#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \
$(GLIB_GENMARSHAL) --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \
mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c
$(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
$(AM_V_GEN)$(GLIB_MKENUMS) \
- --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n\nG_BEGIN_DECLS\n" \
+ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <gst/gst.h>\n$(glib_gen_decl_include)\nG_BEGIN_DECLS\n" \
--fprod "\n/* enumerations from \"@filename@\" */\n" \
--vhead "$(glib_gen_decl_banner)\nGType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
@@ -30,7 +31,7 @@
$(glib_gen_basename)-enumtypes.c: $(glib_enum_headers)
@if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
$(AM_V_GEN)$(GLIB_MKENUMS) \
- --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \
+ --fhead "#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/common/gst.supp
^
|
@@ -28,100 +28,6 @@
fun:clone
}
-### glibc suppressions
-
-{
- <conditional jump on wim's debian 2/2/06>
- Memcheck:Cond
- obj:/lib/ld-2.*.so
- fun:dl_open_worker
- obj:/lib/ld-2.*.so
- fun:_dl_open
- fun:dlopen_doit
- obj:/lib/ld-2.*.so
- fun:_dlerror_run
- fun:dlopen
- fun:g_module_open
- fun:gst_plugin_load_file
-}
-
-{
- <Conditional jump>
- Memcheck:Cond
- fun:strlen
- fun:fillin_rpath
- fun:_dl_init_paths
- fun:dl_main
- fun:_dl_sysdep_start
- fun:_dl_start
- obj:/lib64/ld-2.*.so
- obj:*
- obj:*
-}
-
-{
- <Conditional jump>
- Memcheck:Cond
- fun:_dl_relocate_object
- fun:dl_main
- fun:_dl_sysdep_start
- fun:_dl_start
-}
-
-{
- <insert a suppression name here>
- Memcheck:Cond
- fun:*
- fun:dl_open_worker
- fun:_dl_catch_error
- fun:_dl_open
- fun:dlopen_doit
- fun:_dl_catch_error
- fun:_dlerror_run
- fun:dlopen@@GLIBC_2.2.5
-}
-
-# glibc does not deallocate thread-local storage
-
-{
- <tls>
- Memcheck:Leak
- fun:calloc
- fun:_dl_allocate_tls
- fun:pthread_create@@*
-}
-
-{
- <tls>
- Memcheck:Leak
- fun:calloc
- fun:allocate_dtv
- fun:_dl_allocate_tls
-}
-
-# I get an extra stack entry on x86/dapper
-{
- <tls>
- Memcheck:Leak
- fun:calloc
- obj:/lib/ld-2.3.*.so
- fun:_dl_allocate_tls
- fun:pthread_create@@*
-}
-
-
-{
- <pthread strstr>
- Memcheck:Cond
- fun:strstr
- fun:__pthread_initialize_minimal
- obj:/lib/libpthread-*.so
- obj:/lib/libpthread-*.so
- fun:call_init
- fun:_dl_init
- obj:/lib/ld-*.so
-}
-
# a thread-related free problem in glibc from Edgard
{
__libc_freeres_rw_acess
@@ -135,215 +41,6 @@
}
{
- <a conditional jump on wim's debian>
- Memcheck:Cond
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
-}
-
-# g_module_open-related problems
-{
- <started showing up on fc4-quick>
- Memcheck:Addr2
- fun:memcpy
- fun:_dl_map_object_deps
- fun:dl_open_worker
- fun:_dl_catch_error
- fun:_dl_open
- fun:dlopen_doit
- fun:_dl_catch_error
- fun:_dlerror_run
- fun:dlopen@@GLIBC_2.1
- fun:g_module_open
- fun:gst_plugin_load_file
- fun:gst_registry_scan_path_level
- fun:gst_registry_scan_path_level
- fun:gst_registry_scan_path_level
- fun:init_post
- fun:g_option_context_parse
- fun:gst_init_check
- fun:gst_init
- fun:gst_check_init
- fun:main
-}
-
-{
- <started showing up on fc4-quick>
- Memcheck:Addr4
- fun:memcpy
- fun:_dl_map_object_deps
- fun:dl_open_worker
- fun:_dl_catch_error
- fun:_dl_open
- fun:dlopen_doit
- fun:_dl_catch_error
- fun:_dlerror_run
- fun:dlopen@@GLIBC_2.1
- fun:g_module_open
- fun:gst_plugin_load_file
- fun:gst_registry_scan_path_level
- fun:gst_registry_scan_path_level
- fun:gst_registry_scan_path_level
- fun:init_post
- fun:g_option_context_parse
- fun:gst_init_check
- fun:gst_init
- fun:gst_check_init
- fun:main
-}
-
-{
- <g_module_open on wim's debian>
- Memcheck:Cond
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- fun:do_sym
- fun:_dl_sym
- fun:dlsym_doit
- obj:/lib/ld-2.3.*.so
- fun:_dlerror_run
- fun:dlsym
- fun:g_module_symbol
- fun:g_module_open
- fun:gst_plugin_load_file
-}
-
-{
- <g_module_open on wim's debian>
- Memcheck:Cond
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- obj:/lib/ld-2.3.*.so
- fun:dl_open_worker
- obj:/lib/ld-2.3.*.so
- fun:_dl_open
- fun:dlopen_doit
- obj:/lib/ld-2.3.*.so
- fun:_dlerror_run
- fun:dlopen@@GLIBC_2.1
- fun:g_module_open
- fun:gst_plugin_load_file
-}
-{
- <g_module_open on wim's debian>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/common/gtk-doc-plugins.mak
^
|
@@ -121,7 +121,9 @@
@if test x"$(srcdir)" != x. ; then \
for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
do \
- if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
+ if test -e $(srcdir)/$$f; then \
+ cp -u $(srcdir)/$$f . || cp $(srcdir)/$$f . ; \
+ fi; \
done; \
fi; \
mkdir -p $(INSPECT_DIR); \
@@ -155,7 +157,9 @@
@if test x"$(srcdir)" != x. ; then \
for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
do \
- if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
+ if test -e $(srcdir)/$$f; then \
+ cp -u $(srcdir)/$$f . || cp $(srcdir)/$$f .; \
+ fi; \
done; \
fi
@_source_dir='' ; \
@@ -308,7 +312,7 @@
endif
# wildcard is apparently not portable to other makes, hence the use of find
-inspect_files = $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml')
+inspect_files = $(sort $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml'))
check-inspected-versions:
@echo Checking plugin versions of inspected plugin data ...; \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/common/update-common
^
|
@@ -21,7 +21,7 @@
# network usage.
BRANCH=master
reference=~/gst
-PUSHURL=ssh://git.freedesktop.org/git/gstreamer
+PUSHURL=git@gitlab.freedesktop.org:gstreamer
DRY_RUN=
KEEP=no
COMMON_COMMIT=
@@ -78,17 +78,11 @@
do
cd $dir
if test -e $reference/$module/.git ; then
- pushd $reference/$module
- PUSHURL=`git config remote.origin.url | sed 's@\(git/gstreamer\).*@\1@'`
- popd
- git clone --reference $reference/$module/.git --shared ssh://git.freedesktop.org/git/gstreamer/$module
+ git clone --reference $reference/$module/.git --shared git@gitlab.freedesktop.org:gstreamer/$module.git
elif test -e $topdir/$module/.git ; then
- pushd $topdir/$module
- PUSHURL=`git config remote.origin.url | sed 's@\(git/gstreamer\).*@\1@'`
- popd
- git clone --reference $topdir/$module/.git --shared $PUSHURL/$module
+ git clone --reference $topdir/$module/.git --shared $PUSHURL/$module.git
else
- git clone $PUSHURL/$module
+ git clone $PUSHURL/$module.git
fi
cd $dir/$module
@@ -116,10 +110,10 @@
# avoid downloading libav submodule by re-using existing checkout
if test "$module" = "gst-libav"; then
- if test -e $reference/gst-libav/gst-libs/ext/ffmpeg/.git ; then
- git submodule update --reference $reference/gst-libav/gst-libs/ext/ffmpeg -- gst-libs/ext/gst-libav
- elif test -e $topdir/gst-libav/gst-libs/ext/ffmpeg/.git ; then
- git submodule update --reference $topdir/gst-libav/gst-libs/ext/ffmpeg/ -- gst-libs/ext/ffmpeg
+ if test -e $reference/gst-libav/gst-libs/ext/libav/.git ; then
+ git submodule update --reference $reference/gst-libav/gst-libs/ext/libav -- gst-libs/ext/libav
+ elif test -e $topdir/gst-libav/gst-libs/ext/libav/.git ; then
+ git submodule update --reference $topdir/gst-libav/gst-libs/ext/libav/ -- gst-libs/ext/libav
else
git submodule update
fi
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/configure.ac
^
|
@@ -1,6 +1,6 @@
# gstreamer-vaapi package version number
m4_define([gst_vaapi_major_version], [1])
-m4_define([gst_vaapi_minor_version], [14])
+m4_define([gst_vaapi_minor_version], [16])
m4_define([gst_vaapi_micro_version], [1])
m4_define([gst_vaapi_nano_version], [0])
m4_define([gst_vaapi_version],
@@ -16,27 +16,23 @@
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
# gstreamer-vaapi library (libtool) version number
-m4_define([gst_vaapi_lt_current], [1401])
+m4_define([gst_vaapi_lt_current], [1601])
m4_define([gst_vaapi_lt_revision], [0])
-m4_define([gst_vaapi_lt_age], [1401])
+m4_define([gst_vaapi_lt_age], [1601])
# glib version number
m4_define([glib_version], [2.40])
# gstreamer version number
-m4_define([gst_version], [1.14.1])
-m4_define([gst_plugins_base_version], [1.14.1])
-m4_define([gst_plugins_bad_version], [1.14.1])
+m4_define([gst_version], [1.16.1])
+m4_define([gst_plugins_base_version], [1.16.1])
+m4_define([gst_plugins_bad_version], [1.16.1])
# Wayland minimum version number
-m4_define([wayland_api_version], [1.0.2])
+m4_define([wayland_api_version], [1.11.0])
# VA-API minimum version number
-m4_define([va_api_version], [0.30.4])
-m4_define([va_api_enc_version], [0.34.0])
-m4_define([va_api_drm_version], [0.33.0])
-m4_define([va_api_x11_version], [0.31.0])
-m4_define([va_api_wld_version], [0.33.0])
+m4_define([va_api_version], [0.39.0])
# gtk-doc version number
# XXX: introspection annotations require gtk-doc >= 1.12
@@ -93,10 +89,6 @@
dnl *** required versions of VA-API stuff ***
VAAPI_REQ=va_api_version
-VAAPI_ENC_REQ=va_api_enc_version
-VAAPI_DRM_REQ=va_api_drm_version
-VAAPI_X11_REQ=va_api_x11_version
-VAAPI_WLD_REQ=va_api_wld_version
dnl *** autotools stuff ****
@@ -474,13 +466,18 @@
dnl Check for Wayland
USE_WAYLAND=0
if test "x$enable_wayland" = "xyes"; then
- PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQ],
+ PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQ, wayland-protocols >= 1.15],
[
USE_WAYLAND=1
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $WAYLAND_CFLAGS"
AC_CHECK_HEADERS([wayland-client.h], [], [USE_WAYLAND=0])
CPPFLAGS="$saved_CPPFLAGS"
+
+ AC_CHECK_PROGS(WAYLAND_SCANNER, wayland-scanner, [USE_WAYLAND=0])
+
+ WAYLAND_PROTOCOLS_DATADIR="`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`"
+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $WAYLAND_PROTOCOLS_DATADIR)
], [:])
fi
@@ -498,7 +495,7 @@
AC_CHECK_HEADERS([gtk/gtk.h], [], [USE_GTK=0])
CPPFLAGS="$saved_CPPFLAGS"
])
-AM_CONDITIONAL([USE_GTK], [test $USE_GTK -eq 1])
+dnl USE_GTK conditional is delayed after being sure to handle X11
dnl ---------------------------------------------------------------------------
dnl -- VA-API --
@@ -513,7 +510,7 @@
dnl VA/DRM API
if test $USE_DRM -eq 1; then
- PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_DRM_REQ],
+ PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_REQ],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
@@ -524,240 +521,22 @@
dnl VA/X11 API
if test $USE_X11 -eq 1; then
- PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_X11_REQ],
- [], [USE_X11=0])
+ PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_REQ],
+ [], [
+ USE_X11=0
+ USE_GLX=0
+ ])
fi
-dnl Check for va_dec_jpeg.h header
-saved_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
-AC_CHECK_HEADERS([va/va_dec_jpeg.h], [], [],
- [
-#include <va/va.h>
- ])
-CPPFLAGS="$saved_CPPFLAGS"
-
-dnl Check for JPEG decoding API (0.32.1+)
-USE_JPEG_DECODER=0
-AC_CACHE_CHECK([for JPEG decoding API],
- [ac_cv_have_jpeg_decoding_api],
- [
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $LIBVA_LIBS"
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM(
- [[
-#include <va/va.h>
-#ifdef HAVE_VA_VA_DEC_JPEG_H
-# include <va/va_dec_jpeg.h>
-#endif
- ]],
- [[
-VAPictureParameterBufferJPEGBaseline pic_param;
-VASliceParameterBufferJPEGBaseline slice_param;
-VAHuffmanTableBufferJPEGBaseline huffman_table;
-VAIQMatrixBufferJPEGBaseline iq_matrix;
- ]])
- ],
- [ac_cv_have_jpeg_decoding_api="yes"],
- [ac_cv_have_jpeg_decoding_api="no"])
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- ])
-AS_IF([test "x$ac_cv_have_jpeg_decoding_api" = "xyes"], [USE_JPEG_DECODER=1])
-
-dnl Check for va_dec_vp8.h header
-saved_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
-AC_CHECK_HEADERS([va/va_dec_vp8.h], [], [],
- [
-#include <va/va.h>
- ])
-CPPFLAGS="$saved_CPPFLAGS"
-
-dnl Check for VP8 decoding API (0.34+)
-USE_VP8_DECODER=0
-AC_CACHE_CHECK([for VP8 decoding API],
- [ac_cv_have_vp8_decoding_api],
- [
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $LIBVA_LIBS"
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM(
- [[
-#include <va/va.h>
-#ifdef HAVE_VA_VA_DEC_VP8_H
-# include <va/va_dec_vp8.h>
-#endif
- ]],
- [[
-VAPictureParameterBufferVP8 pic_param;
-VASliceParameterBufferVP8 slice_param;
-VAProbabilityDataBufferVP8 prob_data;
-VAIQMatrixBufferVP8 iq_matrix;
-slice_param.slice_data_offset = 0;
-slice_param.slice_data_flag = 0;
- ]])
- ],
- [ac_cv_have_vp8_decoding_api="yes"],
- [ac_cv_have_vp8_decoding_api="no"])
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- ])
-AS_IF([test "x$ac_cv_have_vp8_decoding_api" = "xyes"], [USE_VP8_DECODER=1])
-
-dnl Check for va_dec_vp9.h header
-saved_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
-AC_CHECK_HEADERS([va/va_dec_vp9.h], [], [],
- [
-#include <va/va.h>
- ])
-CPPFLAGS="$saved_CPPFLAGS"
-
-dnl Check for VP9 decoding API (0.37+)
-USE_VP9_DECODER=0
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/docs/plugins/inspect/plugin-vaapi.xml
^
|
@@ -3,7 +3,7 @@
<description>VA-API based elements</description>
<filename>../../gst/vaapi/.libs/libgstvaapi.so</filename>
<basename>libgstvaapi.so</basename>
- <version>1.14.1</version>
+ <version>1.16.1</version>
<license>LGPL</license>
<source>gstreamer-vaapi</source>
<package>gstreamer-vaapi</package>
@@ -12,7 +12,7 @@
<element>
<name>vaapidecodebin</name>
<longname>VA-API Decode Bin</longname>
- <class>Codec/Decoder/Video</class>
+ <class>Codec/Decoder/Video/Hardware</class>
<description>A VA-API based bin with a decoder and a postprocessor</description>
<author>Sreerenj Balachandran <sreerenj.balachandran@intel.com>, Victor Jaquez <victorx.jaquez@intel.com></author>
<pads>
@@ -26,14 +26,14 @@
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
</caps>
</pads>
</element>
<element>
<name>vaapih264dec</name>
<longname>VA-API H264 decoder</longname>
- <class>Codec/Decoder/Video</class>
+ <class>Codec/Decoder/Video/Hardware</class>
<description>A VA-API based H264 video decoder</description>
<author>Gwenole Beauchesne <gwenole.beauchesne@intel.com>, Halley Zhao <halley.zhao@intel.com>, Sreerenj Balachandran <sreerenj.balachandran@intel.com>, Wind Yuan <feng.yuan@intel.com></author>
<pads>
@@ -47,14 +47,14 @@
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
<element>
<name>vaapih264enc</name>
<longname>VA-API H264 encoder</longname>
- <class>Codec/Encoder/Video</class>
+ <class>Codec/Encoder/Video/Hardware</class>
<description>A VA-API based H264 video encoder</description>
<author>Wind Yuan <feng.yuan@intel.com></author>
<pads>
@@ -62,7 +62,7 @@
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
</caps>
<caps>
<name>src</name>
@@ -75,7 +75,7 @@
<element>
<name>vaapijpegdec</name>
<longname>VA-API JPEG decoder</longname>
- <class>Codec/Decoder/Video</class>
+ <class>Codec/Decoder/Video/Hardware</class>
<description>A VA-API based JPEG video decoder</description>
<author>Gwenole Beauchesne <gwenole.beauchesne@intel.com>, Halley Zhao <halley.zhao@intel.com>, Sreerenj Balachandran <sreerenj.balachandran@intel.com>, Wind Yuan <feng.yuan@intel.com></author>
<pads>
@@ -89,14 +89,14 @@
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
<element>
<name>vaapimpeg2dec</name>
<longname>VA-API MPEG2 decoder</longname>
- <class>Codec/Decoder/Video</class>
+ <class>Codec/Decoder/Video/Hardware</class>
<description>A VA-API based MPEG2 video decoder</description>
<author>Gwenole Beauchesne <gwenole.beauchesne@intel.com>, Halley Zhao <halley.zhao@intel.com>, Sreerenj Balachandran <sreerenj.balachandran@intel.com>, Wind Yuan <feng.yuan@intel.com></author>
<pads>
@@ -110,14 +110,14 @@
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
<element>
<name>vaapimpeg2enc</name>
<longname>VA-API MPEG-2 encoder</longname>
- <class>Codec/Encoder/Video</class>
+ <class>Codec/Encoder/Video/Hardware</class>
<description>A VA-API based MPEG-2 video encoder</description>
<author>Guangxin Xu <guangxin.xu@intel.com></author>
<pads>
@@ -125,7 +125,7 @@
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
</caps>
<caps>
<name>src</name>
@@ -138,7 +138,7 @@
<element>
<name>vaapipostproc</name>
<longname>VA-API video postprocessing</longname>
- <class>Filter/Converter/Video;Filter/Converter/Video/Scaler;Filter/Effect/Video;Filter/Effect/Video/Deinterlace</class>
+ <class>Filter/Converter/Effect/Video/Scaler/Deinterlace/Hardware</class>
<description>A VA-API video postprocessing filter</description>
<author>Gwenole Beauchesne <gwenole.beauchesne@intel.com></author>
<pads>
@@ -146,13 +146,13 @@
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
</caps>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
@@ -167,14 +167,14 @@
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:VASurface, meta:GstVideoOverlayComposition), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:VASurface, meta:GstVideoOverlayComposition), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
<element>
<name>vaapivc1dec</name>
<longname>VA-API VC1 decoder</longname>
- <class>Codec/Decoder/Video</class>
+ <class>Codec/Decoder/Video/Hardware</class>
<description>A VA-API based VC1 video decoder</description>
<author>Gwenole Beauchesne <gwenole.beauchesne@intel.com>, Halley Zhao <halley.zhao@intel.com>, Sreerenj Balachandran <sreerenj.balachandran@intel.com>, Wind Yuan <feng.yuan@intel.com></author>
<pads>
@@ -188,7 +188,7 @@
<name>src</name>
<direction>source</direction>
<presence>always</presence>
- <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+ <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:DMABuf), format=(string){ I420, YV12, RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
</caps>
</pads>
</element>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/Makefile.am
^
|
@@ -1,3 +1,3 @@
-SUBDIRS = base vaapi
+SUBDIRS = vaapi
-include $(top_srcdir)/git.mk
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/meson.build
^
|
@@ -1,2 +1 @@
-subdir('base')
subdir('vaapi')
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/Makefile.am
^
|
@@ -21,7 +21,6 @@
endif
libgstvaapi_cflags = \
- -DIN_LIBGSTVAAPI_CORE \
-DGST_USE_UNSTABLE_API \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -40,7 +39,6 @@
$(GST_VIDEO_LIBS) \
$(GST_CODEC_PARSERS_LIBS) \
$(LIBVA_LIBS) \
- $(top_builddir)/gst-libs/gst/base/libgstvaapi-baseutils.la \
$(NULL)
libgstvaapi_source_c = \
@@ -150,31 +148,23 @@
libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
-if USE_JPEG_DECODER
libgstvaapi_source_c += $(libgstvaapi_jpegdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegdec_source_h)
-endif
libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
libgstvaapi_vp8dec_source_h = gstvaapidecoder_vp8.h
-if USE_VP8_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp8dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8dec_source_h)
-endif
libgstvaapi_hevcdec_source_c = gstvaapidecoder_h265.c
libgstvaapi_hevcdec_source_h = gstvaapidecoder_h265.h
-if USE_H265_DECODER
libgstvaapi_source_c += $(libgstvaapi_hevcdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_hevcdec_source_h)
-endif
libgstvaapi_vp9dec_source_c = gstvaapidecoder_vp9.c
libgstvaapi_vp9dec_source_h = gstvaapidecoder_vp9.h
-if USE_VP9_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp9dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp9dec_source_h)
-endif
libgstvaapi_enc_source_c = \
gstvaapicodedbuffer.c \
@@ -182,8 +172,11 @@
gstvaapicodedbufferproxy.c \
gstvaapiencoder.c \
gstvaapiencoder_h264.c \
+ gstvaapiencoder_h265.c \
+ gstvaapiencoder_jpeg.c \
gstvaapiencoder_mpeg2.c \
gstvaapiencoder_objects.c \
+ gstvaapiencoder_vp8.c \
$(NULL)
libgstvaapi_enc_source_h = \
@@ -192,7 +185,10 @@
gstvaapicodedbufferproxy.h \
gstvaapiencoder.h \
gstvaapiencoder_h264.h \
+ gstvaapiencoder_h265.h \
+ gstvaapiencoder_jpeg.h \
gstvaapiencoder_mpeg2.h \
+ gstvaapiencoder_vp8.h \
$(NULL)
libgstvaapi_enc_source_priv_h = \
@@ -209,27 +205,6 @@
libgstvaapi_source_priv_h += $(libgstvaapi_enc_source_priv_h)
endif
-libgstvaapi_jpegenc_source_c = gstvaapiencoder_jpeg.c
-libgstvaapi_jpegenc_source_h = gstvaapiencoder_jpeg.h
-if USE_JPEG_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
-endif
-
-libgstvaapi_vp8enc_source_c = gstvaapiencoder_vp8.c
-libgstvaapi_vp8enc_source_h = gstvaapiencoder_vp8.h
-if USE_VP8_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
-endif
-
-libgstvaapi_h265enc_source_c = gstvaapiencoder_h265.c
-libgstvaapi_h265enc_source_h = gstvaapiencoder_h265.h
-if USE_H265_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
-endif
-
libgstvaapi_vp9enc_source_c = gstvaapiencoder_vp9.c
libgstvaapi_vp9enc_source_h = gstvaapiencoder_vp9.h
if USE_VP9_ENCODER
@@ -339,9 +314,28 @@
ogl_compat.h \
$(NULL)
+BUILT_SOURCES=
+CLEANFILES=
+
+# Generate the necessary files for XDG-shell
+if USE_WAYLAND
+xdg_shell_protocol_spec = $(WAYLAND_PROTOCOLS_DATADIR)/stable/xdg-shell/xdg-shell.xml
+xdg_shell_header = xdg-shell-client-protocol.h
+xdg_shell_source = xdg-shell-client-protocol.c
+
+$(xdg_shell_header): $(xdg_shell_protocol_spec)
+ $(AM_V_GEN) $(WAYLAND_SCANNER) client-header < $< > $@
+$(xdg_shell_source): $(xdg_shell_protocol_spec)
+ $(AM_V_GEN) $(WAYLAND_SCANNER) private-code < $< > $@
+
+BUILT_SOURCES += $(xdg_shell_header) $(xdg_shell_source)
+CLEANFILES += $(BUILT_SOURCES)
+endif
+
libgstvaapi_wayland_source_c = \
gstvaapidisplay_wayland.c \
gstvaapiwindow_wayland.c \
+ $(xdg_shell_source) \
$(NULL)
libgstvaapi_wayland_source_h = \
@@ -352,6 +346,7 @@
libgstvaapi_wayland_source_priv_h = \
gstvaapicompat.h \
gstvaapidisplay_wayland_priv.h \
+ $(xdg_shell_header) \
$(NULL)
libgstvaapi_la_SOURCES = \
@@ -537,12 +532,6 @@
$(libgstvaapi_hevcdec_source_priv_h) \
$(libgstvaapi_vp9dec_source_c) \
$(libgstvaapi_vp9dec_source_h) \
- $(libgstvaapi_jpegenc_source_h) \
- $(libgstvaapi_jpegenc_source_c) \
- $(libgstvaapi_vp8enc_source_h) \
- $(libgstvaapi_vp8enc_source_c) \
- $(libgstvaapi_h265enc_source_h) \
- $(libgstvaapi_h265enc_source_c) \
$(libgstvaapi_vp9enc_source_h) \
$(libgstvaapi_vp9enc_source_c) \
$(libgstvaapi_egl_source_c) \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapibufferproxy.c
^
|
@@ -30,25 +30,18 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_buffer_proxy_ref
-#undef gst_vaapi_buffer_proxy_unref
-#undef gst_vaapi_buffer_proxy_replace
-
guint
from_GstVaapiBufferMemoryType (guint type)
{
guint va_type;
switch (type) {
-#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
break;
case GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
break;
-#endif
default:
va_type = 0;
break;
@@ -62,14 +55,12 @@
guint type;
switch (va_type) {
-#if VA_CHECK_VERSION(0,36,0)
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF;
break;
case VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF;
break;
-#endif
default:
type = 0;
break;
@@ -77,7 +68,6 @@
return type;
}
-#if VA_CHECK_VERSION (0,36,0)
static gboolean
gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
{
@@ -101,7 +91,6 @@
return TRUE;
}
-/* VA_CHECK_VERSION (0,36,0) */
static gboolean
gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
{
@@ -122,7 +111,6 @@
return TRUE;
}
-/* VA_CHECK_VERSION (0,36,0) */
static void
gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
{
@@ -140,7 +128,6 @@
gst_vaapi_object_replace (&proxy->parent, NULL);
}
-/* VA_CHECK_VERSION (0,36,0) */
static inline const GstVaapiMiniObjectClass *
gst_vaapi_buffer_proxy_class (void)
{
@@ -150,13 +137,11 @@
};
return &GstVaapiBufferProxyClass;
}
-#endif
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size,
GDestroyNotify destroy_func, gpointer user_data)
{
-#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (handle != 0, NULL);
@@ -185,19 +170,15 @@
error_unsupported_mem_type:
{
GST_ERROR ("unsupported buffer type (%d)", proxy->type);
- gst_vaapi_buffer_proxy_unref_internal (proxy);
+ gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
-#else
- return NULL;
-#endif
}
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new_from_object (GstVaapiObject * object,
VABufferID buf_id, guint type, GDestroyNotify destroy_func, gpointer data)
{
-#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (object != NULL, NULL);
@@ -225,18 +206,15 @@
error_unsupported_mem_type:
{
GST_ERROR ("unsupported buffer type (%d)", proxy->type);
- gst_vaapi_buffer_proxy_unref_internal (proxy);
+ gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
error_acquire_handle:
{
GST_ERROR ("failed to acquire the underlying VA buffer handle");
- gst_vaapi_buffer_proxy_unref_internal (proxy);
+ gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
-#else
- return NULL;
-#endif
}
/**
@@ -252,7 +230,8 @@
{
g_return_val_if_fail (proxy != NULL, NULL);
- return gst_vaapi_buffer_proxy_ref_internal (proxy);
+ return (GstVaapiBufferProxy *)
+ gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (proxy));
}
/**
@@ -267,7 +246,7 @@
{
g_return_if_fail (proxy != NULL);
- gst_vaapi_buffer_proxy_unref_internal (proxy);
+ gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (proxy));
}
/**
@@ -285,7 +264,8 @@
{
g_return_if_fail (old_proxy_ptr != NULL);
- gst_vaapi_buffer_proxy_replace_internal (old_proxy_ptr, new_proxy);
+ gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) (old_proxy_ptr),
+ GST_VAAPI_MINI_OBJECT (new_proxy));
}
/**
@@ -317,11 +297,7 @@
{
g_return_val_if_fail (proxy != NULL, 0);
-#if VA_CHECK_VERSION (0,36,0)
return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy);
-#else
- return 0;
-#endif
}
/**
@@ -337,11 +313,7 @@
{
g_return_val_if_fail (proxy != NULL, 0);
-#if VA_CHECK_VERSION (0,36,0)
return GST_VAAPI_BUFFER_PROXY_SIZE (proxy);
-#else
- return 0;
-#endif
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapibufferproxy_priv.h
^
|
@@ -68,9 +68,7 @@
gpointer destroy_data;
guint type;
VABufferID va_buf;
-#if VA_CHECK_VERSION (0,36,0)
VABufferInfo va_info;
-#endif
GstMemory *mem;
};
@@ -87,31 +85,6 @@
guint
to_GstVaapiBufferMemoryType (guint va_type);
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-#define gst_vaapi_buffer_proxy_ref_internal(proxy) \
- ((gpointer) gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (proxy)))
-
-#define gst_vaapi_buffer_proxy_unref_internal(proxy) \
- gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (proxy))
-
-#define gst_vaapi_buffer_proxy_replace_internal(old_proxy_ptr, new_proxy) \
- gst_vaapi_mini_object_replace ((GstVaapiMiniObject **)(old_proxy_ptr), \
- GST_VAAPI_MINI_OBJECT (new_proxy))
-
-#undef gst_vaapi_buffer_proxy_ref
-#define gst_vaapi_buffer_proxy_ref(proxy) \
- gst_vaapi_buffer_proxy_ref_internal ((proxy))
-
-#undef gst_vaapi_buffer_proxy_unref
-#define gst_vaapi_buffer_proxy_unref(proxy) \
- gst_vaapi_buffer_proxy_unref_internal ((proxy))
-
-#undef gst_vaapi_buffer_proxy_replace
-#define gst_vaapi_buffer_proxy_replace(old_proxy_ptr, new_proxy) \
- gst_vaapi_buffer_proxy_replace_internal ((old_proxy_ptr), (new_proxy))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_BUFFER_PROXY_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicodec_objects.c
^
|
@@ -23,7 +23,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/vaapi/gstvaapicontext.h>
#include "gstvaapicodec_objects.h"
#include "gstvaapidecoder_priv.h"
@@ -178,7 +177,6 @@
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
-#if USE_JPEG_DECODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiHuffmanTable, gst_vaapi_huffman_table);
void
@@ -210,8 +208,7 @@
return NULL;
return GST_VAAPI_HUFFMAN_TABLE_CAST (object);
}
-#endif
-#if USE_VP8_DECODER
+
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiProbabilityTable,
gst_vaapi_probability_table);
@@ -245,5 +242,3 @@
return NULL;
return GST_VAAPI_PROBABILITY_TABLE_CAST (object);
}
-
-#endif
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicodedbufferproxy.c
^
|
@@ -106,7 +106,7 @@
proxy->destroy_func = NULL;
proxy->user_data_destroy = NULL;
- proxy->pool = gst_vaapi_video_pool_ref (pool);
+ proxy->pool = gst_vaapi_video_pool_ref (GST_VAAPI_VIDEO_POOL (pool));
proxy->buffer = gst_vaapi_video_pool_get_object (proxy->pool);
#if USE_H264_FEI_ENCODER
proxy->mv = NULL;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicompat.h
^
|
@@ -27,16 +27,6 @@
#include <va/va.h>
-/* Compatibility glue with VA-API < 0.31 */
-#if !VA_CHECK_VERSION(0,31,0)
-#undef vaSyncSurface
-#define vaSyncSurface(dpy, s) (vaSyncSurface)((dpy), VA_INVALID_ID, (s))
-#undef vaPutImage
-#define vaPutImage vaPutImage2
-#undef vaAssociateSubpicture
-#define vaAssociateSubpicture vaAssociateSubpicture2
-#endif
-
#if VA_CHECK_VERSION(1,0,0)
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
@@ -45,50 +35,7 @@
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
#endif
-/* Compatibility glue with VA-API 0.34 */
-#if VA_CHECK_VERSION(0,34,0)
-# include <va/va_compat.h>
-#endif
-
-#if VA_CHECK_VERSION(0,36,0)
+#include <va/va_compat.h>
#include <va/va_drmcommon.h>
-#endif
-
-/* VA-API < 0.37 doesn't include sub core APIs in va.h */
-#if !VA_CHECK_VERSION(0,37,0)
-#ifdef HAVE_VA_VA_DEC_HEVC_H
-# include <va/va_dec_hevc.h>
-#endif
-#ifdef HAVE_VA_VA_DEC_JPEG_H
-# include <va/va_dec_jpeg.h>
-#endif
-#ifdef HAVE_VA_VA_DEC_VP8_H
-# include <va/va_dec_vp8.h>
-#endif
-#ifdef HAVE_VA_VA_DEC_VP9_H
-# include <va/va_dec_vp9.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_HEVC_H
-# include <va/va_enc_hevc.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_H264_H
-# include <va/va_enc_h264.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_JPEG_H
-# include <va/va_enc_jpeg.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_MPEG2_H
-# include <va/va_enc_mpeg2.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_VP8_H
-# include <va/va_enc_vp8.h>
-#endif
-#ifdef HAVE_VA_VA_ENC_VP9_H
-# include <va/va_enc_vp9.h>
-#endif
-#ifdef HAVE_VA_VA_VPP_H
-# include <va/va_vpp.h>
-#endif
-#endif
#endif /* GST_VAAPI_COMPAT_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c
^
|
@@ -133,9 +133,13 @@
GstVaapiSurface *surface;
guint i;
+ if (!ensure_formats (context))
+ return FALSE;
+
for (i = context->surfaces->len; i < num_surfaces; i++) {
- surface = gst_vaapi_surface_new (GST_VAAPI_OBJECT_DISPLAY (context),
- cip->chroma_type, cip->width, cip->height);
+ surface =
+ gst_vaapi_surface_new_from_formats (GST_VAAPI_OBJECT_DISPLAY (context),
+ cip->chroma_type, cip->width, cip->height, context->formats);
if (!surface)
return FALSE;
gst_vaapi_surface_set_parent_context (surface, context);
@@ -298,7 +302,6 @@
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
-#if VA_CHECK_VERSION(0,37,0)
if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
attrib->type = VAConfigAttribEncJPEG;
if (!context_get_attribute (context, attrib->type, &value))
@@ -307,7 +310,6 @@
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
-#endif
#if VA_CHECK_VERSION(0,39,1)
if (config->roi_capability) {
VAConfigAttribValEncROI *roi_config;
@@ -316,10 +318,14 @@
if (!context_get_attribute (context, attrib->type, &value))
goto cleanup;
roi_config = (VAConfigAttribValEncROI *) & value;
- if (roi_config->bits.num_roi_regions != config->roi_num_supported ||
- VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0) {
- GST_ERROR ("Mismatched ROI support: number of regions supported: %d"
- " ROI delta QP: %d", roi_config->bits.num_roi_regions,
+ if (roi_config->bits.num_roi_regions != config->roi_num_supported) {
+ GST_ERROR ("Mismatched ROI support: number of regions supported: %d",
+ roi_config->bits.num_roi_regions);
+ goto cleanup;
+ }
+ if (config->rc_mode != GST_VAAPI_RATECONTROL_CQP
+ && VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0) {
+ GST_ERROR ("Mismatched ROI support: ROI delta QP: %d",
VA_ROI_RC_QP_DELTA_SUPPORT (roi_config));
goto cleanup;
}
@@ -527,12 +533,12 @@
if (reset_config)
context_destroy (context);
+ if (reset_config && !(config_create (context) && context_create (context)))
+ return FALSE;
if (reset_surfaces && !context_create_surfaces (context))
return FALSE;
else if (grow_surfaces && !context_ensure_surfaces (context))
return FALSE;
- if (reset_config && !(config_create (context) && context_create (context)))
- return FALSE;
return TRUE;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder.c
^
|
@@ -38,6 +38,16 @@
#define DEBUG 1
#include "gstvaapidebug.h"
+enum
+{
+ PROP_DISPLAY = 1,
+ PROP_CAPS,
+ N_PROPERTIES
+};
+static GParamSpec *g_properties[N_PROPERTIES] = { NULL, };
+
+G_DEFINE_TYPE (GstVaapiDecoder, gst_vaapi_decoder, GST_TYPE_OBJECT);
+
static void drop_frame (GstVaapiDecoder * decoder, GstVideoCodecFrame * frame);
static void
@@ -453,14 +463,10 @@
decoder->codec_state_changed_data);
}
-void
-gst_vaapi_decoder_finalize (GstVaapiDecoder * decoder)
+static void
+gst_vaapi_decoder_finalize (GObject * object)
{
- const GstVaapiDecoderClass *const klass =
- GST_VAAPI_DECODER_GET_CLASS (decoder);
-
- if (klass->destroy)
- klass->destroy (decoder);
+ GstVaapiDecoder *const decoder = GST_VAAPI_DECODER (object);
gst_video_codec_state_unref (decoder->codec_state);
decoder->codec_state = NULL;
@@ -482,16 +488,90 @@
gst_vaapi_display_replace (&decoder->display, NULL);
decoder->va_display = NULL;
+
+ G_OBJECT_CLASS (gst_vaapi_decoder_parent_class)->finalize (object);
}
-static gboolean
-gst_vaapi_decoder_init (GstVaapiDecoder * decoder, GstVaapiDisplay * display,
- GstCaps * caps)
+static void
+gst_vaapi_decoder_set_property (GObject * object, guint property_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstVaapiDecoder *const decoder = GST_VAAPI_DECODER (object);
+
+ switch (property_id) {
+ case PROP_DISPLAY:
+ g_assert (decoder->display == NULL);
+ decoder->display = g_value_dup_object (value);
+ g_assert (decoder->display != NULL);
+ decoder->va_display = GST_VAAPI_DISPLAY_VADISPLAY (decoder->display);
+ break;
+ case PROP_CAPS:{
+ GstCaps *caps = g_value_get_boxed (value);
+ if (!set_caps (decoder, caps)) {
+ GST_WARNING_OBJECT (decoder, "failed to set caps %" GST_PTR_FORMAT,
+ caps);
+ }
+ break;
+ }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
+gst_vaapi_decoder_get_property (GObject * object, guint property_id,
+ GValue * value, GParamSpec * pspec)
+{
+ GstVaapiDecoder *const decoder = GST_VAAPI_DECODER (object);
+
+ switch (property_id) {
+ case PROP_DISPLAY:
+ g_value_set_object (value, decoder->display);
+ break;
+ case PROP_CAPS:
+ g_value_set_boxed (value, get_caps (decoder));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
+gst_vaapi_decoder_class_init (GstVaapiDecoderClass * klass)
+{
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
+
+ object_class->set_property = gst_vaapi_decoder_set_property;
+ object_class->get_property = gst_vaapi_decoder_get_property;
+ object_class->finalize = gst_vaapi_decoder_finalize;
+
+ /**
+ * GstVaapiDecoder:display:
+ *
+ * #GstVaapiDisplay to be used.
+ */
+ g_properties[PROP_DISPLAY] =
+ g_param_spec_object ("display", "Gst VA-API Display",
+ "The VA-API display object to use", GST_TYPE_VAAPI_DISPLAY,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME);
+
+ /**
+ * GstCaps:caps:
+ *
+ * #GstCaps the caps describing the media to process.
+ */
+ g_properties[PROP_CAPS] =
+ g_param_spec_boxed ("caps", "Caps",
+ "The caps describing the media to process", GST_TYPE_CAPS,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME);
+
+ g_object_class_install_properties (object_class, N_PROPERTIES, g_properties);
+}
+
+static void
+gst_vaapi_decoder_init (GstVaapiDecoder * decoder)
{
- const GstVaapiDecoderClass *const klass =
- GST_VAAPI_DECODER_GET_CLASS (decoder);
GstVideoCodecState *codec_state;
- guint sub_size;
parser_state_init (&decoder->parser_state);
@@ -499,83 +579,11 @@
codec_state->ref_count = 1;
gst_video_info_init (&codec_state->info);
- decoder->user_data = NULL;
- decoder->display = gst_vaapi_display_ref (display);
- decoder->va_display = GST_VAAPI_DISPLAY_VADISPLAY (display);
- decoder->context = NULL;
decoder->va_context = VA_INVALID_ID;
- decoder->codec = 0;
decoder->codec_state = codec_state;
- decoder->codec_state_changed_func = NULL;
- decoder->codec_state_changed_data = NULL;
-
decoder->buffers = g_async_queue_new_full ((GDestroyNotify) gst_buffer_unref);
decoder->frames = g_async_queue_new_full ((GDestroyNotify)
gst_video_codec_frame_unref);
-
- if (!set_caps (decoder, caps))
- return FALSE;
-
- sub_size = GST_VAAPI_MINI_OBJECT_CLASS (klass)->size - sizeof (*decoder);
- if (sub_size > 0)
- memset (((guchar *) decoder) + sizeof (*decoder), 0, sub_size);
-
- if (klass->create && !klass->create (decoder))
- return FALSE;
- return TRUE;
-}
-
-GstVaapiDecoder *
-gst_vaapi_decoder_new (const GstVaapiDecoderClass * klass,
- GstVaapiDisplay * display, GstCaps * caps)
-{
- GstVaapiDecoder *decoder;
-
- g_return_val_if_fail (display != NULL, NULL);
- g_return_val_if_fail (GST_IS_CAPS (caps), NULL);
-
- decoder = (GstVaapiDecoder *)
- gst_vaapi_mini_object_new (GST_VAAPI_MINI_OBJECT_CLASS (klass));
- if (!decoder)
- return NULL;
-
- if (!gst_vaapi_decoder_init (decoder, display, caps))
- goto error;
- return decoder;
-
- /* ERRORS */
-error:
- {
- gst_vaapi_decoder_unref (decoder);
- return NULL;
- }
-}
-
-/**
- * gst_vaapi_decoder_ref:
- * @decoder: a #GstVaapiDecoder
- *
- * Atomically increases the reference count of the given @decoder by one.
- *
- * Returns: The same @decoder argument
- */
-GstVaapiDecoder *
-gst_vaapi_decoder_ref (GstVaapiDecoder * decoder)
-{
- return gst_vaapi_object_ref (decoder);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder.h
^
|
@@ -32,8 +32,12 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER \
+ (gst_vaapi_decoder_get_type ())
#define GST_VAAPI_DECODER(obj) \
- ((GstVaapiDecoder *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER, GstVaapiDecoder))
+#define GST_VAAPI_IS_DECODER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER))
typedef struct _GstVaapiDecoder GstVaapiDecoder;
typedef void (*GstVaapiDecoderStateChangedFunc) (GstVaapiDecoder * decoder,
@@ -73,11 +77,8 @@
GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN = -1
} GstVaapiDecoderStatus;
-GstVaapiDecoder *
-gst_vaapi_decoder_ref (GstVaapiDecoder * decoder);
-
-void
-gst_vaapi_decoder_unref (GstVaapiDecoder * decoder);
+GType
+gst_vaapi_decoder_get_type (void) G_GNUC_CONST;
void
gst_vaapi_decoder_replace (GstVaapiDecoder ** old_decoder_ptr,
@@ -141,6 +142,10 @@
gboolean
gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoder, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_DECODER_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
^
|
@@ -26,7 +26,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/base/gstadapter.h>
#include <gst/codecparsers/gsth264parser.h>
#include "gstvaapidecoder_h264.h"
@@ -483,7 +482,6 @@
guint decoder_state;
GstVaapiStreamAlignH264 stream_alignment;
GstVaapiPictureH264 *current_picture;
- GstVaapiPictureH264 *missing_picture;
GstVaapiParserInfoH264 *sps[GST_H264_MAX_SPS_COUNT];
GstVaapiParserInfoH264 *active_sps;
GstVaapiParserInfoH264 *pps[GST_H264_MAX_PPS_COUNT];
@@ -559,6 +557,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderH264, gst_vaapi_decoder_h264,
+ GST_TYPE_VAAPI_DECODER);
+
static gboolean
exec_ref_pic_marking (GstVaapiDecoderH264 * decoder,
GstVaapiPictureH264 * picture);
@@ -943,16 +944,22 @@
if (found_index < 0)
return FALSE;
+ gst_vaapi_picture_ref (found_picture);
+
if (picture && picture->base.poc != found_picture->base.poc)
dpb_output_other_views (decoder, found_picture, found_picture->base.voc);
success = dpb_output (decoder, priv->dpb[found_index]);
+
dpb_evict (decoder, found_picture, found_index);
if (priv->max_views == 1)
- return success;
+ goto done;
if (picture && picture->base.poc != found_picture->base.poc)
dpb_output_other_views (decoder, found_picture, G_MAXUINT32);
+
+done:
+ gst_vaapi_picture_unref (found_picture);
return success;
}
@@ -1248,7 +1255,6 @@
GstVaapiDecoderH264Private *const priv = &decoder->priv;
gst_vaapi_picture_replace (&priv->current_picture, NULL);
- gst_vaapi_picture_replace (&priv->missing_picture, NULL);
gst_vaapi_parser_info_h264_replace (&priv->prev_slice_pi, NULL);
gst_vaapi_parser_info_h264_replace (&priv->prev_pi, NULL);
@@ -1289,14 +1295,11 @@
gst_vaapi_decoder_h264_close (decoder);
priv->is_opened = FALSE;
- g_free (priv->dpb);
- priv->dpb = NULL;
+ g_clear_pointer (&priv->dpb, g_free);
priv->dpb_size_max = priv->dpb_size = 0;
- g_free (priv->prev_ref_frames);
- priv->prev_ref_frames = NULL;
- g_free (priv->prev_frames);
- priv->prev_frames = NULL;
+ g_clear_pointer (&priv->prev_ref_frames, g_free);
+ g_clear_pointer (&priv->prev_frames, g_free);
priv->prev_frames_alloc = 0;
for (i = 0; i < G_N_ELEMENTS (priv->pps); i++)
@@ -1339,10 +1342,8 @@
priv->dpb_size = 0;
- g_free (priv->prev_ref_frames);
- priv->prev_ref_frames = NULL;
- g_free (priv->prev_frames);
- priv->prev_frames = NULL;
+ g_clear_pointer (&priv->prev_ref_frames, g_free);
+ g_clear_pointer (&priv->prev_frames, g_free);
priv->prev_frames_alloc = 0;
gst_vaapi_parser_info_h264_replace (&priv->active_pps, NULL);
gst_vaapi_parser_info_h264_replace (&priv->active_sps, NULL);
@@ -1521,6 +1522,7 @@
num_views = get_num_views (sps);
if (priv->max_views < num_views) {
priv->max_views = num_views;
+ reset_context = TRUE;
GST_DEBUG ("maximum number of views changed to %u", num_views);
}
@@ -2445,7 +2447,7 @@
}
/* H.8.2.1 - Initialization process for inter-view prediction references */
-static void
+static gboolean
init_picture_refs_mvc_1 (GstVaapiDecoderH264 * decoder,
GstVaapiPictureH264 ** ref_list, guint * ref_list_count_ptr, guint num_refs,
const guint16 * view_ids, guint num_view_ids)
@@ -2454,30 +2456,36 @@
n = *ref_list_count_ptr;
for (j = 0; j < num_view_ids && n < num_refs; j++) {
- GstVaapiPictureH264 *const pic =
- find_inter_view_reference (decoder, view_ids[j]);
- if (pic)
- ref_list[n++] = pic;
+ GstVaapiPictureH264 *pic;
+
+ if (!(pic = find_inter_view_reference (decoder, view_ids[j])))
+ return FALSE;
+
+ ref_list[n++] = pic;
}
+
*ref_list_count_ptr = n;
+
+ return TRUE;
}
-static inline void
+static inline gboolean
init_picture_refs_mvc (GstVaapiDecoderH264 * decoder,
GstVaapiPictureH264 * picture, GstH264SliceHdr * slice_hdr, guint list)
{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
const GstH264SPS *const sps = get_sps (decoder);
const GstH264SPSExtMVCView *view;
+ gboolean ret = TRUE;
GST_DEBUG ("initialize reference picture list for inter-view prediction");
if (sps->extension_type != GST_H264_NAL_EXTENSION_MVC)
- return;
+ return TRUE;
view = &sps->extension.mvc.view[picture->base.voc];
#define INVOKE_INIT_PICTURE_REFS_MVC(ref_list, view_list) do { \
- init_picture_refs_mvc_1(decoder, \
+ ret = init_picture_refs_mvc_1(decoder, \
priv->RefPicList##ref_list, \
&priv->RefPicList##ref_list##_count, \
slice_hdr->num_ref_idx_l##ref_list##_active_minus1 + 1, \
@@ -2497,16 +2505,19 @@
INVOKE_INIT_PICTURE_REFS_MVC (1, non_anchor_ref);
}
+ return ret;
+
#undef INVOKE_INIT_PICTURE_REFS_MVC
}
-static void
+static gboolean
init_picture_refs_p_slice (GstVaapiDecoderH264 * decoder,
GstVaapiPictureH264 * picture, GstH264SliceHdr * slice_hdr)
{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
GstVaapiPictureH264 **ref_list;
guint i;
+ gboolean ret = TRUE;
GST_DEBUG ("decode reference picture list for P and SP slices");
@@ -2555,17 +2566,20 @@
if (GST_VAAPI_PICTURE_IS_MVC (picture)) {
/* RefPicList0 */
- init_picture_refs_mvc (decoder, picture, slice_hdr, 0);
+ ret = init_picture_refs_mvc (decoder, picture, slice_hdr, 0);
}
+
+ return ret;
}
-static void
+static gboolean
init_picture_refs_b_slice (GstVaapiDecoderH264 * decoder,
GstVaapiPictureH264 * picture, GstH264SliceHdr * slice_hdr)
{
GstVaapiDecoderH264Private *const priv = &decoder->priv;
GstVaapiPictureH264 **ref_list;
guint i, n;
+ gboolean ret = TRUE;
GST_DEBUG ("decode reference picture list for B slices");
@@ -2706,11 +2720,13 @@
if (GST_VAAPI_PICTURE_IS_MVC (picture)) {
/* RefPicList0 */
- init_picture_refs_mvc (decoder, picture, slice_hdr, 0);
+ ret = init_picture_refs_mvc (decoder, picture, slice_hdr, 0);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.h
^
|
@@ -27,8 +27,12 @@
G_BEGIN_DECLS
-#define GST_VAAPI_DECODER_H264(decoder) \
- ((GstVaapiDecoderH264 *)(decoder))
+#define GST_TYPE_VAAPI_DECODER_H264 \
+ (gst_vaapi_decoder_h264_get_type ())
+#define GST_VAAPI_DECODER_H264(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_H264, GstVaapiDecoderH264))
+#define GST_VAAPI_IS_DECODER_H264(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_H264))
typedef struct _GstVaapiDecoderH264 GstVaapiDecoderH264;
@@ -48,8 +52,11 @@
GST_VAAPI_STREAM_ALIGN_H264_AU
} GstVaapiStreamAlignH264;
+GType
+gst_vaapi_decoder_h264_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_h264_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_h264_new (GstVaapiDisplay *display, GstCaps *caps);
void
gst_vaapi_decoder_h264_set_alignment(GstVaapiDecoderH264 *decoder,
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
^
|
@@ -26,7 +26,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <math.h>
#include <gst/base/gstadapter.h>
#include <gst/codecparsers/gsth265parser.h>
@@ -445,6 +444,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderH265, gst_vaapi_decoder_h265,
+ GST_TYPE_VAAPI_DECODER);
+
#define RSV_VCL_N10 10
#define RSV_VCL_N12 12
#define RSV_VCL_N14 14
@@ -984,8 +986,7 @@
guint i;
gst_vaapi_decoder_h265_close (decoder);
- g_free (priv->dpb);
- priv->dpb = NULL;
+ g_clear_pointer (&priv->dpb, g_free);
priv->dpb_count = priv->dpb_size_max = priv->dpb_size = 0;
for (i = 0; i < G_N_ELEMENTS (priv->pps); i++)
@@ -1015,6 +1016,13 @@
return TRUE;
}
+static GstVaapiDecoderStatus
+gst_vaapi_decoder_h265_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_h265_destroy (base_decoder);
+ gst_vaapi_decoder_h265_create (base_decoder);
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+}
static void
fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr,
@@ -1045,8 +1053,7 @@
GstVaapiProfile profile, profiles[3];
guint i, n_profiles = 0;
- profile =
- gst_vaapi_utils_h265_get_profile (sps->profile_tier_level.profile_idc);
+ profile = gst_vaapi_utils_h265_get_profile (sps);
if (!profile) {
/* HACK: This is a work-around to identify some main profile streams having wrong profile_idc.
* There are some wrongly encoded main profile streams(eg: ENTP_C_LG_3.bin) which doesn't
@@ -2572,6 +2579,9 @@
static inline gint
scan_for_start_code (GstAdapter * adapter, guint ofs, guint size, guint32 * scp)
{
+ if (size == 0)
+ return -1;
+
return (gint) gst_adapter_masked_scan_uint32_peek (adapter,
0xffffff00, 0x00000100, ofs, size, scp);
}
@@ -2981,6 +2991,7 @@
return GST_VAAPI_DECODER_STATUS_SUCCESS;
exit:
+ gst_adapter_flush (adapter, unit->size);
gst_vaapi_parser_info_h265_unref (pi);
return status;
}
@@ -3029,16 +3040,23 @@
}
static void
+gst_vaapi_decoder_h265_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_h265_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_h265_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_h265_class_init (GstVaapiDecoderH265Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderH265);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
- decoder_class->create = gst_vaapi_decoder_h265_create;
- decoder_class->destroy = gst_vaapi_decoder_h265_destroy;
+ object_class->finalize = gst_vaapi_decoder_h265_finalize;
+
+ decoder_class->reset = gst_vaapi_decoder_h265_reset;
decoder_class->parse = gst_vaapi_decoder_h265_parse;
decoder_class->decode = gst_vaapi_decoder_h265_decode;
decoder_class->start_frame = gst_vaapi_decoder_h265_start_frame;
@@ -3047,17 +3065,12 @@
decoder_class->decode_codec_data = gst_vaapi_decoder_h265_decode_codec_data;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_h265_class (void)
+static void
+gst_vaapi_decoder_h265_init (GstVaapiDecoderH265 * decoder)
{
- static GstVaapiDecoderH265Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_h265_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_h265_create (base_decoder);
}
/**
@@ -3090,5 +3103,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_h265_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_h265_class (), display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_H265, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.h
^
|
@@ -28,8 +28,12 @@
G_BEGIN_DECLS
-#define GST_VAAPI_DECODER_H265(decoder) \
- ((GstVaapiDecoderH265 *)(decoder))
+#define GST_TYPE_VAAPI_DECODER_H265 \
+ (gst_vaapi_decoder_h265_get_type ())
+#define GST_VAAPI_DECODER_H265(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_H265, GstVaapiDecoderH265))
+#define GST_VAAPI_IS_DECODER_H265(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_H265))
typedef struct _GstVaapiDecoderH265 GstVaapiDecoderH265;
@@ -49,11 +53,14 @@
GST_VAAPI_STREAM_ALIGN_H265_AU
} GstVaapiStreamAlignH265;
+GType
+gst_vaapi_decoder_h265_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_h265_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_h265_new (GstVaapiDisplay *display, GstCaps *caps);
void
-gst_vaapi_decoder_h265_set_alignment(GstVaapiDecoderH265 *decoder,
+gst_vaapi_decoder_h265_set_alignment (GstVaapiDecoderH265 *decoder,
GstVaapiStreamAlignH265 alignment);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
^
|
@@ -27,7 +27,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/codecparsers/gstjpegparser.h>
#include "gstvaapicompat.h"
#include "gstvaapidecoder_jpeg.h"
@@ -71,6 +70,7 @@
guint decoder_state;
guint is_opened:1;
guint profile_changed:1;
+ guint size_changed:1;
};
/**
@@ -96,6 +96,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderJpeg, gst_vaapi_decoder_jpeg,
+ GST_TYPE_VAAPI_DECODER);
+
static inline void
unit_set_marker_code (GstVaapiDecoderUnit * unit, GstJpegMarker marker)
{
@@ -121,6 +124,7 @@
priv->height = 0;
priv->is_opened = FALSE;
priv->profile_changed = TRUE;
+ priv->size_changed = TRUE;
}
static gboolean
@@ -153,10 +157,19 @@
priv->profile = GST_VAAPI_PROFILE_JPEG_BASELINE;
priv->profile_changed = TRUE;
+ priv->size_changed = TRUE;
return TRUE;
}
static GstVaapiDecoderStatus
+gst_vaapi_decoder_jpeg_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_jpeg_destroy (base_decoder);
+ gst_vaapi_decoder_jpeg_create (base_decoder);
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+}
+
+static GstVaapiDecoderStatus
ensure_context (GstVaapiDecoderJpeg * decoder)
{
GstVaapiDecoderJpegPrivate *const priv = &decoder->priv;
@@ -184,6 +197,12 @@
priv->profile = profiles[i];
}
+ if (priv->size_changed) {
+ GST_DEBUG ("size changed");
+ priv->size_changed = FALSE;
+ reset_context = TRUE;
+ }
+
if (reset_context) {
GstVaapiContextInfo info;
@@ -429,6 +448,10 @@
GST_ERROR ("failed to parse image");
return GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER;
}
+
+ if (priv->height != frame_hdr->height || priv->width != frame_hdr->width)
+ priv->size_changed = TRUE;
+
priv->height = frame_hdr->height;
priv->width = frame_hdr->width;
@@ -845,34 +868,35 @@
}
static void
+gst_vaapi_decoder_jpeg_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_jpeg_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_jpeg_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_jpeg_class_init (GstVaapiDecoderJpegClass * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderJpeg);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_jpeg_finalize;
- decoder_class->create = gst_vaapi_decoder_jpeg_create;
- decoder_class->destroy = gst_vaapi_decoder_jpeg_destroy;
+ decoder_class->reset = gst_vaapi_decoder_jpeg_reset;
decoder_class->parse = gst_vaapi_decoder_jpeg_parse;
decoder_class->decode = gst_vaapi_decoder_jpeg_decode;
decoder_class->start_frame = gst_vaapi_decoder_jpeg_start_frame;
decoder_class->end_frame = gst_vaapi_decoder_jpeg_end_frame;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_jpeg_class (void)
+static void
+gst_vaapi_decoder_jpeg_init (GstVaapiDecoderJpeg * decoder)
{
- static GstVaapiDecoderJpegClass g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_jpeg_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_jpeg_create (base_decoder);
}
/**
@@ -888,5 +912,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_jpeg_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_jpeg_class (), display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_JPEG, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h
^
|
@@ -28,10 +28,20 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_JPEG \
+ (gst_vaapi_decoder_jpeg_get_type ())
+#define GST_VAAPI_DECODER_JPEG(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_JPEG, GstVaapiDecoderJpeg))
+#define GST_VAAPI_IS_DECODER_JPEG(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_JPEG))
+
typedef struct _GstVaapiDecoderJpeg GstVaapiDecoderJpeg;
+GType
+gst_vaapi_decoder_jpeg_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_jpeg_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_jpeg_new (GstVaapiDisplay *display, GstCaps *caps);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
^
|
@@ -26,7 +26,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/base/gstbitreader.h>
#include <gst/codecparsers/gstmpegvideoparser.h>
#include "gstvaapidecoder_mpeg2.h"
@@ -296,6 +295,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderMpeg2, gst_vaapi_decoder_mpeg2,
+ GST_TYPE_VAAPI_DECODER);
+
static void
gst_vaapi_decoder_mpeg2_close (GstVaapiDecoderMpeg2 * decoder)
{
@@ -358,6 +360,14 @@
return TRUE;
}
+static GstVaapiDecoderStatus
+gst_vaapi_decoder_mpeg2_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_mpeg2_destroy (base_decoder);
+ gst_vaapi_decoder_mpeg2_create (base_decoder);
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+}
+
static inline void
copy_quant_matrix (guint8 dst[64], const guint8 src[64])
{
@@ -1565,17 +1575,23 @@
}
static void
+gst_vaapi_decoder_mpeg2_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_mpeg2_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_mpeg2_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_mpeg2_class_init (GstVaapiDecoderMpeg2Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderMpeg2);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_mpeg2_finalize;
- decoder_class->create = gst_vaapi_decoder_mpeg2_create;
- decoder_class->destroy = gst_vaapi_decoder_mpeg2_destroy;
+ decoder_class->reset = gst_vaapi_decoder_mpeg2_reset;
decoder_class->parse = gst_vaapi_decoder_mpeg2_parse;
decoder_class->decode = gst_vaapi_decoder_mpeg2_decode;
decoder_class->start_frame = gst_vaapi_decoder_mpeg2_start_frame;
@@ -1583,17 +1599,12 @@
decoder_class->flush = gst_vaapi_decoder_mpeg2_flush;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_mpeg2_class (void)
+static void
+gst_vaapi_decoder_mpeg2_init (GstVaapiDecoderMpeg2 * decoder)
{
- static GstVaapiDecoderMpeg2Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_mpeg2_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_mpeg2_create (base_decoder);
}
/**
@@ -1609,6 +1620,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_mpeg2_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_mpeg2_class (),
- display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_MPEG2, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h
^
|
@@ -28,10 +28,20 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_MPEG2 \
+ (gst_vaapi_decoder_mpeg2_get_type ())
+#define GST_VAAPI_DECODER_MPEG2(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_MPEG2, GstVaapiDecoderMpeg2))
+#define GST_VAAPI_IS_DECODER_MPEG2(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_MPEG2))
+
typedef struct _GstVaapiDecoderMpeg2 GstVaapiDecoderMpeg2;
+GType
+gst_vaapi_decoder_mpeg2_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_mpeg2_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_mpeg2_new (GstVaapiDisplay *display, GstCaps *caps);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c
^
|
@@ -26,7 +26,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/base/gstbitreader.h>
#include <gst/codecparsers/gstmpeg4parser.h>
#include "gstvaapidecoder_mpeg4.h"
@@ -119,6 +118,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderMpeg4, gst_vaapi_decoder_mpeg4,
+ GST_TYPE_VAAPI_DECODER);
+
static void
gst_vaapi_decoder_mpeg4_close (GstVaapiDecoderMpeg4 * decoder)
{
@@ -180,6 +182,14 @@
return TRUE;
}
+static GstVaapiDecoderStatus
+gst_vaapi_decoder_mpeg4_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_mpeg4_destroy (base_decoder);
+ gst_vaapi_decoder_mpeg4_create (base_decoder);
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+}
+
static inline void
copy_quant_matrix (guint8 dst[64], const guint8 src[64])
{
@@ -1158,34 +1168,34 @@
}
static void
+gst_vaapi_decoder_mpeg4_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_mpeg4_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_mpeg4_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_mpeg4_class_init (GstVaapiDecoderMpeg4Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderMpeg4);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_mpeg4_finalize;
- decoder_class->create = gst_vaapi_decoder_mpeg4_create;
- decoder_class->destroy = gst_vaapi_decoder_mpeg4_destroy;
+ decoder_class->reset = gst_vaapi_decoder_mpeg4_reset;
decoder_class->parse = gst_vaapi_decoder_mpeg4_parse;
decoder_class->decode = gst_vaapi_decoder_mpeg4_decode;
-
decoder_class->decode_codec_data = gst_vaapi_decoder_mpeg4_decode_codec_data;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_mpeg4_class (void)
+static void
+gst_vaapi_decoder_mpeg4_init (GstVaapiDecoderMpeg4 * decoder)
{
- static GstVaapiDecoderMpeg4Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_mpeg4_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_mpeg4_create (base_decoder);
}
/**
@@ -1201,6 +1211,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_mpeg4_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_mpeg4_class (),
- display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_MPEG4, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h
^
|
@@ -24,14 +24,23 @@
#define GST_VAAPI_DECODER_MPEG4_H
#include <gst/vaapi/gstvaapidecoder.h>
-#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_MPEG4 \
+ (gst_vaapi_decoder_mpeg4_get_type ())
+#define GST_VAAPI_DECODER_MPEG4(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_MPEG4, GstVaapiDecoderMpeg4))
+#define GST_VAAPI_IS_DECODER_MPEG4(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_MPEG4))
+
typedef struct _GstVaapiDecoderMpeg4 GstVaapiDecoderMpeg4;
+GType
+gst_vaapi_decoder_mpeg4_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_mpeg4_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_mpeg4_new (GstVaapiDisplay *display, GstCaps *caps);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
^
|
@@ -23,7 +23,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/vaapi/gstvaapicontext.h>
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
@@ -304,12 +303,17 @@
status = vaRenderPicture (va_display, va_context, va_buffers, 2);
if (!vaapi_check_status (status, "vaRenderPicture()"))
return FALSE;
+ }
+
+ status = vaEndPicture (va_display, va_context);
+
+ for (i = 0; i < picture->slices->len; i++) {
+ GstVaapiSlice *const slice = g_ptr_array_index (picture->slices, i);
vaapi_destroy_buffer (va_display, &slice->param_id);
vaapi_destroy_buffer (va_display, &slice->data_id);
}
- status = vaEndPicture (va_display, va_context);
if (!vaapi_check_status (status, "vaEndPicture()"))
return FALSE;
return TRUE;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_priv.h
^
|
@@ -25,11 +25,10 @@
#ifndef GST_VAAPI_DECODER_PRIV_H
#define GST_VAAPI_DECODER_PRIV_H
-#include <glib.h>
+#include "sysdeps.h"
#include <gst/vaapi/gstvaapidecoder.h>
#include <gst/vaapi/gstvaapidecoder_unit.h>
#include <gst/vaapi/gstvaapicontext.h>
-#include "gstvaapiminiobject.h"
G_BEGIN_DECLS
@@ -37,16 +36,15 @@
((GstVaapiDecoder *)(decoder))
#define GST_VAAPI_DECODER_CLASS(klass) \
- ((GstVaapiDecoderClass *)(klass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_VAAPI_DECODER, GstVaapiDecoderClass))
#define GST_VAAPI_IS_DECODER_CLASS(klass) \
- ((klass) != NULL))
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VAAPI_DECODER))
#define GST_VAAPI_DECODER_GET_CLASS(obj) \
- GST_VAAPI_DECODER_CLASS(GST_VAAPI_MINI_OBJECT_GET_CLASS(obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_DECODER, GstVaapiDecoderClass))
typedef struct _GstVaapiDecoderClass GstVaapiDecoderClass;
-struct _GstVaapiDecoderUnit;
/**
* GST_VAAPI_PARSER_STATE:
@@ -188,7 +186,7 @@
struct _GstVaapiDecoder
{
/*< private >*/
- GstVaapiMiniObject parent_instance;
+ GstObject parent_instance;
gpointer user_data;
GstVaapiDisplay *display;
@@ -212,10 +210,8 @@
struct _GstVaapiDecoderClass
{
/*< private >*/
- GstVaapiMiniObjectClass parent_class;
+ GstObjectClass parent_class;
- gboolean (*create) (GstVaapiDecoder * decoder);
- void (*destroy) (GstVaapiDecoder * decoder);
GstVaapiDecoderStatus (*parse) (GstVaapiDecoder * decoder,
GstAdapter * adapter, gboolean at_eos,
struct _GstVaapiDecoderUnit * unit);
@@ -231,15 +227,6 @@
};
G_GNUC_INTERNAL
-GstVaapiDecoder *
-gst_vaapi_decoder_new (const GstVaapiDecoderClass * klass,
- GstVaapiDisplay * display, GstCaps * caps);
-
-G_GNUC_INTERNAL
-void
-gst_vaapi_decoder_finalize (GstVaapiDecoder * decoder);
-
-G_GNUC_INTERNAL
void
gst_vaapi_decoder_set_picture_size (GstVaapiDecoder * decoder,
guint width, guint height);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
^
|
@@ -26,7 +26,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/codecparsers/gstvc1parser.h>
#include "gstvaapidecoder_vc1.h"
#include "gstvaapidecoder_objects.h"
@@ -98,6 +97,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderVC1, gst_vaapi_decoder_vc1,
+ GST_TYPE_VAAPI_DECODER);
+
static GstVaapiDecoderStatus
get_status (GstVC1ParserResult result)
{
@@ -167,8 +169,7 @@
gst_vaapi_decoder_vc1_close (decoder);
if (priv->rbdu_buffer) {
- g_free (priv->rbdu_buffer);
- priv->rbdu_buffer = NULL;
+ g_clear_pointer (&priv->rbdu_buffer, g_free);
priv->rbdu_buffer_size = 0;
}
}
@@ -183,13 +184,21 @@
priv->size_changed = priv->profile_changed =
priv->closed_entry = priv->broken_link = FALSE;
- priv->profile = (GstVaapiProfile) 0;
+ priv->profile = GST_VAAPI_PROFILE_UNKNOWN;
priv->rndctrl = 0;
priv->width = priv->height = 0;
return TRUE;
}
static GstVaapiDecoderStatus
+gst_vaapi_decoder_vc1_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_vc1_destroy (base_decoder);
+ gst_vaapi_decoder_vc1_create (base_decoder);
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+}
+
+static GstVaapiDecoderStatus
ensure_context (GstVaapiDecoderVC1 * decoder)
{
GstVaapiDecoderVC1Private *const priv = &decoder->priv;
@@ -1426,17 +1435,23 @@
}
static void
+gst_vaapi_decoder_vc1_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_vc1_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_vc1_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_vc1_class_init (GstVaapiDecoderVC1Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderVC1);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_vc1_finalize;
- decoder_class->create = gst_vaapi_decoder_vc1_create;
- decoder_class->destroy = gst_vaapi_decoder_vc1_destroy;
+ decoder_class->reset = gst_vaapi_decoder_vc1_reset;
decoder_class->parse = gst_vaapi_decoder_vc1_parse;
decoder_class->decode = gst_vaapi_decoder_vc1_decode;
decoder_class->start_frame = gst_vaapi_decoder_vc1_start_frame;
@@ -1446,17 +1461,12 @@
decoder_class->decode_codec_data = gst_vaapi_decoder_vc1_decode_codec_data;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_vc1_class (void)
+static void
+gst_vaapi_decoder_vc1_init (GstVaapiDecoderVC1 * decoder)
{
- static GstVaapiDecoderVC1Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_vc1_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_vc1_create (base_decoder);
}
/**
@@ -1472,5 +1482,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_vc1_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_vc1_class (), display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_VC1, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vc1.h
^
|
@@ -24,14 +24,23 @@
#define GST_VAAPI_DECODER_VC1_H
#include <gst/vaapi/gstvaapidecoder.h>
-#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_VC1 \
+ (gst_vaapi_decoder_vc1_get_type ())
+#define GST_VAAPI_DECODER_VC1(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_VC1, GstVaapiDecoderVC1))
+#define GST_VAAPI_IS_DECODER_VC1(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_VC1))
+
typedef struct _GstVaapiDecoderVC1 GstVaapiDecoderVC1;
+GType
+gst_vaapi_decoder_vc1_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
-gst_vaapi_decoder_vc1_new(GstVaapiDisplay *display, GstCaps *caps);
+gst_vaapi_decoder_vc1_new (GstVaapiDisplay *display, GstCaps *caps);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vp8.c
^
|
@@ -83,6 +83,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderVp8, gst_vaapi_decoder_vp8,
+ GST_TYPE_VAAPI_DECODER);
+
static GstVaapiDecoderStatus
get_status (GstVp8ParserResult result)
{
@@ -145,6 +148,15 @@
}
static GstVaapiDecoderStatus
+gst_vaapi_decoder_vp8_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_vp8_destroy (base_decoder);
+ if (gst_vaapi_decoder_vp8_create (base_decoder))
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+ return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
+}
+
+static GstVaapiDecoderStatus
ensure_context (GstVaapiDecoderVp8 * decoder)
{
GstVaapiDecoderVp8Private *const priv = &decoder->priv;
@@ -616,17 +628,23 @@
}
static void
+gst_vaapi_decoder_vp8_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_vp8_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_vp8_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_vp8_class_init (GstVaapiDecoderVp8Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderVp8);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_vp8_finalize;
- decoder_class->create = gst_vaapi_decoder_vp8_create;
- decoder_class->destroy = gst_vaapi_decoder_vp8_destroy;
+ decoder_class->reset = gst_vaapi_decoder_vp8_reset;
decoder_class->parse = gst_vaapi_decoder_vp8_parse;
decoder_class->decode = gst_vaapi_decoder_vp8_decode;
decoder_class->start_frame = gst_vaapi_decoder_vp8_start_frame;
@@ -634,17 +652,12 @@
decoder_class->flush = gst_vaapi_decoder_vp8_flush;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_vp8_class (void)
+static void
+gst_vaapi_decoder_vp8_init (GstVaapiDecoderVp8 * decoder)
{
- static GstVaapiDecoderVp8Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_vp8_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_vp8_create (base_decoder);
}
/**
@@ -660,5 +673,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_vp8_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_vp8_class (), display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_VP8, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vp8.h
^
|
@@ -28,8 +28,18 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_VP8 \
+ (gst_vaapi_decoder_vp8_get_type ())
+#define GST_VAAPI_DECODER_VP8(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_VP8, GstVaapiDecoderVp8))
+#define GST_VAAPI_IS_DECODER_VP8(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_VP8))
+
typedef struct _GstVaapiDecoderVp8 GstVaapiDecoderVp8;
+GType
+gst_vaapi_decoder_vp8_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
gst_vaapi_decoder_vp8_new (GstVaapiDisplay * display, GstCaps * caps);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
^
|
@@ -87,6 +87,9 @@
GstVaapiDecoderClass parent_class;
};
+G_DEFINE_TYPE (GstVaapiDecoderVp9, gst_vaapi_decoder_vp9,
+ GST_TYPE_VAAPI_DECODER);
+
static GstVaapiDecoderStatus
get_status (GstVp9ParserResult result)
{
@@ -115,8 +118,7 @@
for (i = 0; i < GST_VP9_REF_FRAMES; i++)
gst_vaapi_picture_replace (&priv->ref_frames[i], NULL);
- if (priv->parser)
- gst_vp9_parser_free (priv->parser);
+ g_clear_pointer (&priv->parser, gst_vp9_parser_free);
}
static gboolean
@@ -150,6 +152,15 @@
return TRUE;
}
+static GstVaapiDecoderStatus
+gst_vaapi_decoder_vp9_reset (GstVaapiDecoder * base_decoder)
+{
+ gst_vaapi_decoder_vp9_destroy (base_decoder);
+ if (gst_vaapi_decoder_vp9_create (base_decoder))
+ return GST_VAAPI_DECODER_STATUS_SUCCESS;
+ return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
+}
+
/* Returns GstVaapiProfile from VP9 frame_hdr profile value */
static GstVaapiProfile
get_profile (guint profile_idc)
@@ -170,7 +181,7 @@
profile = GST_VAAPI_PROFILE_VP9_3;
break;
default:
- g_debug ("unsupported profile_idc value");
+ GST_DEBUG ("unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;
break;
}
@@ -208,7 +219,16 @@
info.profile = priv->profile;
info.entrypoint = entrypoint;
- info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
+ if (priv->parser->bit_depth == GST_VP9_BIT_DEPTH_8) {
+ info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
+ } else if (priv->parser->bit_depth == GST_VP9_BIT_DEPTH_10) {
+ info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
+ } else {
+ GST_WARNING ("VP9 with depth %d, bigger than 10BPP not supported now",
+ priv->parser->bit_depth);
+ return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT;
+ }
+
info.width = priv->width;
info.height = priv->height;
info.ref_frames = 8;
@@ -730,17 +750,23 @@
}
static void
+gst_vaapi_decoder_vp9_finalize (GObject * object)
+{
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (object);
+
+ gst_vaapi_decoder_vp9_destroy (base_decoder);
+ G_OBJECT_CLASS (gst_vaapi_decoder_vp9_parent_class)->finalize (object);
+}
+
+static void
gst_vaapi_decoder_vp9_class_init (GstVaapiDecoderVp9Class * klass)
{
- GstVaapiMiniObjectClass *const object_class =
- GST_VAAPI_MINI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);
- object_class->size = sizeof (GstVaapiDecoderVp9);
- object_class->finalize = (GDestroyNotify) gst_vaapi_decoder_finalize;
+ object_class->finalize = gst_vaapi_decoder_vp9_finalize;
- decoder_class->create = gst_vaapi_decoder_vp9_create;
- decoder_class->destroy = gst_vaapi_decoder_vp9_destroy;
+ decoder_class->reset = gst_vaapi_decoder_vp9_reset;
decoder_class->parse = gst_vaapi_decoder_vp9_parse;
decoder_class->decode = gst_vaapi_decoder_vp9_decode;
decoder_class->start_frame = gst_vaapi_decoder_vp9_start_frame;
@@ -748,17 +774,12 @@
decoder_class->flush = gst_vaapi_decoder_vp9_flush;
}
-static inline const GstVaapiDecoderClass *
-gst_vaapi_decoder_vp9_class (void)
+static void
+gst_vaapi_decoder_vp9_init (GstVaapiDecoderVp9 * decoder)
{
- static GstVaapiDecoderVp9Class g_class;
- static gsize g_class_init = FALSE;
+ GstVaapiDecoder *const base_decoder = GST_VAAPI_DECODER (decoder);
- if (g_once_init_enter (&g_class_init)) {
- gst_vaapi_decoder_vp9_class_init (&g_class);
- g_once_init_leave (&g_class_init, TRUE);
- }
- return GST_VAAPI_DECODER_CLASS (&g_class);
+ gst_vaapi_decoder_vp9_create (base_decoder);
}
/**
@@ -774,5 +795,6 @@
GstVaapiDecoder *
gst_vaapi_decoder_vp9_new (GstVaapiDisplay * display, GstCaps * caps)
{
- return gst_vaapi_decoder_new (gst_vaapi_decoder_vp9_class (), display, caps);
+ return g_object_new (GST_TYPE_VAAPI_DECODER_VP9, "display", display,
+ "caps", caps, NULL);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_vp9.h
^
|
@@ -27,8 +27,18 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_DECODER_VP9 \
+ (gst_vaapi_decoder_vp9_get_type ())
+#define GST_VAAPI_DECODER_VP9(decoder) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_VP9, GstVaapiDecoderVp9))
+#define GST_VAAPI_IS_DECODER_VP9(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_VP9))
+
typedef struct _GstVaapiDecoderVp9 GstVaapiDecoderVp9;
+GType
+gst_vaapi_decoder_vp9_get_type (void) G_GNUC_CONST;
+
GstVaapiDecoder *
gst_vaapi_decoder_vp9_new (GstVaapiDisplay * display, GstCaps * caps);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay.c
^
|
@@ -28,7 +28,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapiutils.h"
#include "gstvaapivalue.h"
#include "gstvaapidisplay.h"
@@ -52,11 +51,6 @@
G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplay, gst_vaapi_display, GST_TYPE_OBJECT,
_do_init);
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_display_ref
-#undef gst_vaapi_display_unref
-#undef gst_vaapi_display_replace
-
typedef struct _GstVaapiConfig GstVaapiConfig;
struct _GstVaapiConfig
{
@@ -469,8 +463,12 @@
VAStatus status;
gboolean success = FALSE;
- if (priv->has_profiles)
+ GST_VAAPI_DISPLAY_LOCK (display);
+
+ if (priv->has_profiles) {
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return TRUE;
+ }
priv->decoders = g_array_new (FALSE, FALSE, sizeof (GstVaapiConfig));
if (!priv->decoders)
@@ -538,7 +536,6 @@
g_array_sort (priv->encoders, compare_profiles);
/* Video processing API */
-#if USE_VA_VPP
status = vaQueryConfigEntrypoints (priv->display, VAProfileNone,
entrypoints, &num_entrypoints);
if (vaapi_check_status (status, "vaQueryEntrypoints() [VAProfileNone]")) {
@@ -547,12 +544,12 @@
priv->has_vpp = TRUE;
}
}
-#endif
success = TRUE;
cleanup:
g_free (profiles);
g_free (entrypoints);
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return success;
}
@@ -654,8 +651,11 @@
gint i, n;
gboolean success = FALSE;
- if (priv->image_formats)
+ GST_VAAPI_DISPLAY_LOCK (display);
+ if (priv->image_formats) {
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return TRUE;
+ }
priv->image_formats = g_array_new (FALSE, FALSE, sizeof (GstVaapiFormatInfo));
if (!priv->image_formats)
@@ -681,6 +681,7 @@
cleanup:
g_free (formats);
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return success;
}
@@ -695,8 +696,11 @@
guint i, n;
gboolean success = FALSE;
- if (priv->subpicture_formats)
+ GST_VAAPI_DISPLAY_LOCK (display);
+ if (priv->subpicture_formats) {
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return TRUE;
+ }
priv->subpicture_formats =
g_array_new (FALSE, FALSE, sizeof (GstVaapiFormatInfo));
@@ -730,6 +734,7 @@
cleanup:
g_free (formats);
g_free (flags);
+ GST_VAAPI_DISPLAY_UNLOCK (display);
return success;
}
@@ -832,7 +837,8 @@
}
if (priv->display) {
- vaTerminate (priv->display);
+ if (!priv->parent)
+ vaTerminate (priv->display);
priv->display = NULL;
}
@@ -842,15 +848,14 @@
klass->close_display (display);
}
- g_free (priv->display_name);
- priv->display_name = NULL;
+ g_clear_pointer (&priv->display_name, g_free);
+ g_clear_pointer (&priv->vendor_string, g_free);
- g_free (priv->vendor_string);
- priv->vendor_string = NULL;
+ gst_vaapi_display_replace (&priv->parent, NULL);
}
static gboolean
-gst_vaapi_display_create_unlocked (GstVaapiDisplay * display,
+gst_vaapi_display_create (GstVaapiDisplay * display,
GstVaapiDisplayInitType init_type, gpointer data)
{
GstVaapiDisplayPrivate *const priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display);
@@ -893,8 +898,10 @@
if (!priv->display)
return FALSE;
- if (!vaapi_initialize (priv->display))
- return FALSE;
+ if (!priv->parent) {
+ if (!vaapi_initialize (priv->display))
+ return FALSE;
+ }
GST_INFO_OBJECT (display, "new display addr=%p", display);
g_free (priv->display_name);
@@ -902,18 +909,13 @@
return TRUE;
}
-static gboolean
-gst_vaapi_display_create (GstVaapiDisplay * display,
- GstVaapiDisplayInitType init_type, gpointer init_value)
-{
- return gst_vaapi_display_create_unlocked (display, init_type, init_value);
-}
-
static void
gst_vaapi_display_lock_default (GstVaapiDisplay * display)
{
GstVaapiDisplayPrivate *priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display);
+ if (priv->parent)
+ priv = GST_VAAPI_DISPLAY_GET_PRIVATE (priv->parent);
g_rec_mutex_lock (&priv->mutex);
}
@@ -922,6 +924,8 @@
{
GstVaapiDisplayPrivate *priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display);
+ if (priv->parent)
+ priv = GST_VAAPI_DISPLAY_GET_PRIVATE (priv->parent);
g_rec_mutex_unlock (&priv->mutex);
}
@@ -976,7 +980,7 @@
}
static void
-_gst_vaapi_display_set_property (GObject * object, guint property_id,
+gst_vaapi_display_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GstVaapiDisplay *display = GST_VAAPI_DISPLAY (object);
@@ -1036,7 +1040,7 @@
}
static void
-_gst_vaapi_display_get_property (GObject * object, guint property_id,
+gst_vaapi_display_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GstVaapiDisplay *display = GST_VAAPI_DISPLAY (object);
@@ -1072,8 +1076,8 @@
GObjectClass *const object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gst_vaapi_display_finalize;
- object_class->set_property = _gst_vaapi_display_set_property;
- object_class->get_property = _gst_vaapi_display_get_property;
+ object_class->set_property = gst_vaapi_display_set_property;
+ object_class->get_property = gst_vaapi_display_get_property;
klass->lock = gst_vaapi_display_lock_default;
klass->unlock = gst_vaapi_display_unlock_default;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay.h
^
|
@@ -151,12 +151,6 @@
GstVaapiDisplay *
gst_vaapi_display_new_with_display (VADisplay va_display);
-GstVaapiDisplay *
-gst_vaapi_display_ref (GstVaapiDisplay * display);
-
-void
-gst_vaapi_display_unref (GstVaapiDisplay * display);
-
void
gst_vaapi_display_replace (GstVaapiDisplay ** old_display_ptr,
GstVaapiDisplay * new_display);
@@ -234,14 +228,6 @@
gst_vaapi_display_has_property (GstVaapiDisplay * display, const gchar * name);
gboolean
-gst_vaapi_display_get_property (GstVaapiDisplay * display, const gchar * name,
- GValue * out_value);
-
-gboolean
-gst_vaapi_display_set_property (GstVaapiDisplay * display, const gchar * name,
- const GValue * value);
-
-gboolean
gst_vaapi_display_get_render_mode (GstVaapiDisplay * display,
GstVaapiRenderMode * pmode);
@@ -266,7 +252,7 @@
gst_vaapi_display_reset_texture_map (GstVaapiDisplay * display);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplay, gst_vaapi_display_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDisplay, gst_object_unref)
#endif
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
^
|
@@ -27,7 +27,6 @@
#define _GNU_SOURCE
#include "sysdeps.h"
-#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <libudev.h>
@@ -42,11 +41,8 @@
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayDRM);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayDRM, gst_vaapi_display_drm,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayDRM, gst_vaapi_display_drm,
+ GST_TYPE_VAAPI_DISPLAY);
typedef enum
{
@@ -56,6 +52,7 @@
static DRMDeviceType g_drm_device_type;
static GMutex g_drm_device_type_lock;
+static const gchar *allowed_subsystems[] = { "pci", "platform", NULL };
static gboolean
supports_vaapi (int fd)
@@ -83,6 +80,7 @@
struct udev_device *device, *parent;
struct udev_enumerate *e = NULL;
struct udev_list_entry *l;
+ gint i;
int fd;
if (!priv->device_path_default) {
@@ -111,7 +109,13 @@
syspath = udev_list_entry_get_name (l);
device = udev_device_new_from_syspath (udev, syspath);
parent = udev_device_get_parent (device);
- if (strcmp (udev_device_get_subsystem (parent), "pci") != 0) {
+
+ for (i = 0; allowed_subsystems[i] != NULL; i++)
+ if (strcmp (udev_device_get_subsystem (parent),
+ allowed_subsystems[i]) == 0)
+ break;
+
+ if (allowed_subsystems[i] == NULL) {
udev_device_unref (device);
continue;
}
@@ -185,6 +189,7 @@
struct udev_enumerate *e = NULL;
struct udev_list_entry *l;
gboolean success = FALSE;
+ gint i;
g_free (priv->device_path);
priv->device_path = NULL;
@@ -195,10 +200,18 @@
busid = drmGetBusid (drm_device);
if (!busid)
goto end;
- if (strncmp (busid, "pci:", 4) != 0)
+
+ for (i = 0; allowed_subsystems[i] != NULL; i++) {
+ busid_length = strlen (allowed_subsystems[i]);
+
+ if (strncmp (busid, allowed_subsystems[i], busid_length) == 0) {
+ busid += busid_length + 1;
+ busid_length = strlen (busid);
+ }
+ }
+
+ if (allowed_subsystems[i] == NULL)
goto end;
- busid += 4;
- busid_length = strlen (busid);
udev = udev_new ();
if (!udev)
@@ -287,15 +300,8 @@
priv->drm_device = -1;
}
- if (priv->device_path) {
- g_free (priv->device_path);
- priv->device_path = NULL;
- }
-
- if (priv->device_path_default) {
- g_free (priv->device_path_default);
- priv->device_path_default = NULL;
- }
+ g_clear_pointer (&priv->device_path, g_free);
+ g_clear_pointer (&priv->device_path_default, g_free);
}
static gboolean
@@ -378,8 +384,8 @@
for (i = 0; i < num_types; i++) {
g_drm_device_type = types[i];
- display =
- gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_DRM, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_DRM, NULL);
+ display = gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, (gpointer) device_path);
if (display || device_path)
break;
@@ -402,9 +408,12 @@
GstVaapiDisplay *
gst_vaapi_display_drm_new_with_device (gint device)
{
+ GstVaapiDisplay *display;
+
g_return_val_if_fail (device >= 0, NULL);
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_DRM, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_DRM, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, GINT_TO_POINTER (device));
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_egl.c
^
|
@@ -50,6 +50,7 @@
gpointer display;
guint display_type;
guint gles_version;
+ gpointer gl_display;
} InitParams;
static gboolean
@@ -97,27 +98,37 @@
gst_vaapi_display_egl_bind_display (GstVaapiDisplay * base_display,
gpointer native_params)
{
- GstVaapiDisplay *native_display = NULL;
+ GstVaapiDisplay *native_vaapi_display;
GstVaapiDisplayEGL *display = GST_VAAPI_DISPLAY_EGL (base_display);
EglDisplay *egl_display;
+ EGLDisplay *native_egl_display;
guint gl_platform = EGL_PLATFORM_UNKNOWN;
const InitParams *params = (InitParams *) native_params;
+ GstVaapiDisplayPrivate *const priv = GST_VAAPI_DISPLAY_GET_PRIVATE (display);
- if (params->display) {
- native_display = params->display;
- } else {
+ native_vaapi_display = params->display;
+ native_egl_display = params->gl_display;
+
+ if (!native_vaapi_display) {
#if USE_X11
- native_display = gst_vaapi_display_x11_new (NULL);
+ if (params->display_type == GST_VAAPI_DISPLAY_TYPE_ANY
+ || params->display_type == GST_VAAPI_DISPLAY_TYPE_X11
+ || params->display_type == GST_VAAPI_DISPLAY_TYPE_EGL)
+ native_vaapi_display = gst_vaapi_display_x11_new (NULL);
#endif
#if USE_WAYLAND
- if (!native_display)
- native_display = gst_vaapi_display_wayland_new (NULL);
+ if (!native_vaapi_display)
+ native_vaapi_display = gst_vaapi_display_wayland_new (NULL);
#endif
+ } else {
+ /* thus it could be assigned to parent */
+ gst_object_ref (native_vaapi_display);
}
- if (!native_display)
+ if (!native_vaapi_display)
return FALSE;
- gst_vaapi_display_replace (&display->display, native_display);
+ gst_vaapi_display_replace (&display->display, native_vaapi_display);
+ priv->parent = native_vaapi_display;
switch (GST_VAAPI_DISPLAY_GET_CLASS_TYPE (display->display)) {
case GST_VAAPI_DISPLAY_TYPE_X11:
@@ -130,8 +141,12 @@
break;
}
- egl_display = egl_display_new (GST_VAAPI_DISPLAY_NATIVE (display->display),
- gl_platform);
+ if (native_egl_display) {
+ egl_display = egl_display_new_wrapped (native_egl_display);
+ } else {
+ egl_display = egl_display_new (GST_VAAPI_DISPLAY_NATIVE (display->display),
+ gl_platform);
+ }
if (!egl_display)
return FALSE;
@@ -351,17 +366,18 @@
GstVaapiDisplay *
gst_vaapi_display_egl_new (GstVaapiDisplay * display, guint gles_version)
{
- InitParams params;
+ GstVaapiDisplay *wrapper_display;
+ InitParams params = {
+ .gles_version = gles_version,
+ };
if (display) {
params.display = display;
params.display_type = GST_VAAPI_DISPLAY_VADISPLAY_TYPE (display);
- } else {
- params.display = NULL;
- params.display_type = GST_VAAPI_DISPLAY_TYPE_ANY;
}
- params.gles_version = gles_version;
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_EGL, NULL),
+
+ wrapper_display = g_object_new (GST_TYPE_VAAPI_DISPLAY_EGL, NULL);
+ return gst_vaapi_display_config (wrapper_display,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, ¶ms);
}
@@ -385,14 +401,17 @@
gst_vaapi_display_egl_new_with_native_display (gpointer native_display,
GstVaapiDisplayType display_type, guint gles_version)
{
- InitParams params;
+ GstVaapiDisplay *display;
+ InitParams params = {
+ .display_type = display_type,
+ .gl_display = native_display,
+ .gles_version = gles_version,
+ };
g_return_val_if_fail (native_display != NULL, NULL);
- params.display = native_display;
- params.display_type = display_type;
- params.gles_version = gles_version;
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_EGL, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_EGL, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, ¶ms);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_glx.c
^
|
@@ -128,7 +128,10 @@
GstVaapiDisplay *
gst_vaapi_display_glx_new (const gchar * display_name)
{
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_GLX, NULL),
+ GstVaapiDisplay *display;
+
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_GLX, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, (gpointer) display_name);
}
@@ -146,8 +149,11 @@
GstVaapiDisplay *
gst_vaapi_display_glx_new_with_display (Display * x11_display)
{
+ GstVaapiDisplay *display;
+
g_return_val_if_fail (x11_display != NULL, NULL);
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_GLX, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_GLX, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, x11_display);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
^
|
@@ -109,6 +109,7 @@
struct _GstVaapiDisplayPrivate
{
+ GstVaapiDisplay *parent;
GRecMutex mutex;
gchar *display_name;
VADisplay display;
@@ -200,33 +201,9 @@
};
GstVaapiDisplay *
-gst_vaapi_display_new (GstVaapiDisplay * display,
+gst_vaapi_display_config (GstVaapiDisplay * display,
GstVaapiDisplayInitType init_type, gpointer init_value);
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-#define gst_vaapi_display_ref_internal(display) \
- ((gpointer) gst_object_ref (GST_OBJECT (display)))
-
-#define gst_vaapi_display_unref_internal(display) \
- gst_object_unref (GST_OBJECT (display))
-
-#define gst_vaapi_display_replace_internal(old_display_ptr, new_display) \
- gst_object_replace ((GstObject **)(old_display_ptr), GST_OBJECT (new_display))
-
-#undef gst_vaapi_display_ref
-#define gst_vaapi_display_ref(display) \
- gst_vaapi_display_ref_internal ((display))
-
-#undef gst_vaapi_display_unref
-#define gst_vaapi_display_unref(display) \
- gst_vaapi_display_unref_internal ((display))
-
-#undef gst_vaapi_display_replace
-#define gst_vaapi_display_replace(old_display_ptr, new_display) \
- gst_vaapi_display_replace_internal ((old_display_ptr), (new_display))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c
^
|
@@ -27,7 +27,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapidisplay_priv.h"
#include "gstvaapidisplay_wayland.h"
#include "gstvaapidisplay_wayland_priv.h"
@@ -36,11 +35,8 @@
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayWayland);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayWayland, gst_vaapi_display_wayland,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayWayland, gst_vaapi_display_wayland,
+ GST_TYPE_VAAPI_DISPLAY);
static inline const gchar *
get_default_display_name (void)
@@ -99,6 +95,17 @@
};
static void
+handle_xdg_wm_base_ping (void *user_data, struct xdg_wm_base *xdg_wm_base,
+ uint32_t serial)
+{
+ xdg_wm_base_pong (xdg_wm_base, serial);
+}
+
+static const struct xdg_wm_base_listener xdg_wm_base_listener = {
+ handle_xdg_wm_base_ping
+};
+
+static void
registry_handle_global (void *data,
struct wl_registry *registry,
uint32_t id, const char *interface, uint32_t version)
@@ -109,8 +116,12 @@
priv->compositor =
wl_registry_bind (registry, id, &wl_compositor_interface, 1);
else if (strcmp (interface, "wl_shell") == 0)
- priv->shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
- else if (strcmp (interface, "wl_output") == 0) {
+ priv->wl_shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
+ else if (strcmp (interface, "xdg_wm_base") == 0) {
+ priv->xdg_wm_base =
+ wl_registry_bind (registry, id, &xdg_wm_base_interface, 1);
+ xdg_wm_base_add_listener (priv->xdg_wm_base, &xdg_wm_base_listener, priv);
+ } else if (strcmp (interface, "wl_output") == 0) {
priv->output = wl_registry_bind (registry, id, &wl_output_interface, 1);
wl_output_add_listener (priv->output, &output_listener, priv);
}
@@ -146,10 +157,14 @@
return FALSE;
}
- if (!priv->shell) {
- GST_ERROR ("failed to bind shell interface");
+ if (priv->xdg_wm_base)
+ return TRUE;
+
+ if (!priv->wl_shell) {
+ GST_ERROR ("failed to bind wl_shell interface");
return FALSE;
}
+
return TRUE;
}
@@ -194,25 +209,11 @@
GstVaapiDisplayWaylandPrivate *const priv =
GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE (display);
- if (priv->output) {
- wl_output_destroy (priv->output);
- priv->output = NULL;
- }
-
- if (priv->shell) {
- wl_shell_destroy (priv->shell);
- priv->shell = NULL;
- }
-
- if (priv->compositor) {
- wl_compositor_destroy (priv->compositor);
- priv->compositor = NULL;
- }
-
- if (priv->registry) {
- wl_registry_destroy (priv->registry);
- priv->registry = NULL;
- }
+ g_clear_pointer (&priv->output, wl_output_destroy);
+ g_clear_pointer (&priv->wl_shell, wl_shell_destroy);
+ g_clear_pointer (&priv->xdg_wm_base, xdg_wm_base_destroy);
+ g_clear_pointer (&priv->compositor, wl_compositor_destroy);
+ g_clear_pointer (&priv->registry, wl_registry_destroy);
if (priv->wl_display) {
if (!priv->use_foreign_display)
@@ -220,10 +221,7 @@
priv->wl_display = NULL;
}
- if (priv->display_name) {
- g_free (priv->display_name);
- priv->display_name = NULL;
- }
+ g_clear_pointer (&priv->display_name, g_free);
}
static gboolean
@@ -325,9 +323,11 @@
GstVaapiDisplay *
gst_vaapi_display_wayland_new (const gchar * display_name)
{
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND,
- NULL), GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME,
- (gpointer) display_name);
+ GstVaapiDisplay *display;
+
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND, NULL);
+ return gst_vaapi_display_config (display,
+ GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, (gpointer) display_name);
}
/**
@@ -344,10 +344,49 @@
GstVaapiDisplay *
gst_vaapi_display_wayland_new_with_display (struct wl_display * wl_display)
{
+ GstVaapiDisplay *display;
+
g_return_val_if_fail (wl_display, NULL);
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND,
- NULL), GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, wl_display);
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND, NULL);
+ return gst_vaapi_display_config (display,
+ GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, wl_display);
+}
+
+/**
+ * gst_vaapi_display_wayland_new_with_va_display:
+ * @va_display: a VADisplay #va_display
+ * @wl_display: an Wayland #wl_display
+ *
+ * Creates a #GstVaapiDisplay based on the VADisplay @va_display and
+ * the Wayland @wl_display display.
+ * The caller still owns the display and must call
+ * wl_display_disconnect() when all #GstVaapiDisplay references are
+ * released.
+ *
+ * Return value: a newly allocated #GstVaapiDisplay object
+ */
+
+GstVaapiDisplay *
+gst_vaapi_display_wayland_new_with_va_display (VADisplay va_display,
+ struct wl_display * wl_display)
+{
+ GstVaapiDisplay *display;
+ GstVaapiDisplayInfo info = {
+ .va_display = va_display,
+ .native_display = wl_display,
+ };
+
+ g_return_val_if_fail (wl_display, NULL);
+
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND, NULL);
+ if (!gst_vaapi_display_config (display,
+ GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY, &info)) {
+ gst_object_unref (display);
+ return NULL;
+ }
+
+ return display;
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_wayland.h
^
|
@@ -41,6 +41,10 @@
GstVaapiDisplay *
gst_vaapi_display_wayland_new_with_display (struct wl_display * wl_display);
+GstVaapiDisplay *
+gst_vaapi_display_wayland_new_with_va_display (VADisplay va_display,
+ struct wl_display * wl_display);
+
struct wl_display *
gst_vaapi_display_wayland_get_display (GstVaapiDisplayWayland * display);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_wayland_priv.h
^
|
@@ -24,6 +24,8 @@
#ifndef GST_VAAPI_DISPLAY_WAYLAND_PRIV_H
#define GST_VAAPI_DISPLAY_WAYLAND_PRIV_H
+#include "xdg-shell-client-protocol.h"
+
#include <gst/vaapi/gstvaapidisplay_wayland.h>
#include "gstvaapidisplay_priv.h"
@@ -60,7 +62,8 @@
gchar *display_name;
struct wl_display *wl_display;
struct wl_compositor *compositor;
- struct wl_shell *shell;
+ struct wl_shell *wl_shell;
+ struct xdg_wm_base *xdg_wm_base;
struct wl_output *output;
struct wl_registry *registry;
guint width;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
^
|
@@ -28,29 +28,25 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapiutils.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapidisplay_x11.h"
#include "gstvaapidisplay_x11_priv.h"
#include "gstvaapiwindow_x11.h"
-#ifdef HAVE_XRANDR
+#if HAVE_XRANDR
# include <X11/extensions/Xrandr.h>
#endif
-#ifdef HAVE_XRENDER
+#if HAVE_XRENDER
# include <X11/extensions/Xrender.h>
#endif
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayX11);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayX11, gst_vaapi_display_x11,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayX11, gst_vaapi_display_x11,
+ GST_TYPE_VAAPI_DISPLAY);
static inline const gchar *
get_default_display_name (void)
@@ -114,11 +110,11 @@
GstVaapiDisplayX11Private *const priv = display->priv;
int evt_base, err_base;
-#ifdef HAVE_XRANDR
+#if HAVE_XRANDR
priv->use_xrandr = XRRQueryExtension (priv->x11_display,
&evt_base, &err_base);
#endif
-#ifdef HAVE_XRENDER
+#if HAVE_XRENDER
priv->has_xrender = XRenderQueryExtension (priv->x11_display,
&evt_base, &err_base);
#endif
@@ -180,10 +176,7 @@
priv->x11_display = NULL;
}
- if (priv->display_name) {
- g_free (priv->display_name);
- priv->display_name = NULL;
- }
+ g_clear_pointer (&priv->display_name, g_free);
}
static void
@@ -260,7 +253,7 @@
width_mm = DisplayWidthMM (priv->x11_display, priv->x11_screen);
height_mm = DisplayHeightMM (priv->x11_display, priv->x11_screen);
-#ifdef HAVE_XRANDR
+#if HAVE_XRANDR
/* XXX: fix up physical size if the display is rotated */
if (priv->use_xrandr) {
XRRScreenConfiguration *xrr_config = NULL;
@@ -348,7 +341,10 @@
GstVaapiDisplay *
gst_vaapi_display_x11_new (const gchar * display_name)
{
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL),
+ GstVaapiDisplay *display;
+
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, (gpointer) display_name);
}
@@ -366,9 +362,12 @@
GstVaapiDisplay *
gst_vaapi_display_x11_new_with_display (Display * x11_display)
{
+ GstVaapiDisplay *display;
+
g_return_val_if_fail (x11_display, NULL);
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, x11_display);
}
@@ -376,6 +375,7 @@
gst_vaapi_display_x11_new_with_va_display (VADisplay va_display,
Display * x11_display)
{
+ GstVaapiDisplay *display;
GstVaapiDisplayInfo info = {
.va_display = va_display,
.native_display = x11_display,
@@ -383,7 +383,8 @@
g_return_val_if_fail (x11_display, NULL);
- return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL),
+ display = g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL);
+ return gst_vaapi_display_config (display,
GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY, &info);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder.c
^
|
@@ -329,6 +329,8 @@
roi = (GstVideoRegionOfInterestMeta *)
gst_buffer_iterate_meta_filtered (input, &state,
GST_VIDEO_REGION_OF_INTEREST_META_API_TYPE);
+ if (!roi)
+ continue;
/* ignore roi if overflow */
if ((roi->x > G_MAXINT16) || (roi->y > G_MAXINT16)
@@ -479,6 +481,46 @@
return proxy;
}
+/* Create a coded buffer proxy where the picture is going to be
+ * decoded, the subclass encode vmethod is called and, if it doesn't
+ * fail, the coded buffer is pushed into the async queue */
+static GstVaapiEncoderStatus
+gst_vaapi_encoder_encode_and_queue (GstVaapiEncoder * encoder,
+ GstVaapiEncPicture * picture)
+{
+ GstVaapiEncoderClass *const klass = GST_VAAPI_ENCODER_GET_CLASS (encoder);
+ GstVaapiCodedBufferProxy *codedbuf_proxy;
+ GstVaapiEncoderStatus status;
+
+ codedbuf_proxy = gst_vaapi_encoder_create_coded_buffer (encoder);
+ if (!codedbuf_proxy)
+ goto error_create_coded_buffer;
+
+ status = klass->encode (encoder, picture, codedbuf_proxy);
+ if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
+ goto error_encode;
+
+ gst_vaapi_coded_buffer_proxy_set_user_data (codedbuf_proxy,
+ picture, (GDestroyNotify) gst_vaapi_mini_object_unref);
+ g_async_queue_push (encoder->codedbuf_queue, codedbuf_proxy);
+ encoder->num_codedbuf_queued++;
+
+ return status;
+
+ /* ERRORS */
+error_create_coded_buffer:
+ {
+ GST_ERROR ("failed to allocate coded buffer");
+ return GST_VAAPI_ENCODER_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+error_encode:
+ {
+ GST_ERROR ("failed to encode frame (status = %d)", status);
+ gst_vaapi_coded_buffer_proxy_unref (codedbuf_proxy);
+ return status;
+ }
+}
+
/**
* gst_vaapi_encoder_put_frame:
* @encoder: a #GstVaapiEncoder
@@ -496,7 +538,6 @@
GstVaapiEncoderClass *const klass = GST_VAAPI_ENCODER_GET_CLASS (encoder);
GstVaapiEncoderStatus status;
GstVaapiEncPicture *picture;
- GstVaapiCodedBufferProxy *codedbuf_proxy;
for (;;) {
picture = NULL;
@@ -506,19 +547,10 @@
if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
goto error_reorder_frame;
- codedbuf_proxy = gst_vaapi_encoder_create_coded_buffer (encoder);
- if (!codedbuf_proxy)
- goto error_create_coded_buffer;
-
- status = klass->encode (encoder, picture, codedbuf_proxy);
+ status = gst_vaapi_encoder_encode_and_queue (encoder, picture);
if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
goto error_encode;
- gst_vaapi_coded_buffer_proxy_set_user_data (codedbuf_proxy,
- picture, (GDestroyNotify) gst_vaapi_mini_object_unref);
- g_async_queue_push (encoder->codedbuf_queue, codedbuf_proxy);
- encoder->num_codedbuf_queued++;
-
/* Try again with any pending reordered frame now available for encoding */
frame = NULL;
}
@@ -530,17 +562,9 @@
GST_ERROR ("failed to process reordered frames");
return status;
}
-error_create_coded_buffer:
- {
- GST_ERROR ("failed to allocate coded buffer");
- gst_vaapi_enc_picture_unref (picture);
- return GST_VAAPI_ENCODER_STATUS_ERROR_ALLOCATION_FAILED;
- }
error_encode:
{
- GST_ERROR ("failed to encode frame (status = %d)", status);
gst_vaapi_enc_picture_unref (picture);
- gst_vaapi_coded_buffer_proxy_unref (codedbuf_proxy);
return status;
}
}
@@ -597,6 +621,17 @@
}
}
+static inline gboolean
+_get_pending_reordered (GstVaapiEncoder * encoder,
+ GstVaapiEncPicture ** picture, gpointer * state)
+{
+ GstVaapiEncoderClass *const klass = GST_VAAPI_ENCODER_GET_CLASS (encoder);
+
+ if (!klass->get_pending_reordered)
+ return FALSE;
+ return klass->get_pending_reordered (encoder, picture, state);
+}
+
/**
* gst_vaapi_encoder_flush:
* @encoder: a #GstVaapiEncoder
@@ -609,8 +644,28 @@
gst_vaapi_encoder_flush (GstVaapiEncoder * encoder)
{
GstVaapiEncoderClass *const klass = GST_VAAPI_ENCODER_GET_CLASS (encoder);
+ GstVaapiEncPicture *picture;
+ GstVaapiEncoderStatus status;
+ gpointer iter = NULL;
+
+ picture = NULL;
+ while (_get_pending_reordered (encoder, &picture, &iter)) {
+ if (!picture)
+ continue;
+ status = gst_vaapi_encoder_encode_and_queue (encoder, picture);
+ if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS)
+ goto error_encode;
+ }
+ g_free (iter);
return klass->flush (encoder);
+
+ /* ERRORS */
+error_encode:
+ {
+ gst_vaapi_enc_picture_unref (picture);
+ return status;
+ }
}
/**
@@ -1401,7 +1456,7 @@
#undef CHECK_VTABLE_HOOK
- encoder->display = gst_vaapi_display_ref (display);
+ encoder->display = gst_object_ref (display);
encoder->va_display = gst_vaapi_display_get_display (display);
encoder->va_context = VA_INVALID_ID;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
^
|
@@ -21,9 +21,6 @@
* Boston, MA 02110-1301 USA
*/
-/* GValueArray has deprecated without providing an alternative in glib >= 2.32
- * See https://bugzilla.gnome.org/show_bug.cgi?id=667228
- */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "sysdeps.h"
@@ -330,7 +327,7 @@
static gboolean
bs_write_sps_data (GstBitWriter * bs,
const VAEncSequenceParameterBufferH264 * seq_param, GstVaapiProfile profile,
- const VAEncMiscParameterHRD * hrd_params)
+ GstVaapiRateControl rate_control, const VAEncMiscParameterHRD * hrd_params)
{
guint8 profile_idc;
guint32 constraint_set0_flag, constraint_set1_flag;
@@ -340,6 +337,7 @@
guint32 b_qpprime_y_zero_transform_bypass = 0;
guint32 residual_color_transform_flag = 0;
+ guint32 cbr_flag = rate_control == GST_VAAPI_RATECONTROL_CBR ? 1 : 0;
guint32 pic_height_in_map_units =
(seq_param->seq_fields.bits.frame_mbs_only_flag ?
seq_param->picture_height_in_mbs : seq_param->picture_height_in_mbs / 2);
@@ -509,7 +507,7 @@
/* cpb_size_value_minus1[0] */
WRITE_UE (bs, (hrd_params->buffer_size >> SX_CPB_SIZE) - 1);
/* cbr_flag[0] */
- WRITE_UINT32 (bs, 1, 1);
+ WRITE_UINT32 (bs, cbr_flag, 1);
}
/* initial_cpb_removal_delay_length_minus1 */
WRITE_UINT32 (bs, 23, 5);
@@ -547,9 +545,9 @@
static gboolean
bs_write_sps (GstBitWriter * bs,
const VAEncSequenceParameterBufferH264 * seq_param, GstVaapiProfile profile,
- const VAEncMiscParameterHRD * hrd_params)
+ GstVaapiRateControl rate_control, const VAEncMiscParameterHRD * hrd_params)
{
- if (!bs_write_sps_data (bs, seq_param, profile, hrd_params))
+ if (!bs_write_sps_data (bs, seq_param, profile, rate_control, hrd_params))
return FALSE;
/* rbsp_trailing_bits */
@@ -561,12 +559,12 @@
static gboolean
bs_write_subset_sps (GstBitWriter * bs,
const VAEncSequenceParameterBufferH264 * seq_param, GstVaapiProfile profile,
- guint num_views, guint16 * view_ids,
+ GstVaapiRateControl rate_control, guint num_views, guint16 * view_ids,
const VAEncMiscParameterHRD * hrd_params)
{
guint32 i, j, k;
- if (!bs_write_sps_data (bs, seq_param, profile, hrd_params))
+ if (!bs_write_sps_data (bs, seq_param, profile, rate_control, hrd_params))
return FALSE;
if (profile == GST_VAAPI_PROFILE_H264_STEREO_HIGH ||
@@ -1409,6 +1407,26 @@
set_i_frame (picture, encoder);
}
+static void
+set_frame_num (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
+{
+ GstVaapiH264ViewReorderPool *reorder_pool = NULL;
+
+ reorder_pool = &encoder->reorder_pools[encoder->view_idx];
+
+ picture->frame_num = (reorder_pool->cur_frame_num % encoder->max_frame_num);
+
+ if (GST_VAAPI_ENC_PICTURE_IS_IDR (picture)) {
+ picture->frame_num = 0;
+ reorder_pool->cur_frame_num = 0;
+ }
+
+ reorder_pool->prev_frame_is_ref = GST_VAAPI_ENC_PICTURE_IS_REFRENCE (picture);
+
+ if (reorder_pool->prev_frame_is_ref)
+ ++reorder_pool->cur_frame_num;
+}
+
/* Fills in VA HRD parameters */
static void
fill_hrd_params (GstVaapiEncoderH264 * encoder, VAEncMiscParameterHRD * hrd)
@@ -1432,7 +1450,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_NONE,
GST_H264_NAL_AU_DELIMITER);
@@ -1456,14 +1474,14 @@
gst_vaapi_enc_picture_add_packed_header (picture, packed_aud);
gst_vaapi_codec_object_replace (&packed_aud, NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write AU Delimiter NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1474,6 +1492,7 @@
add_packed_sequence_header (GstVaapiEncoderH264 * encoder,
GstVaapiEncPicture * picture, GstVaapiEncSequence * sequence)
{
+ GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder);
GstVaapiEncPackedHeader *packed_seq;
GstBitWriter bs;
VAEncPackedHeaderParameterBuffer packed_seq_param = { 0 };
@@ -1486,7 +1505,7 @@
fill_hrd_params (encoder, &hrd_params);
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SPS);
@@ -1497,7 +1516,8 @@
profile == GST_VAAPI_PROFILE_H264_STEREO_HIGH)
profile = GST_VAAPI_PROFILE_H264_HIGH;
- bs_write_sps (&bs, seq_param, profile, &hrd_params);
+ bs_write_sps (&bs, seq_param, profile, base_encoder->rate_control,
+ &hrd_params);
g_assert (GST_BIT_WRITER_BIT_SIZE (&bs) % 8 == 0);
data_bit_size = GST_BIT_WRITER_BIT_SIZE (&bs);
@@ -1517,14 +1537,14 @@
/* store sps data */
_check_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1533,6 +1553,7 @@
add_packed_sequence_header_mvc (GstVaapiEncoderH264 * encoder,
GstVaapiEncPicture * picture, GstVaapiEncSequence * sequence)
{
+ GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder);
GstVaapiEncPackedHeader *packed_seq;
GstBitWriter bs;
VAEncPackedHeaderParameterBuffer packed_header_param_buffer = { 0 };
@@ -1544,12 +1565,13 @@
fill_hrd_params (encoder, &hrd_params);
/* non-base layer, pack one subset sps */
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SUBSET_SPS);
- bs_write_subset_sps (&bs, seq_param, encoder->profile, encoder->num_views,
- encoder->view_ids, &hrd_params);
+ bs_write_subset_sps (&bs, seq_param, encoder->profile,
+ base_encoder->rate_control, encoder->num_views, encoder->view_ids,
+ &hrd_params);
g_assert (GST_BIT_WRITER_BIT_SIZE (&bs) % 8 == 0);
data_bit_size = GST_BIT_WRITER_BIT_SIZE (&bs);
@@ -1569,14 +1591,14 @@
/* store subset sps data */
_check_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
^
|
@@ -1405,7 +1405,7 @@
fill_hrd_params (encoder, &hrd_params);
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SPS);
@@ -1436,14 +1436,14 @@
/* store sps data */
_check_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1463,7 +1463,7 @@
fill_hrd_params (encoder, &hrd_params);
/* non-base layer, pack one subset sps */
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SUBSET_SPS);
@@ -1488,14 +1488,14 @@
/* store subset sps data */
_check_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1513,7 +1513,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_PPS);
bs_write_pps (&bs, pic_param, encoder->profile);
@@ -1535,14 +1535,14 @@
/* store pps data */
_check_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write PPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1559,9 +1559,9 @@
guint8 *data, *buf_period_payload = NULL, *pic_timing_payload = NULL;
gboolean need_buf_period, need_pic_timing;
- gst_bit_writer_init (&bs_buf_period, 128 * 8);
- gst_bit_writer_init (&bs_pic_timing, 128 * 8);
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs_buf_period, 128, FALSE);
+ gst_bit_writer_init_with_size (&bs_pic_timing, 128, FALSE);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
need_buf_period = GST_VAAPI_H264_SEI_BUF_PERIOD & payloadtype;
need_pic_timing = GST_VAAPI_H264_SEI_PIC_TIMING & payloadtype;
@@ -1624,18 +1624,18 @@
gst_vaapi_enc_picture_add_packed_header (picture, packed_sei);
gst_vaapi_codec_object_replace ((GstVaapiCodecObject **) & packed_sei, NULL);
- gst_bit_writer_clear (&bs_buf_period, TRUE);
- gst_bit_writer_clear (&bs_pic_timing, TRUE);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs_buf_period);
+ gst_bit_writer_reset (&bs_pic_timing);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SEI NAL unit");
- gst_bit_writer_clear (&bs_buf_period, TRUE);
- gst_bit_writer_clear (&bs_pic_timing, TRUE);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs_buf_period);
+ gst_bit_writer_reset (&bs_pic_timing);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1679,7 +1679,7 @@
guint8 *data;
guint8 nal_ref_idc, nal_unit_type;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
if (!get_nal_hdr_attributes (picture, &nal_ref_idc, &nal_unit_type))
@@ -1706,7 +1706,7 @@
gst_vaapi_codec_object_replace ((GstVaapiCodecObject **) & packed_prefix_nal,
NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
@@ -1714,7 +1714,7 @@
bs_error:
{
GST_WARNING ("failed to write Prefix NAL unit header");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1733,7 +1733,7 @@
guint8 *data;
guint8 nal_ref_idc, nal_unit_type;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
if (!get_nal_hdr_attributes (picture, &nal_ref_idc, &nal_unit_type))
@@ -1763,14 +1763,14 @@
gst_vaapi_codec_object_replace ((GstVaapiCodecObject **) & packed_slice,
NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write Slice NAL unit header");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1892,7 +1892,6 @@
seq_param->level_idc = encoder->level_idc;
seq_param->intra_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
seq_param->intra_idr_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
- seq_param->ip_period = 1 + encoder->num_bframes;
seq_param->ip_period = seq_param->intra_period > 1 ?
(1 + encoder->num_bframes) : 0;
seq_param->bits_per_second = encoder->bitrate_bits;
@@ -2450,6 +2449,14 @@
rate_control->window_size = encoder->cpb_length;
rate_control->initial_qp = encoder->init_qp;
rate_control->min_qp = encoder->min_qp;
+
+#if VA_CHECK_VERSION(1,1,0)
+ /* @FIXME: should not set this value, should be ignored if set to zero *
+ * https://github.com/intel/media-driver/issues/587 */
+ if (rate_control->min_qp > 0)
+ rate_control->max_qp = 51;
+#endif
+
rate_control->basic_unit_size = 0;
gst_vaapi_enc_picture_add_misc_param (picture, misc);
gst_vaapi_codec_object_replace (&misc, NULL);
@@ -2911,7 +2918,8 @@
level_idc = sps_info.data[3];
/* Header */
- gst_bit_writer_init (&bs, (sps_info.size + pps_info.size + 64) * 8);
+ gst_bit_writer_init_with_size (&bs, (sps_info.size + pps_info.size + 64),
+ FALSE);
WRITE_UINT32 (&bs, configuration_version, 8);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
^
|
@@ -44,7 +44,8 @@
/* Supported set of tuning options, within this implementation */
#define SUPPORTED_TUNE_OPTIONS \
- (GST_VAAPI_ENCODER_TUNE_MASK (NONE))
+ (GST_VAAPI_ENCODER_TUNE_MASK (NONE) | \
+ GST_VAAPI_ENCODER_TUNE_MASK (LOW_POWER))
/* Supported set of VA packed headers, within this implementation */
#define SUPPORTED_PACKED_HEADERS \
@@ -92,6 +93,7 @@
GstVaapiProfile profile;
GstVaapiTierH265 tier;
GstVaapiLevelH265 level;
+ GstVaapiEntrypoint entrypoint;
guint8 profile_idc;
guint8 max_profile_idc;
guint8 hw_max_profile_idc;
@@ -110,6 +112,7 @@
guint32 luma_height;
GstClockTime cts_offset;
gboolean config_changed;
+ gboolean low_delay_b;
/* maximum required size of the decoded picture buffer */
guint32 max_dec_pic_buffering;
@@ -181,8 +184,8 @@
}
if (ret <= 4)
ret = 4;
- else if (ret > 10)
- ret = 10;
+ else if (ret > 16)
+ ret = 16;
/* must be greater than 4 */
return ret;
}
@@ -348,7 +351,7 @@
bs_write_sps_data (GstBitWriter * bs, GstVaapiEncoderH265 * encoder,
GstVaapiEncPicture * picture,
const VAEncSequenceParameterBufferHEVC * seq_param, GstVaapiProfile profile,
- const VAEncMiscParameterHRD * hrd_params)
+ GstVaapiRateControl rate_control, const VAEncMiscParameterHRD * hrd_params)
{
guint32 video_parameter_set_id = 0;
guint32 max_sub_layers_minus1 = 0;
@@ -361,6 +364,7 @@
guint32 sps_extension_flag = 0;
guint32 nal_hrd_parameters_present_flag = 0;
guint maxNumSubLayers = 1, i;
+ guint32 cbr_flag = rate_control == GST_VAAPI_RATECONTROL_CBR ? 1 : 0;
/* video_parameter_set_id */
WRITE_UINT32 (bs, video_parameter_set_id, 4);
@@ -522,7 +526,7 @@
/* cpb_size_value_minus1 */
WRITE_UE (bs, (hrd_params->buffer_size >> SX_CPB_SIZE) - 1);
/* cbr_flag */
- WRITE_UINT32 (bs, 1, 1);
+ WRITE_UINT32 (bs, cbr_flag, 1);
}
}
}
@@ -547,9 +551,10 @@
bs_write_sps (GstBitWriter * bs, GstVaapiEncoderH265 * encoder,
GstVaapiEncPicture * picture,
const VAEncSequenceParameterBufferHEVC * seq_param, GstVaapiProfile profile,
- const VAEncMiscParameterHRD * hrd_params)
+ GstVaapiRateControl rate_control, const VAEncMiscParameterHRD * hrd_params)
{
- if (!bs_write_sps_data (bs, encoder, picture, seq_param, profile, hrd_params))
+ if (!bs_write_sps_data (bs, encoder, picture, seq_param, profile,
+ rate_control, hrd_params))
return FALSE;
/* rbsp_trailing_bits */
@@ -915,7 +920,7 @@
ensure_hw_profile (GstVaapiEncoderH265 * encoder)
{
GstVaapiDisplay *const display = GST_VAAPI_ENCODER_DISPLAY (encoder);
- GstVaapiEntrypoint entrypoint = GST_VAAPI_ENTRYPOINT_SLICE_ENCODE;
+ GstVaapiEntrypoint entrypoint = encoder->entrypoint;
GstVaapiProfile profile, profiles[4];
guint i, num_profiles = 0;
@@ -993,38 +998,46 @@
return TRUE;
}
-/* Derives the minimum tier from the active coding tools */
-static gboolean
-ensure_tier (GstVaapiEncoderH265 * encoder)
-{
-
- encoder->tier = GST_VAAPI_TIER_H265_MAIN;
- /* FIXME: Derive proper tier based on upstream caps or limits, coding
- * tools etc */
-
- return TRUE;
-}
-
-/* Derives the level from the currently set limits */
+/* Derives the level and tier from the currently set limits */
static gboolean
-ensure_level (GstVaapiEncoderH265 * encoder)
+ensure_tier_level (GstVaapiEncoderH265 * encoder)
{
- const GstVaapiH265LevelLimits *limits_table;
+ guint bitrate = GST_VAAPI_ENCODER_CAST (encoder)->bitrate;
guint i, num_limits, PicSizeInSamplesY;
+ guint LumaSr;
+ const GstVaapiH265LevelLimits *limits_table;
PicSizeInSamplesY = encoder->luma_width * encoder->luma_height;
+ LumaSr =
+ gst_util_uint64_scale (PicSizeInSamplesY,
+ GST_VAAPI_ENCODER_FPS_N (encoder), GST_VAAPI_ENCODER_FPS_D (encoder));
limits_table = gst_vaapi_utils_h265_get_level_limits_table (&num_limits);
for (i = 0; i < num_limits; i++) {
const GstVaapiH265LevelLimits *const limits = &limits_table[i];
- if (PicSizeInSamplesY <= limits->MaxLumaPs)
+ /* Choose level by luma picture size and luma sample rate */
+ if (PicSizeInSamplesY <= limits->MaxLumaPs && LumaSr <= limits->MaxLumaSr)
break;
- /* FIXME: Add more constraint checking:tier (extracted from caps),
- * cpb size, bitrate, num_tile_columns and num_tile_rows */
}
+
if (i == num_limits)
goto error_unsupported_level;
+ if (bitrate <= limits_table[i].MaxBRTierMain) {
+ encoder->tier = GST_VAAPI_TIER_H265_MAIN;
+ } else {
+ encoder->tier = GST_VAAPI_TIER_H265_HIGH;
+ if (bitrate > limits_table[i].MaxBRTierHigh) {
+ GST_INFO ("The bitrate of the stream is %d kbps, larger than"
+ " %s profile %s level %s tier's max bit rate %d kbps",
+ bitrate,
+ gst_vaapi_utils_h265_get_profile_string (encoder->profile),
+ gst_vaapi_utils_h265_get_level_string (limits_table[i].level),
+ gst_vaapi_utils_h265_get_tier_string (GST_VAAPI_TIER_H265_HIGH),
+ limits_table[i].MaxBRTierHigh);
+ }
+ }
+
encoder->level = limits_table[i].level;
encoder->level_idc = limits_table[i].level_idc;
return TRUE;
@@ -1037,6 +1050,7 @@
}
}
+/* Derives the minimum tier from the active coding tools */
/* Enable "high-compression" tuning options */
static gboolean
ensure_tuning_high_compression (GstVaapiEncoderH265 * encoder)
@@ -1067,6 +1081,10 @@
case GST_VAAPI_ENCODER_TUNE_HIGH_COMPRESSION:
success = ensure_tuning_high_compression (encoder);
break;
+ case GST_VAAPI_ENCODER_TUNE_LOW_POWER:
+ encoder->entrypoint = GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP;
+ success = TRUE;
+ break;
default:
success = TRUE;
break;
@@ -1166,7 +1184,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H265_NAL_VPS);
@@ -1190,14 +1208,14 @@
/* store vps data */
_check_vps_sps_pps_status (encoder, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write VPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1208,6 +1226,7 @@
add_packed_sequence_header (GstVaapiEncoderH265 * encoder,
GstVaapiEncPicture * picture, GstVaapiEncSequence * sequence)
{
+ GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_h265.h
^
|
@@ -42,10 +42,11 @@
* @GST_VAAPI_ENCODER_H265_PROP_NUM_SLICES: Number of slices per frame (uint).
* @GST_VAAPI_ENCODER_H265_PROP_NUM_REF_FRAMES: Maximum number of reference frames.
* @GST_VAAPI_ENCODER_H265_PROP_CPB_LENGTH: Length of the CPB buffer
+ * in milliseconds (uint).
* @GST_VAAPI_ENCODER_H265_PROP_MBBRC: Macroblock level Bitrate Control.
* @GST_VAAPI_ENCODER_H265_PROP_QP_IP: Difference of QP between I and P frame.
* @GST_VAAPI_ENCODER_H265_PROP_QP_IB: Difference of QP between I and B frame.
- * in milliseconds (uint).
+ * @GST_VAAPI_ENCODER_H265_PROP_LOW_DELAY_B: use low delay b feature.
*
* The set of H.265 encoder specific configurable properties.
*/
@@ -59,6 +60,7 @@
GST_VAAPI_ENCODER_H265_PROP_MBBRC = -8,
GST_VAAPI_ENCODER_H265_PROP_QP_IP = -9,
GST_VAAPI_ENCODER_H265_PROP_QP_IB = -10,
+ GST_VAAPI_ENCODER_H265_PROP_LOW_DELAY_B = -11,
} GstVaapiEncoderH265Prop;
GstVaapiEncoder *
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c
^
|
@@ -205,6 +205,7 @@
GstVaapiEncPicture * picture,
GstVaapiCodedBuffer * codedbuf, GstVaapiSurfaceProxy * surface)
{
+ guint i;
VAEncPictureParameterBufferJPEG *const pic_param = picture->param;
memset (pic_param, 0, sizeof (VAEncPictureParameterBufferJPEG));
@@ -224,6 +225,11 @@
pic_param->num_scan = 1;
pic_param->num_components = encoder->n_components;
pic_param->quality = encoder->quality;
+ for (i = 0; i < pic_param->num_components; i++) {
+ pic_param->component_id[i] = i + 1;
+ if (i != 0)
+ pic_param->quantiser_table_selector[i] = 1;
+ }
return TRUE;
}
@@ -437,13 +443,11 @@
frame_hdr->num_components = pic_param->num_components;
for (i = 0; i < frame_hdr->num_components; i++) {
- frame_hdr->components[i].identifier = i + 1;
+ frame_hdr->components[i].identifier = pic_param->component_id[i];
frame_hdr->components[i].horizontal_factor = encoder->h_samp[i];
frame_hdr->components[i].vertical_factor = encoder->v_samp[i];
- if (i == 0)
- frame_hdr->components[i].quant_table_selector = 0;
- else
- frame_hdr->components[i].quant_table_selector = 1;
+ frame_hdr->components[i].quant_table_selector =
+ pic_param->quantiser_table_selector[i];
}
}
@@ -611,7 +615,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
bs_write_jpeg_header (&bs, encoder, picture);
data_bit_size = GST_BIT_WRITER_BIT_SIZE (&bs);
data = GST_BIT_WRITER_DATA (&bs);
@@ -629,7 +633,7 @@
gst_vaapi_enc_picture_add_packed_header (picture, packed_raw_data_hdr);
gst_vaapi_codec_object_replace (&packed_raw_data_hdr, NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
^
|
@@ -347,7 +347,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&writer, 128 * 8);
+ gst_bit_writer_init_with_size (&writer, 128, FALSE);
if (encoder->new_gop)
gst_bit_writer_write_sps (&writer, seq_param);
g_assert (GST_BIT_WRITER_BIT_SIZE (&writer) % 8 == 0);
@@ -365,7 +365,7 @@
gst_vaapi_enc_picture_add_packed_header (picture, packed_seq);
gst_vaapi_codec_object_replace (&packed_seq, NULL);
- gst_bit_writer_clear (&writer, TRUE);
+ gst_bit_writer_reset (&writer);
return TRUE;
}
@@ -381,7 +381,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&writer, 128 * 8);
+ gst_bit_writer_init_with_size (&writer, 128, FALSE);
gst_bit_writer_write_pps (&writer, pic_param);
g_assert (GST_BIT_WRITER_BIT_SIZE (&writer) % 8 == 0);
data_bit_size = GST_BIT_WRITER_BIT_SIZE (&writer);
@@ -398,7 +398,7 @@
gst_vaapi_enc_picture_add_packed_header (picture, packed_pic);
gst_vaapi_codec_object_replace (&packed_pic, NULL);
- gst_bit_writer_clear (&writer, TRUE);
+ gst_bit_writer_reset (&writer);
return TRUE;
}
@@ -417,8 +417,10 @@
if (!fill_sequence (encoder, sequence))
goto error;
- if (picture->type == GST_VAAPI_PICTURE_TYPE_I &&
- !set_sequence_packed_header (encoder, picture, sequence))
+ if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) &
+ VA_ENC_PACKED_HEADER_SEQUENCE)
+ && picture->type == GST_VAAPI_PICTURE_TYPE_I
+ && !set_sequence_packed_header (encoder, picture, sequence))
goto error;
gst_vaapi_enc_picture_set_sequence (picture, sequence);
gst_vaapi_codec_object_replace (&sequence, NULL);
@@ -442,7 +444,9 @@
if (!fill_picture (encoder, picture, codedbuf, surface))
return FALSE;
- if (!set_picture_packed_header (encoder, picture)) {
+ if ((GST_VAAPI_ENCODER_PACKED_HEADERS (encoder) &
+ VA_ENC_PACKED_HEADER_PICTURE)
+ && !set_picture_packed_header (encoder, picture)) {
GST_ERROR ("set picture packed header failed");
return FALSE;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
^
|
@@ -289,7 +289,6 @@
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
-#if USE_JPEG_ENCODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiEncHuffmanTable,
gst_vaapi_enc_huffman_table);
@@ -322,7 +321,6 @@
return NULL;
return GST_VAAPI_ENC_HUFFMAN_TABLE_CAST (object);
}
-#endif
/* ------------------------------------------------------------------------- */
/* --- Encoder Picture --- */
@@ -557,6 +555,10 @@
return FALSE;
}
+ /* Submit Picture parameter */
+ if (!do_encode (va_display, va_context, &picture->param_id, &picture->param))
+ return FALSE;
+
/* Submit Misc Params */
for (i = 0; i < picture->misc_params->len; i++) {
GstVaapiEncMiscParam *const misc =
@@ -565,10 +567,6 @@
return FALSE;
}
- /* Submit Picture parameter */
- if (!do_encode (va_display, va_context, &picture->param_id, &picture->param))
- return FALSE;
-
/* Submit Slice parameters */
for (i = 0; i < picture->slices->len; i++) {
GstVaapiEncSlice *const slice = g_ptr_array_index (picture->slices, i);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
^
|
@@ -362,6 +362,12 @@
/* To create a secondary context for a single base encoder */
gboolean (*ensure_secondary_context) (GstVaapiEncoder * encoder);
+
+ /* Iterator that retrieves the pending pictures in the reordered
+ * list */
+ gboolean (*get_pending_reordered) (GstVaapiEncoder * encoder,
+ GstVaapiEncPicture ** picture,
+ gpointer * state);
};
#define GST_VAAPI_ENCODER_CLASS_HOOK(codec, func) \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_vp8.c
^
|
@@ -445,6 +445,11 @@
static GstVaapiEncoderStatus
gst_vaapi_encoder_vp8_flush (GstVaapiEncoder * base_encoder)
{
+ GstVaapiEncoderVP8 *const encoder = GST_VAAPI_ENCODER_VP8 (base_encoder);
+
+ encoder->frame_num = 0;
+ clear_references (encoder);
+
return GST_VAAPI_ENCODER_STATUS_SUCCESS;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c
^
|
@@ -462,6 +462,10 @@
static GstVaapiEncoderStatus
gst_vaapi_encoder_vp9_flush (GstVaapiEncoder * base_encoder)
{
+ GstVaapiEncoderVP9 *const encoder = GST_VAAPI_ENCODER_VP9 (base_encoder);
+
+ encoder->frame_num = 0;
+
return GST_VAAPI_ENCODER_STATUS_SUCCESS;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapifeienc_h264.c
^
|
@@ -641,7 +641,6 @@
seq_param->level_idc = feienc->level_idc;
seq_param->intra_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (feienc);
seq_param->intra_idr_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (feienc);
- seq_param->ip_period = 1 + feienc->num_bframes;
seq_param->ip_period = seq_param->intra_period > 1 ?
(1 + feienc->num_bframes) : 0;
seq_param->bits_per_second = feienc->bitrate_bits;
@@ -1701,6 +1700,46 @@
}
}
+static void
+set_view_ids (GstVaapiFeiEncH264 * const encoder, const GValue * value)
+{
+ guint i, j;
+ guint len = gst_value_array_get_size (value);
+
+ if (len == 0)
+ goto set_default_ids;
+
+ if (len != encoder->num_views) {
+ GST_WARNING ("The view number is %d, but %d view IDs are provided. Just "
+ "fallback to use default view IDs.", encoder->num_views, len);
+ goto set_default_ids;
+ }
+
+ for (i = 0; i < len; i++) {
+ const GValue *val = gst_value_array_get_value (value, i);
+ encoder->view_ids[i] = g_value_get_uint (val);
+ }
+
+ /* check whether duplicated ID */
+ for (i = 0; i < len; i++) {
+ for (j = i + 1; j < len; j++) {
+ if (encoder->view_ids[i] == encoder->view_ids[j]) {
+ GST_WARNING ("The view %d and view %d have same view ID %d. Just "
+ "fallback to use default view IDs.", i, j, encoder->view_ids[i]);
+ goto set_default_ids;
+ }
+ }
+ }
+
+ return;
+
+set_default_ids:
+ {
+ for (i = 0; i < encoder->num_views; i++)
+ encoder->view_ids[i] = i;
+ }
+}
+
GstVaapiEncoderStatus
gst_vaapi_feienc_h264_set_property (GstVaapiEncoder * base_encoder,
gint prop_id, const GValue * value)
@@ -1732,23 +1771,9 @@
case GST_VAAPI_FEI_H264_ENC_PROP_NUM_VIEWS:
feienc->num_views = g_value_get_uint (value);
break;
- case GST_VAAPI_FEI_H264_ENC_PROP_VIEW_IDS:{
- guint i;
- GValueArray *view_ids = g_value_get_boxed (value);
-
- if (view_ids == NULL) {
- for (i = 0; i < feienc->num_views; i++)
- feienc->view_ids[i] = i;
- } else {
- g_assert (view_ids->n_values <= feienc->num_views);
-
- for (i = 0; i < feienc->num_views; i++) {
- GValue *val = g_value_array_get_nth (view_ids, i);
- feienc->view_ids[i] = g_value_get_uint (val);
- }
- }
+ case GST_VAAPI_FEI_H264_ENC_PROP_VIEW_IDS:
+ set_view_ids (feienc, value);
break;
- }
case GST_VAAPI_FEI_H264_ENC_PROP_NUM_REF:
feienc->num_ref_frames = g_value_get_uint (value);
break;
@@ -2157,7 +2182,7 @@
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_VIEW_IDS,
- g_param_spec_value_array ("view-ids",
+ gst_param_spec_array ("view-ids",
"View IDs", "Set of View Ids used for MVC encoding",
g_param_spec_uint ("view-id-value", "View id value",
"view id values used for mvc encoding", 0, MAX_VIEW_ID, 0,
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapifeipak_h264.c
^
|
@@ -909,7 +909,7 @@
guint8 *data;
fill_hrd_params (feipak, &hrd_params);
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SPS);
/* Set High profile for encoding the MVC base view. Otherwise, some
@@ -939,14 +939,14 @@
/* store sps data */
_check_sps_pps_status (feipak, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -966,7 +966,7 @@
fill_hrd_params (feipak, &hrd_params);
/* non-base layer, pack one subset sps */
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_SUBSET_SPS);
@@ -992,14 +992,14 @@
/* store subset sps data */
_check_sps_pps_status (feipak, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write SPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1017,7 +1017,7 @@
guint32 data_bit_size;
guint8 *data;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
bs_write_nal_header (&bs, GST_H264_NAL_REF_IDC_HIGH, GST_H264_NAL_PPS);
bs_write_pps (&bs, pic_param, feipak->profile);
@@ -1040,14 +1040,14 @@
/* store pps data */
_check_sps_pps_status (feipak, data + 4, data_bit_size / 8 - 4);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write PPS NAL unit");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1091,7 +1091,7 @@
guint8 *data;
guint8 nal_ref_idc, nal_unit_type;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
if (!get_nal_hdr_attributes (picture, &nal_ref_idc, &nal_unit_type))
@@ -1117,7 +1117,7 @@
gst_vaapi_enc_slice_add_packed_header (slice, packed_prefix_nal);
gst_vaapi_codec_object_replace (&packed_prefix_nal, NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
@@ -1125,7 +1125,7 @@
bs_error:
{
GST_WARNING ("failed to write Prefix NAL unit header");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1144,7 +1144,7 @@
guint8 *data;
guint8 nal_ref_idc, nal_unit_type;
- gst_bit_writer_init (&bs, 128 * 8);
+ gst_bit_writer_init_with_size (&bs, 128, FALSE);
WRITE_UINT32 (&bs, 0x00000001, 32); /* start code */
if (!get_nal_hdr_attributes (picture, &nal_ref_idc, &nal_unit_type))
@@ -1174,14 +1174,14 @@
gst_vaapi_enc_slice_add_packed_header (slice, packed_slice);
gst_vaapi_codec_object_replace (&packed_slice, NULL);
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return TRUE;
/* ERRORS */
bs_error:
{
GST_WARNING ("failed to write Slice NAL unit header");
- gst_bit_writer_clear (&bs, TRUE);
+ gst_bit_writer_reset (&bs);
return FALSE;
}
}
@@ -1799,6 +1799,46 @@
}
+static void
+set_view_ids (GstVaapiFEIPakH264 * feipak, const GValue * value)
+{
+ guint i, j;
+ guint len = gst_value_array_get_size (value);
+
+ if (len == 0)
+ goto set_default_ids;
+
+ if (len != feipak->num_views) {
+ GST_WARNING ("The view number is %d, but %d view IDs are provided. Just "
+ "fallback to use default view IDs.", feipak->num_views, len);
+ goto set_default_ids;
+ }
+
+ for (i = 0; i < len; i++) {
+ const GValue *val = gst_value_array_get_value (value, i);
+ feipak->view_ids[i] = g_value_get_uint (val);
+ }
+
+ /* check whether duplicated ID */
+ for (i = 0; i < len; i++) {
+ for (j = i + 1; j < len; j++) {
+ if (feipak->view_ids[i] == feipak->view_ids[j]) {
+ GST_WARNING ("The view %d and view %d have same view ID %d. Just "
+ "fallback to use default view IDs.", i, j, feipak->view_ids[i]);
+ goto set_default_ids;
+ }
+ }
+ }
+
+ return;
+
+set_default_ids:
+ {
+ for (i = 0; i < feipak->num_views; i++)
+ feipak->view_ids[i] = i;
+ }
+}
+
GstVaapiEncoderStatus
gst_vaapi_feipak_h264_set_property (GstVaapiFEIPakH264 * feipak,
gint prop_id, const GValue * value)
@@ -1811,23 +1851,9 @@
case GST_VAAPI_FEIPAK_H264_PROP_NUM_VIEWS:
feipak->num_views = g_value_get_uint (value);
break;
- case GST_VAAPI_FEIPAK_H264_PROP_VIEW_IDS:{
- guint i;
- GValueArray *view_ids = g_value_get_boxed (value);
-
- if (view_ids == NULL) {
- for (i = 0; i < feipak->num_views; i++)
- feipak->view_ids[i] = i;
- } else {
- g_assert (view_ids->n_values <= feipak->num_views);
-
- for (i = 0; i < feipak->num_views; i++) {
- GValue *val = g_value_array_get_nth (view_ids, i);
- feipak->view_ids[i] = g_value_get_uint (val);
- }
- }
+ case GST_VAAPI_FEIPAK_H264_PROP_VIEW_IDS:
+ set_view_ids (feipak, value);
break;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapifilter.c
^
|
@@ -30,10 +30,7 @@
#include "gstvaapisurface_priv.h"
#include "gstvaapiutils_core.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
-
-#define GST_VAAPI_FILTER(obj) \
+#define GST_VAAPI_FILTER_CAST(obj) \
((GstVaapiFilter *)(obj))
typedef struct _GstVaapiFilterOpData GstVaapiFilterOpData;
@@ -55,7 +52,7 @@
struct _GstVaapiFilter
{
/*< private > */
- GstVaapiMiniObject parent_instance;
+ GstObject parent_instance;
GstVaapiDisplay *display;
VADisplay va_display;
@@ -73,6 +70,24 @@
guint use_target_rect:1;
};
+typedef struct _GstVaapiFilterClass GstVaapiFilterClass;
+struct _GstVaapiFilterClass
+{
+ /*< private > */
+ GstObjectClass parent_class;
+};
+
+/* Debug category for VaapiFilter */
+GST_DEBUG_CATEGORY (gst_debug_vaapi_filter);
+#define GST_CAT_DEFAULT gst_debug_vaapi_filter
+
+#define _do_init \
+ GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi_filter, "vaapifilter", 0, \
+ "VA-API Filter");
+
+G_DEFINE_TYPE_WITH_CODE (GstVaapiFilter, gst_vaapi_filter, GST_TYPE_OBJECT,
+ _do_init);
+
/* ------------------------------------------------------------------------- */
/* --- VPP Types --- */
/* ------------------------------------------------------------------------- */
@@ -110,14 +125,12 @@
"Disable deinterlacing", "none"},
{GST_VAAPI_DEINTERLACE_METHOD_BOB,
"Bob deinterlacing", "bob"},
-#if USE_VA_VPP
{GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
"Weave deinterlacing", "weave"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
"Motion adaptive deinterlacing", "motion-adaptive"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
"Motion compensated deinterlacing", "motion-compensated"},
-#endif
{0, NULL, NULL},
};
@@ -156,7 +169,6 @@
/* --- VPP Helpers --- */
/* ------------------------------------------------------------------------- */
-#if USE_VA_VPP
static VAProcFilterType *
vpp_get_filters_unlocked (GstVaapiFilter * filter, guint * num_filters_ptr)
{
@@ -258,18 +270,21 @@
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
return caps;
}
-#endif
/* ------------------------------------------------------------------------- */
/* --- VPP Operations --- */
/* ------------------------------------------------------------------------- */
-#if USE_VA_VPP
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_UNKNOWN
#define DEFAULT_SCALING GST_VAAPI_SCALE_METHOD_DEFAULT
enum
{
+ PROP_DISPLAY = 1,
+};
+
+enum
+{
PROP_0,
PROP_FORMAT = GST_VAAPI_FILTER_OP_FORMAT,
@@ -405,7 +420,6 @@
GST_VAAPI_TYPE_SCALE_METHOD,
DEFAULT_SCALING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-#if VA_CHECK_VERSION(0,36,0)
/**
* GstVaapiFilter:skin-tone-enhancement:
*
@@ -415,7 +429,6 @@
"Skin tone enhancement",
"Apply the skin tone enhancement algorithm",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-#endif
}
static void
@@ -464,12 +477,10 @@
op_data->va_cap_size = sizeof (VAProcFilterCap);
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
-#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_FILTER_OP_SKINTONE:
op_data->va_type = VAProcFilterSkinToneEnhancement;
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
-#endif
case GST_VAAPI_FILTER_OP_HUE:
op_data->va_subtype = VAProcColorBalanceHue;
goto op_colorbalance;
@@ -695,14 +706,12 @@
return NULL;
}
}
-#endif
/* Determine the set of supported VPP operations by the specific
filter, or known to this library if filter is NULL */
static GPtrArray *
get_operations (GstVaapiFilter * filter)
{
-#if USE_VA_VPP
GPtrArray *ops;
if (filter && filter->operations)
@@ -712,8 +721,6 @@
if (!ops)
return NULL;
return filter ? get_operations_ordered (filter, ops) : ops;
-#endif
- return NULL;
}
/* Ensure the set of supported VPP operations is cached into the
@@ -756,7 +763,6 @@
}
/* Ensure the operation's VA buffer is allocated */
-#if USE_VA_VPP
static inline gboolean
op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
{
@@ -766,10 +772,8 @@
VAProcFilterParameterBufferType, op_data->va_buffer_size, NULL,
&op_data->va_buffer, NULL);
}
-#endif
/* Update a generic filter (float value) */
-#if USE_VA_VPP
static gboolean
op_set_generic_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, gfloat value)
@@ -799,7 +803,6 @@
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
-#endif
static inline gboolean
op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@@ -807,16 +810,13 @@
{
gboolean success = FALSE;
-#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_generic_unlocked (filter, op_data, value);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
-#endif
return success;
}
/* Update the color balance filter */
-#if USE_VA_VPP
static gboolean
op_set_color_balance_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, gfloat value)
@@ -847,7 +847,6 @@
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
-#endif
static inline gboolean
op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@@ -855,16 +854,13 @@
{
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapifilter.h
^
|
@@ -28,6 +28,13 @@
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_FILTER \
+ (gst_vaapi_filter_get_type ())
+#define GST_VAAPI_FILTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_FILTER, GstVaapiFilter))
+#define GST_VAAPI_IS_FILTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_FILTER))
+
typedef struct _GstVaapiFilter GstVaapiFilter;
typedef struct _GstVaapiFilterOpInfo GstVaapiFilterOpInfo;
@@ -167,14 +174,11 @@
GType
gst_vaapi_deinterlace_flags_get_type (void) G_GNUC_CONST;
-GstVaapiFilter *
-gst_vaapi_filter_new (GstVaapiDisplay * display);
+GType
+gst_vaapi_filter_get_type (void) G_GNUC_CONST;
GstVaapiFilter *
-gst_vaapi_filter_ref (GstVaapiFilter * filter);
-
-void
-gst_vaapi_filter_unref (GstVaapiFilter * filter);
+gst_vaapi_filter_new (GstVaapiDisplay * display);
void
gst_vaapi_filter_replace (GstVaapiFilter ** old_filter_ptr,
@@ -269,4 +273,9 @@
gboolean
gst_vaapi_filter_get_skintone_default (GstVaapiFilter * filter);
+
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiFilter, gst_object_unref)
+#endif
+
#endif /* GST_VAAPI_FILTER_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiimage.c
^
|
@@ -28,7 +28,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapicompat.h"
#include "gstvaapiutils.h"
#include "gstvaapiimage.h"
@@ -78,6 +77,7 @@
break;
case VA_FOURCC ('Y', 'U', 'Y', '2'):
case VA_FOURCC ('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC ('R', 'G', '1', '6'):
data_size = 2 * width * height;
break;
case VA_FOURCC ('Y', '8', '0', '0'):
@@ -92,14 +92,17 @@
case VA_FOURCC ('R', 'G', 'B', 'X'):
case VA_FOURCC ('X', 'B', 'G', 'R'):
case VA_FOURCC ('B', 'G', 'R', 'X'):
+ case VA_FOURCC ('Y', '2', '1', '0'):
+ case VA_FOURCC ('Y', '4', '1', '0'):
data_size = 4 * width * height;
break;
case VA_FOURCC ('P', '0', '1', '0'):
data_size = 2 * (width * height + 2 * width2 * height2);
break;
default:
- g_error ("FIXME: incomplete formats %" GST_FOURCC_FORMAT,
+ GST_ERROR ("FIXME: incomplete formats %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (va_image->format.fourcc));
+ data_size = G_MAXUINT;
break;
}
return va_image->data_size == data_size;
@@ -122,7 +125,7 @@
status = vaDestroyImage (GST_VAAPI_DISPLAY_VADISPLAY (display), image_id);
GST_VAAPI_DISPLAY_UNLOCK (display);
if (!vaapi_check_status (status, "vaDestroyImage()"))
- g_warning ("failed to destroy image %" GST_VAAPI_ID_FORMAT,
+ GST_WARNING ("failed to destroy image %" GST_VAAPI_ID_FORMAT,
GST_VAAPI_ID_ARGS (image_id));
GST_VAAPI_OBJECT_ID (image) = VA_INVALID_ID;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiminiobject.c
^
|
@@ -23,12 +23,7 @@
#include <string.h>
#include "gstvaapiminiobject.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_mini_object_ref
-#undef gst_vaapi_mini_object_unref
-#undef gst_vaapi_mini_object_replace
-
-void
+static void
gst_vaapi_mini_object_free (GstVaapiMiniObject * object)
{
const GstVaapiMiniObjectClass *const klass = object->object_class;
@@ -109,6 +104,22 @@
}
/**
+ * gst_vaapi_mini_object_ref_internal:
+ * @object: a #GstVaapiMiniObject
+ *
+ * Atomically increases the reference count of the given @object by one.
+ * This is an internal function that does not do any run-time type check.
+ *
+ * Returns: The same @object argument
+ */
+static inline GstVaapiMiniObject *
+gst_vaapi_mini_object_ref_internal (GstVaapiMiniObject * object)
+{
+ g_atomic_int_inc (&object->ref_count);
+ return object;
+}
+
+/**
* gst_vaapi_mini_object_ref:
* @object: a #GstVaapiMiniObject
*
@@ -125,6 +136,22 @@
}
/**
+ * gst_vaapi_mini_object_unref_internal:
+ * @object: a #GstVaapiMiniObject
+ *
+ * Atomically decreases the reference count of the @object by one. If
+ * the reference count reaches zero, the object will be free'd.
+ *
+ * This is an internal function that does not do any run-time type check.
+ */
+static inline void
+gst_vaapi_mini_object_unref_internal (GstVaapiMiniObject * object)
+{
+ if (g_atomic_int_dec_and_test (&object->ref_count))
+ gst_vaapi_mini_object_free (object);
+}
+
+/**
* gst_vaapi_mini_object_unref:
* @object: a #GstVaapiMiniObject
*
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiminiobject.h
^
|
@@ -157,52 +157,6 @@
gst_vaapi_mini_object_replace (GstVaapiMiniObject ** old_object_ptr,
GstVaapiMiniObject * new_object);
-#ifdef IN_LIBGSTVAAPI_CORE
-#undef gst_vaapi_mini_object_ref
-#define gst_vaapi_mini_object_ref(object) \
- gst_vaapi_mini_object_ref_internal (object)
-
-#undef gst_vaapi_mini_object_unref
-#define gst_vaapi_mini_object_unref(object) \
- gst_vaapi_mini_object_unref_internal (object)
-
-G_GNUC_INTERNAL
-void
-gst_vaapi_mini_object_free (GstVaapiMiniObject * object);
-
-/**
- * gst_vaapi_mini_object_ref_internal:
- * @object: a #GstVaapiMiniObject
- *
- * Atomically increases the reference count of the given @object by one.
- * This is an internal function that does not do any run-time type check.
- *
- * Returns: The same @object argument
- */
-static inline GstVaapiMiniObject *
-gst_vaapi_mini_object_ref_internal (GstVaapiMiniObject * object)
-{
- g_atomic_int_inc (&object->ref_count);
- return object;
-}
-
-/**
- * gst_vaapi_mini_object_unref_internal:
- * @object: a #GstVaapiMiniObject
- *
- * Atomically decreases the reference count of the @object by one. If
- * the reference count reaches zero, the object will be free'd.
- *
- * This is an internal function that does not do any run-time type check.
- */
-static inline void
-gst_vaapi_mini_object_unref_internal (GstVaapiMiniObject * object)
-{
- if (g_atomic_int_dec_and_test (&object->ref_count))
- gst_vaapi_mini_object_free (object);
-}
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_MINI_OBJECT_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiobject.c
^
|
@@ -36,11 +36,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_object_ref
-#undef gst_vaapi_object_unref
-#undef gst_vaapi_object_replace
-
static void
gst_vaapi_object_finalize (GstVaapiObject * object)
{
@@ -91,7 +86,7 @@
if (!object)
return NULL;
- object->display = gst_vaapi_display_ref (display);
+ object->display = gst_object_ref (display);
object->object_id = VA_INVALID_ID;
sub_size = object_class->size - sizeof (*object);
@@ -114,7 +109,7 @@
gpointer
gst_vaapi_object_ref (gpointer object)
{
- return gst_vaapi_object_ref_internal (object);
+ return gst_vaapi_mini_object_ref (object);
}
/**
@@ -127,7 +122,7 @@
void
gst_vaapi_object_unref (gpointer object)
{
- gst_vaapi_object_unref_internal (object);
+ gst_vaapi_mini_object_unref (object);
}
/**
@@ -142,7 +137,8 @@
void
gst_vaapi_object_replace (gpointer old_object_ptr, gpointer new_object)
{
- gst_vaapi_object_replace_internal (old_object_ptr, new_object);
+ gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) old_object_ptr,
+ new_object);
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiobject.h
^
|
@@ -35,24 +35,6 @@
typedef struct _GstVaapiObject GstVaapiObject;
-/**
- * GST_VAAPI_OBJECT_DISPLAY:
- * @object: a #GstVaapiObject
- *
- * Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
- */
-#define GST_VAAPI_OBJECT_DISPLAY(object) \
- gst_vaapi_object_get_display (GST_VAAPI_OBJECT (object))
-
-/**
- * GST_VAAPI_OBJECT_ID:
- * @object: a #GstVaapiObject
- *
- * Macro that evaluates to the #GstVaapiID contained in @object.
- */
-#define GST_VAAPI_OBJECT_ID(object) \
- gst_vaapi_object_get_id (GST_VAAPI_OBJECT (object))
-
gpointer
gst_vaapi_object_ref (gpointer object);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiobject_priv.h
^
|
@@ -71,7 +71,6 @@
* Macro that evaluates to the #GstVaapiID contained in @object.
* This is an internal macro that does not do any run-time type checks.
*/
-#undef GST_VAAPI_OBJECT_ID
#define GST_VAAPI_OBJECT_ID(object) \
(GST_VAAPI_OBJECT (object)->object_id)
@@ -82,7 +81,6 @@
* Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
* This is an internal macro that does not do any run-time type check.
*/
-#undef GST_VAAPI_OBJECT_DISPLAY
#define GST_VAAPI_OBJECT_DISPLAY(object) \
(GST_VAAPI_OBJECT (object)->display)
@@ -195,40 +193,6 @@
gst_vaapi_object_new (const GstVaapiObjectClass * klass,
GstVaapiDisplay * display);
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-static inline gpointer
-gst_vaapi_object_ref_internal (gpointer object)
-{
- return gst_vaapi_mini_object_ref (object);
-}
-
-static inline void
-gst_vaapi_object_unref_internal (gpointer object)
-{
- gst_vaapi_mini_object_unref (object);
-}
-
-static inline void
-gst_vaapi_object_replace_internal (gpointer old_object_ptr, gpointer new_object)
-{
- gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) old_object_ptr,
- new_object);
-}
-
-#undef gst_vaapi_object_ref
-#define gst_vaapi_object_ref(object) \
- gst_vaapi_object_ref_internal ((object))
-
-#undef gst_vaapi_object_unref
-#define gst_vaapi_object_unref(object) \
- gst_vaapi_object_unref_internal ((object))
-
-#undef gst_vaapi_object_replace
-#define gst_vaapi_object_replace(old_object_ptr, new_object) \
- gst_vaapi_object_replace_internal ((old_object_ptr), (new_object))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_OBJECT_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiparser_frame.h
^
|
@@ -72,15 +72,26 @@
gst_vaapi_parser_frame_append_unit(GstVaapiParserFrame *frame,
GstVaapiDecoderUnit *unit);
-#define gst_vaapi_parser_frame_ref(frame) \
- gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(frame))
+static inline GstVaapiParserFrame *
+gst_vaapi_parser_frame_ref (GstVaapiParserFrame * frame)
+{
+ return (GstVaapiParserFrame *)
+ gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (frame));
+}
-#define gst_vaapi_parser_frame_unref(frame) \
- gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(frame))
+static inline void
+gst_vaapi_parser_frame_unref (GstVaapiParserFrame * frame)
+{
+ gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (frame));
+}
-#define gst_vaapi_parser_frame_replace(old_frame_p, new_frame) \
- gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_frame_p), \
- (GstVaapiMiniObject *)(new_frame))
+static inline void
+gst_vaapi_parser_frame_replace(GstVaapiParserFrame * old_frame_p,
+ GstVaapiParserFrame * new_frame)
+{
+ gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) old_frame_p,
+ (GstVaapiMiniObject *) new_frame);
+}
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapipixmap.c
^
|
@@ -33,11 +33,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_pixmap_ref
-#undef gst_vaapi_pixmap_unref
-#undef gst_vaapi_pixmap_replace
-
static inline GstVaapiPixmap *
gst_vaapi_pixmap_new_internal (const GstVaapiPixmapClass * pixmap_class,
GstVaapiDisplay * display)
@@ -73,7 +68,7 @@
/* ERRORS */
error:
{
- gst_vaapi_pixmap_unref_internal (pixmap);
+ gst_vaapi_pixmap_unref (pixmap);
return NULL;
}
}
@@ -97,7 +92,7 @@
/* ERRORS */
error:
{
- gst_vaapi_pixmap_unref_internal (pixmap);
+ gst_vaapi_pixmap_unref (pixmap);
return NULL;
}
}
@@ -113,7 +108,7 @@
GstVaapiPixmap *
gst_vaapi_pixmap_ref (GstVaapiPixmap * pixmap)
{
- return gst_vaapi_pixmap_ref_internal (pixmap);
+ return gst_vaapi_object_ref (GST_VAAPI_OBJECT (pixmap));
}
/**
@@ -126,7 +121,7 @@
void
gst_vaapi_pixmap_unref (GstVaapiPixmap * pixmap)
{
- gst_vaapi_pixmap_unref_internal (pixmap);
+ gst_vaapi_object_unref (GST_VAAPI_OBJECT (pixmap));
}
/**
@@ -142,7 +137,8 @@
gst_vaapi_pixmap_replace (GstVaapiPixmap ** old_pixmap_ptr,
GstVaapiPixmap * new_pixmap)
{
- gst_vaapi_pixmap_replace_internal (old_pixmap_ptr, new_pixmap);
+ gst_vaapi_object_replace ((GstVaapiObject **) (old_pixmap_ptr),
+ GST_VAAPI_OBJECT (new_pixmap));
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapipixmap_priv.h
^
|
@@ -108,31 +108,6 @@
gst_vaapi_pixmap_new_from_native(const GstVaapiPixmapClass *pixmap_class,
GstVaapiDisplay *display, gpointer native_pixmap);
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-#define gst_vaapi_pixmap_ref_internal(pixmap) \
- ((gpointer)gst_vaapi_object_ref(GST_VAAPI_OBJECT(pixmap)))
-
-#define gst_vaapi_pixmap_unref_internal(pixmap) \
- gst_vaapi_object_unref(GST_VAAPI_OBJECT(pixmap))
-
-#define gst_vaapi_pixmap_replace_internal(old_pixmap_ptr, new_pixmap) \
- gst_vaapi_object_replace((GstVaapiObject **)(old_pixmap_ptr), \
- GST_VAAPI_OBJECT(new_pixmap))
-
-#undef gst_vaapi_pixmap_ref
-#define gst_vaapi_pixmap_ref(pixmap) \
- gst_vaapi_pixmap_ref_internal((pixmap))
-
-#undef gst_vaapi_pixmap_unref
-#define gst_vaapi_pixmap_unref(pixmap) \
- gst_vaapi_pixmap_unref_internal((pixmap))
-
-#undef gst_vaapi_pixmap_replace
-#define gst_vaapi_pixmap_replace(old_pixmap_ptr, new_pixmap) \
- gst_vaapi_pixmap_replace_internal((old_pixmap_ptr), (new_pixmap))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_PIXMAP_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiprofile.c
^
|
@@ -28,7 +28,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <gst/gstbuffer.h>
#include "gstvaapicompat.h"
#include "gstvaapiprofile.h"
@@ -90,61 +89,53 @@
"video/x-divx, divxversion=5", "advanced-simple"},
{GST_VAAPI_PROFILE_MPEG4_ADVANCED_SIMPLE, VAProfileMPEG4AdvancedSimple,
"video/x-xvid", "advanced-simple"},
-#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
"video/x-h263, variant=itu, h263version=h263", "baseline"},
-#endif
#if !VA_CHECK_VERSION(1,0,0)
{GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
"video/x-h264", "baseline"},
#endif
-#if VA_CHECK_VERSION(0,31,1)
{GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
VAProfileH264ConstrainedBaseline,
"video/x-h264", "constrained-baseline"},
-#endif
{GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
"video/x-h264", "main"},
{GST_VAAPI_PROFILE_H264_HIGH, VAProfileH264High,
"video/x-h264", "high"},
-#if VA_CHECK_VERSION(0,35,2)
{GST_VAAPI_PROFILE_H264_MULTIVIEW_HIGH, VAProfileH264MultiviewHigh,
"video/x-h264", "multiview-high"},
{GST_VAAPI_PROFILE_H264_STEREO_HIGH, VAProfileH264StereoHigh,
"video/x-h264", "stereo-high"},
-#endif
{GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
"video/x-wmv, wmvversion=3", "simple"},
{GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
"video/x-wmv, wmvversion=3", "main"},
{GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"},
-#if VA_CHECK_VERSION(0,32,0)
{GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
"image/jpeg", NULL},
-#endif
-#if VA_CHECK_VERSION(0,35,0)
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
"video/x-vp8", NULL},
-#endif
-#if VA_CHECK_VERSION(0,37,0)
{GST_VAAPI_PROFILE_H265_MAIN, VAProfileHEVCMain,
"video/x-h265", "main"},
{GST_VAAPI_PROFILE_H265_MAIN10, VAProfileHEVCMain10,
"video/x-h265", "main-10"},
+#if VA_CHECK_VERSION(1,2,0)
+ {GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_10,
+ "video/x-h265", "main-422-10"},
+ {GST_VAAPI_PROFILE_H265_MAIN_444, VAProfileHEVCMain444,
+ "video/x-h265", "main-444"},
+ {GST_VAAPI_PROFILE_H265_MAIN_444_10, VAProfileHEVCMain444_10,
+ "video/x-h265", "main-444-10"},
#endif
-#if VA_CHECK_VERSION(0,38,0)
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
"video/x-vp9", "profile0"},
-#endif
-#if VA_CHECK_VERSION(0,39,0)
{GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1,
"video/x-vp9", "profile1"},
{GST_VAAPI_PROFILE_VP9_2, VAProfileVP9Profile2,
"video/x-vp9", "profile2"},
{GST_VAAPI_PROFILE_VP9_3, VAProfileVP9Profile3,
"video/x-vp9", "profile3"},
-#endif
{0,}
};
@@ -153,10 +144,8 @@
{GST_VAAPI_ENTRYPOINT_VLD, VAEntrypointVLD},
{GST_VAAPI_ENTRYPOINT_IDCT, VAEntrypointIDCT},
{GST_VAAPI_ENTRYPOINT_MOCO, VAEntrypointMoComp},
-#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE, VAEntrypointEncSlice},
{GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE, VAEntrypointEncPicture},
-#endif
#if VA_CHECK_VERSION(0,39,1)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP, VAEntrypointEncSliceLP},
#endif
@@ -331,6 +320,10 @@
return GST_VAAPI_PROFILE_H265_MAIN10;
case 3:
return GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE;
+ case 4:
+ return GST_VAAPI_PROFILE_H265_MAIN_422_10;
+ case 5:
+ return GST_VAAPI_PROFILE_H265_MAIN_444;
}
return 0;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiprofile.h
^
|
@@ -131,6 +131,8 @@
* H.265 main 10 profile [A.3.3]
* @GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE:
* H.265 main still picture profile [A.3.4]
+ * @GST_VAAPI_PROFILE_H265_MAIN_422_10:
+ * H.265 main still picture profile [A.3.5]
* @GST_VAAPI_PROFILE_VP9_0:
* VP9 prfile 0, bitdepth=8, 420
* @GST_VAAPI_PROFILE_VP9_1:
@@ -175,6 +177,9 @@
GST_VAAPI_PROFILE_H265_MAIN10 = GST_VAAPI_MAKE_PROFILE(H265,2),
GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE =
GST_VAAPI_MAKE_PROFILE(H265,3),
+ GST_VAAPI_PROFILE_H265_MAIN_422_10 = GST_VAAPI_MAKE_PROFILE(H265,4),
+ GST_VAAPI_PROFILE_H265_MAIN_444 = GST_VAAPI_MAKE_PROFILE(H265,5),
+ GST_VAAPI_PROFILE_H265_MAIN_444_10 = GST_VAAPI_MAKE_PROFILE(H265,6),
GST_VAAPI_PROFILE_VP9_0 = GST_VAAPI_MAKE_PROFILE(VP9,1),
GST_VAAPI_PROFILE_VP9_1 = GST_VAAPI_MAKE_PROFILE(VP9,2),
GST_VAAPI_PROFILE_VP9_2 = GST_VAAPI_MAKE_PROFILE(VP9,3),
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisubpicture.c
^
|
@@ -28,7 +28,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapicompat.h"
#include "gstvaapiutils.h"
#include "gstvaapisubpicture.h"
@@ -84,7 +83,7 @@
subpicture_id);
GST_VAAPI_DISPLAY_UNLOCK (display);
if (!vaapi_check_status (status, "vaDestroySubpicture()"))
- g_warning ("failed to destroy subpicture %" GST_VAAPI_ID_FORMAT,
+ GST_WARNING ("failed to destroy subpicture %" GST_VAAPI_ID_FORMAT,
GST_VAAPI_ID_ARGS (subpicture_id));
}
GST_VAAPI_OBJECT_ID (subpicture) = VA_INVALID_ID;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurface.c
^
|
@@ -86,7 +86,7 @@
&surface_id, 1);
GST_VAAPI_DISPLAY_UNLOCK (display);
if (!vaapi_check_status (status, "vaDestroySurfaces()"))
- g_warning ("failed to destroy surface %" GST_VAAPI_ID_FORMAT,
+ GST_WARNING ("failed to destroy surface %" GST_VAAPI_ID_FORMAT,
GST_VAAPI_ID_ARGS (surface_id));
GST_VAAPI_OBJECT_ID (surface) = VA_INVALID_SURFACE;
}
@@ -132,7 +132,6 @@
gst_vaapi_surface_create_full (GstVaapiSurface * surface,
const GstVideoInfo * vip, guint flags)
{
-#if VA_CHECK_VERSION(0,34,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
const GstVideoFormat format = GST_VIDEO_INFO_FORMAT (vip);
VASurfaceID surface_id;
@@ -219,16 +218,12 @@
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
-#else
- return FALSE;
-#endif
}
static gboolean
gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
{
-#if VA_CHECK_VERSION (0,36,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
GstVideoFormat format;
VASurfaceID surface_id;
@@ -308,15 +303,57 @@
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
-#else
- return FALSE;
-#endif
}
#define gst_vaapi_surface_finalize gst_vaapi_surface_destroy
GST_VAAPI_OBJECT_DEFINE_CLASS (GstVaapiSurface, gst_vaapi_surface);
/**
+ * gst_vaapi_surface_new_from_formats:
+ * @display: a #GstVaapiDisplay
+ * @chroma_type: the surface chroma format
+ * @width: the requested surface width
+ * @height: the requested surface height
+ * @formats: the limited format list
+ *
+ * Creates a new #GstVaapiSurface with a @chroma_type valid for any
+ * format in @formats; If there aren't any, the returned surface is
+ * created forcing the passed @chroma_type.
+ *
+ * Return value: the newly allocated #GstVaapiSurface object
+ */
+GstVaapiSurface *
+gst_vaapi_surface_new_from_formats (GstVaapiDisplay * display,
+ GstVaapiChromaType chroma_type, guint width, guint height, GArray * formats)
+{
+ GstVaapiSurface *surface;
+ guint i;
+
+ for (i = 0; i < formats->len; i++) {
+ GstVideoFormat format = g_array_index (formats, GstVideoFormat, i);
+ if (format == gst_vaapi_video_format_from_chroma (chroma_type))
+ return gst_vaapi_surface_new (display, chroma_type, width, height);
+ }
+
+ /* Fallback: if there's no format valid for the chroma type let's
+ * just use the passed chroma */
+ surface = gst_vaapi_object_new (gst_vaapi_surface_class (), display);
+ if (!surface)
+ return NULL;
+ if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
+ goto error;
+
+ return surface;
+
+ /* ERRORS */
+error:
+ {
+ gst_vaapi_object_unref (surface);
+ return NULL;
+ }
+}
+
+/**
* gst_vaapi_surface_new:
* @display: a #GstVaapiDisplay
* @chroma_type: the surface chroma format
@@ -340,6 +377,18 @@
if (!surface)
return NULL;
+ /* first try a recent version of vaCreateSurface, and later use as
+ * fallback its old version */
+ {
+ GstVideoInfo vi;
+ GstVideoFormat surface_format;
+
+ surface_format = gst_vaapi_video_format_from_chroma (chroma_type);
+ gst_video_info_set_format (&vi, surface_format, width, height);
+
+ if (gst_vaapi_surface_create_full (surface, &vi, 0))
+ return surface;
+ }
if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
goto error;
return surface;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurface.h
^
|
@@ -61,11 +61,17 @@
* @GST_VAAPI_CHROMA_TYPE_YUV422: YUV 4:2:2 chroma format
* @GST_VAAPI_CHROMA_TYPE_YUV444: YUV 4:4:4 chroma format
* @GST_VAAPI_CHROMA_TYPE_YUV411: YUV 4:1:1 chroma format
- * @GST_VAAPI_CHROMA_TYPE_YUV410: YUV 4:1:0 chroma format
* @GST_VAAPI_CHROMA_TYPE_YUV400: YUV 4:0:0 chroma format (grayscale)
- * @GST_VAAPI_CHROMA_TYPE_RGB32: 32-bit RGB chroma format
+ * @GST_VAAPI_CHROMA_TYPE_YUV420_10BPP: YUV 4:2:0 chroma format, 10 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_YUV422_10BPP: YUV 4:2:2 chroma format, 10 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_YUV444_10BPP: YUV 4:4:4 chroma format, 10 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_YUV420_12BPP: YUV 4:2:0 chroma format, 12 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_YUV422_12BPP: YUV 4:2:2 chroma format, 12 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_YUV444_12BPP: YUV 4:4:4 chroma format, 12 bits per channel
* @GST_VAAPI_CHROMA_TYPE_RGB16: 16-bit RGB chroma format
- * @GST_VAAPI_CHROMA_TYPE_YUV420_10BPP: YUV 4:2:0 chroma format, more than 8 bits per channel
+ * @GST_VAAPI_CHROMA_TYPE_RGB32: 32-bit RGB chroma format
+ * @GST_VAAPI_CHROMA_TYPE_RGBP: Planar RGB, 8 bits per colour sample.
+ * @GST_VAAPI_CHROMA_TYPE_RGB32_10BPP: 32-bit RGB chroma format, 10 bits per colour sample
*
* The set of all chroma types for #GstVaapiSurface.
*/
@@ -75,11 +81,17 @@
GST_VAAPI_CHROMA_TYPE_YUV422,
GST_VAAPI_CHROMA_TYPE_YUV444,
GST_VAAPI_CHROMA_TYPE_YUV411,
- GST_VAAPI_CHROMA_TYPE_YUV410,
GST_VAAPI_CHROMA_TYPE_YUV400,
- GST_VAAPI_CHROMA_TYPE_RGB32,
+ GST_VAAPI_CHROMA_TYPE_YUV420_10BPP,
+ GST_VAAPI_CHROMA_TYPE_YUV422_10BPP,
+ GST_VAAPI_CHROMA_TYPE_YUV444_10BPP,
+ GST_VAAPI_CHROMA_TYPE_YUV420_12BPP,
+ GST_VAAPI_CHROMA_TYPE_YUV422_12BPP,
+ GST_VAAPI_CHROMA_TYPE_YUV444_12BPP,
GST_VAAPI_CHROMA_TYPE_RGB16,
- GST_VAAPI_CHROMA_TYPE_YUV420_10BPP
+ GST_VAAPI_CHROMA_TYPE_RGB32,
+ GST_VAAPI_CHROMA_TYPE_RGBP,
+ GST_VAAPI_CHROMA_TYPE_RGB32_10BPP,
} GstVaapiChromaType;
/**
@@ -170,6 +182,10 @@
typedef struct _GstVaapiSurfaceProxy GstVaapiSurfaceProxy;
GstVaapiSurface *
+gst_vaapi_surface_new_from_formats (GstVaapiDisplay * display,
+ GstVaapiChromaType chroma_type, guint width, guint height, GArray * formts);
+
+GstVaapiSurface *
gst_vaapi_surface_new (GstVaapiDisplay * display,
GstVaapiChromaType chroma_type, guint width, guint height);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurface_drm.c
^
|
@@ -36,6 +36,7 @@
if (!image)
goto error_derive_image;
+ /* The proxy takes ownership if the image, even creation failure. */
proxy =
gst_vaapi_buffer_proxy_new_from_object (GST_VAAPI_OBJECT (surface),
image->internal_image.buf, type, gst_vaapi_object_unref, image);
@@ -52,7 +53,6 @@
error_alloc_export_buffer:
{
GST_ERROR ("failed to allocate export buffer proxy");
- gst_vaapi_object_unref (image);
return NULL;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurface_egl.c
^
|
@@ -162,7 +162,7 @@
goto error_convert_surface;
gst_vaapi_object_unref (img_surface);
- gst_vaapi_filter_unref (filter);
+ gst_object_unref (filter);
return out_surface;
/* ERRORS */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurfacepool.c
^
|
@@ -177,7 +177,7 @@
* @height: the desired height, in pixels
*
* Creates a new #GstVaapiVideoPool of #GstVaapiSurface with the specified
- * chroam type and dimensions. The underlying format of the surfaces is
+ * chroma type and dimensions. The underlying format of the surfaces is
* implementation (driver) defined.
*
* Return value: the newly allocated #GstVaapiVideoPool
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapisurfaceproxy.c
^
|
@@ -164,7 +164,7 @@
proxy->parent = NULL;
proxy->destroy_func = NULL;
- proxy->pool = gst_vaapi_video_pool_ref (pool);
+ proxy->pool = gst_vaapi_video_pool_ref (GST_VAAPI_VIDEO_POOL (pool));
proxy->surface = gst_vaapi_video_pool_get_object (proxy->pool);
if (!proxy->surface)
goto error;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapitexture.c
^
|
@@ -34,11 +34,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_texture_ref
-#undef gst_vaapi_texture_unref
-#undef gst_vaapi_texture_replace
-
#define GST_VAAPI_TEXTURE_ORIENTATION_FLAGS \
(GST_VAAPI_TEXTURE_ORIENTATION_FLAG_X_INVERTED | \
GST_VAAPI_TEXTURE_ORIENTATION_FLAG_Y_INVERTED)
@@ -171,7 +166,7 @@
GstVaapiTexture *
gst_vaapi_texture_ref (GstVaapiTexture * texture)
{
- return gst_vaapi_texture_ref_internal (texture);
+ return gst_vaapi_object_ref (GST_VAAPI_OBJECT (texture));
}
/**
@@ -184,7 +179,7 @@
void
gst_vaapi_texture_unref (GstVaapiTexture * texture)
{
- gst_vaapi_texture_unref_internal (texture);
+ gst_vaapi_object_unref (GST_VAAPI_OBJECT (texture));
}
/**
@@ -200,7 +195,8 @@
gst_vaapi_texture_replace (GstVaapiTexture ** old_texture_ptr,
GstVaapiTexture * new_texture)
{
- gst_vaapi_texture_replace_internal (old_texture_ptr, new_texture);
+ gst_vaapi_object_replace ((GstVaapiObject **) (old_texture_ptr),
+ GST_VAAPI_OBJECT (new_texture));
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapitexture_priv.h
^
|
@@ -135,31 +135,6 @@
GstVaapiDisplay * display, GstVaapiID id, guint target, guint format,
guint width, guint height);
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-#define gst_vaapi_texture_ref_internal(texture) \
- ((gpointer)gst_vaapi_object_ref (GST_VAAPI_OBJECT (texture)))
-
-#define gst_vaapi_texture_unref_internal(texture) \
- gst_vaapi_object_unref (GST_VAAPI_OBJECT (texture))
-
-#define gst_vaapi_texture_replace_internal(old_texture_ptr, new_texture) \
- gst_vaapi_object_replace ((GstVaapiObject **)(old_texture_ptr), \
- GST_VAAPI_OBJECT (new_texture))
-
-#undef gst_vaapi_texture_ref
-#define gst_vaapi_texture_ref(texture) \
- gst_vaapi_texture_ref_internal ((texture))
-
-#undef gst_vaapi_texture_unref
-#define gst_vaapi_texture_unref(texture) \
- gst_vaapi_texture_unref_internal ((texture))
-
-#undef gst_vaapi_texture_replace
-#define gst_vaapi_texture_replace(old_texture_ptr, new_texture) \
- gst_vaapi_texture_replace_internal ((old_texture_ptr), (new_texture))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_TEXTURE_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils.c
^
|
@@ -34,12 +34,12 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-#define CONCAT(a, b) CONCAT_(a, b)
-#define CONCAT_(a, b) a##b
-#define STRINGIFY(x) STRINGIFY_(x)
-#define STRINGIFY_(x) #x
-#define STRCASEP(p, x) STRCASE(CONCAT(p, x))
-#define STRCASE(x) case x: return STRINGIFY(x)
+/* string case an enum */
+#define STRCASEP(p, x) STRCASE(G_PASTE(p, x))
+#define STRCASE(x) case x: return G_STRINGIFY(x)
+
+/* string case a macro */
+#define STRCASEM(p, x) case G_PASTE(p, x): return G_STRINGIFY(x)
#if VA_CHECK_VERSION (0,40,0)
static gchar *
@@ -214,38 +214,30 @@
MAP (MPEG4Simple);
MAP (MPEG4AdvancedSimple);
MAP (MPEG4Main);
-#if VA_CHECK_VERSION(0,32,0)
MAP (JPEGBaseline);
MAP (H263Baseline);
MAP (H264ConstrainedBaseline);
-#endif
#if !VA_CHECK_VERSION(1,0,0)
MAP (H264Baseline);
#endif
MAP (H264Main);
MAP (H264High);
-#if VA_CHECK_VERSION(0,35,2)
MAP (H264MultiviewHigh);
MAP (H264StereoHigh);
+#if VA_CHECK_VERSION(1,2,0)
+ MAP (HEVCMain422_10);
+ MAP (HEVCMain444);
#endif
-#if VA_CHECK_VERSION(0,37,1)
MAP (HEVCMain);
MAP (HEVCMain10);
-#endif
MAP (VC1Simple);
MAP (VC1Main);
MAP (VC1Advanced);
-#if VA_CHECK_VERSION(0,35,0)
MAP (VP8Version0_3);
-#endif
-#if VA_CHECK_VERSION(0,37,0)
MAP (VP9Profile0);
-#endif
-#if VA_CHECK_VERSION(0,39,0)
MAP (VP9Profile1);
MAP (VP9Profile2);
MAP (VP9Profile3);
-#endif
#undef MAP
default:
break;
@@ -284,17 +276,8 @@
MAP (Hue);
MAP (Saturation);
MAP (BackgroundColor);
-#if !VA_CHECK_VERSION(0,34,0)
- MAP (DirectSurface);
-#endif
MAP (Rotation);
MAP (OutofLoopDeblock);
-#if VA_CHECK_VERSION(0,31,1) && !VA_CHECK_VERSION(0,34,0)
- MAP (BLEBlackMode);
- MAP (BLEWhiteMode);
- MAP (BlueStretch);
- MAP (SkinColorCorrection);
-#endif
MAP (CSCMatrix);
MAP (BlendColor);
MAP (OverlayAutoPaintColorKey);
@@ -315,18 +298,22 @@
{
switch (chroma_format) {
#define MAP(value) \
- STRCASEP(VA_RT_FORMAT_, value)
+ STRCASEM(VA_RT_FORMAT_, value)
MAP (YUV420);
MAP (YUV422);
MAP (YUV444);
-#if VA_CHECK_VERSION(0,34,0)
MAP (YUV400);
MAP (RGB16);
MAP (RGB32);
MAP (RGBP);
-#endif
-#if VA_CHECK_VERSION(0,38,1)
MAP (YUV420_10BPP);
+#if VA_CHECK_VERSION(1,2,0)
+ MAP (YUV422_10);
+ MAP (YUV444_10);
+ MAP (YUV420_12);
+ MAP (YUV422_12);
+ MAP (YUV444_12);
+ MAP (RGB32_10);
#endif
#undef MAP
default:
@@ -385,7 +372,6 @@
case VA_RT_FORMAT_YUV444:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
break;
-#if VA_CHECK_VERSION(0,34,0)
case VA_RT_FORMAT_YUV411:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV411;
break;
@@ -398,11 +384,31 @@
case VA_RT_FORMAT_RGB16:
chroma_type = GST_VAAPI_CHROMA_TYPE_RGB16;
break;
-#endif
-#if VA_CHECK_VERSION(0,38,1)
+ case VA_RT_FORMAT_RGBP:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_RGBP;
+ break;
case VA_RT_FORMAT_YUV420_10BPP:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
break;
+#if VA_CHECK_VERSION(1,2,0)
+ case VA_RT_FORMAT_YUV422_10:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_10BPP;
+ break;
+ case VA_RT_FORMAT_YUV444_10:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444_10BPP;
+ break;
+ case VA_RT_FORMAT_YUV420_12:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_12BPP;
+ break;
+ case VA_RT_FORMAT_YUV422_12:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_12BPP;
+ break;
+ case VA_RT_FORMAT_YUV444_12:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444_12BPP;
+ break;
+ case VA_RT_FORMAT_RGB32_10:
+ chroma_type = GST_VAAPI_CHROMA_TYPE_RGB32_10BPP;
+ break;
#endif
default:
chroma_type = 0;
@@ -433,7 +439,6 @@
case GST_VAAPI_CHROMA_TYPE_YUV444:
format = VA_RT_FORMAT_YUV444;
break;
-#if VA_CHECK_VERSION(0,34,0)
case GST_VAAPI_CHROMA_TYPE_YUV411:
format = VA_RT_FORMAT_YUV411;
break;
@@ -446,11 +451,31 @@
case GST_VAAPI_CHROMA_TYPE_RGB16:
format = VA_RT_FORMAT_RGB16;
break;
-#endif
-#if VA_CHECK_VERSION(0,38,1)
+ case GST_VAAPI_CHROMA_TYPE_RGBP:
+ format = VA_RT_FORMAT_RGBP;
+ break;
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
format = VA_RT_FORMAT_YUV420_10BPP;
break;
+#if VA_CHECK_VERSION(1,2,0)
+ case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
+ format = VA_RT_FORMAT_YUV422_10;
+ break;
+ case GST_VAAPI_CHROMA_TYPE_YUV444_10BPP:
+ format = VA_RT_FORMAT_YUV444_10;
+ break;
+ case GST_VAAPI_CHROMA_TYPE_YUV420_12BPP:
+ format = VA_RT_FORMAT_YUV420_12;
+ break;
+ case GST_VAAPI_CHROMA_TYPE_YUV422_12BPP:
+ format = VA_RT_FORMAT_YUV422_12;
+ break;
+ case GST_VAAPI_CHROMA_TYPE_YUV444_12BPP:
+ format = VA_RT_FORMAT_YUV444_12;
+ break;
+ case GST_VAAPI_CHROMA_TYPE_RGB32_10BPP:
+ format = VA_RT_FORMAT_RGB32_10;
+ break;
#endif
default:
format = 0;
@@ -625,10 +650,8 @@
}
/* Check for encoder status */
-#if VA_CHECK_VERSION(0,30,0)
if (va_flags & VASurfaceSkipped)
flags |= GST_VAAPI_SURFACE_STATUS_SKIPPED;
-#endif
return flags;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils.h
^
|
@@ -25,7 +25,6 @@
#ifndef GST_VAAPI_UTILS_H
#define GST_VAAPI_UTILS_H
-#include "config.h"
#include <glib.h>
#include <va/va.h>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_core.c
^
|
@@ -92,7 +92,6 @@
GArray *
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
{
-#if VA_CHECK_VERSION(0,34,0)
VASurfaceAttrib *surface_attribs = NULL;
guint i, num_surface_attribs = 0;
VAStatus va_status;
@@ -152,6 +151,5 @@
{
g_free (surface_attribs);
}
-#endif
return NULL;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_egl.c
^
|
@@ -573,6 +573,7 @@
EGLint major_version, minor_version;
gchar **gl_apis, **gl_api;
+ g_mutex_lock (&display->mutex);
if (!display->base.is_wrapped) {
gl_display = display->base.handle.p =
egl_get_display_from_native (display->base.handle.u,
@@ -609,7 +610,9 @@
goto error;
display->base.is_valid = TRUE;
+ display->created = TRUE;
g_cond_broadcast (&display->gl_thread_ready);
+ g_mutex_unlock (&display->mutex);
while (!display->gl_thread_cancel) {
EglMessage *const msg =
@@ -624,17 +627,20 @@
egl_object_unref (msg);
}
}
+ g_mutex_lock (&display->mutex);
done:
if (gl_display != EGL_NO_DISPLAY && !display->base.is_wrapped)
eglTerminate (gl_display);
display->base.handle.p = NULL;
g_cond_broadcast (&display->gl_thread_ready);
+ g_mutex_unlock (&display->mutex);
return NULL;
/* ERRORS */
error:
{
+ display->created = TRUE;
display->base.is_valid = FALSE;
goto done;
}
@@ -656,7 +662,8 @@
return FALSE;
g_mutex_lock (&display->mutex);
- g_cond_wait (&display->gl_thread_ready, &display->mutex);
+ while (!display->created)
+ g_cond_wait (&display->gl_thread_ready, &display->mutex);
g_mutex_unlock (&display->mutex);
return display->base.is_valid;
}
@@ -1124,8 +1131,6 @@
if (!success)
return NULL;
- if (args.context)
- args.context->base.is_wrapped = TRUE;
return args.context;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_egl.h
^
|
@@ -122,6 +122,7 @@
GCond gl_thread_ready;
volatile gboolean gl_thread_cancel;
GAsyncQueue *gl_queue;
+ gboolean created;
};
struct egl_config_s
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_glx.c
^
|
@@ -24,7 +24,6 @@
#define _GNU_SOURCE 1 /* RTLD_DEFAULT */
#include "sysdeps.h"
-#include <string.h>
#include <math.h>
#include <dlfcn.h>
#include "gstvaapiutils_glx.h"
@@ -853,8 +852,6 @@
/* Initialize FBConfig attributes */
for (attr = fbconfig_attrs; *attr != GL_NONE; attr += 2);
- *attr++ = GLX_DEPTH_SIZE;
- *attr++ = wattr.depth;
if (wattr.depth == 32) {
*attr++ = GLX_ALPHA_SIZE;
*attr++ = 8;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_h264.c
^
|
@@ -25,6 +25,9 @@
#include "gstvaapicompat.h"
#include "gstvaapiutils_h264_priv.h"
+#define DEBUG 1
+#include "gstvaapidebug.h"
+
struct map
{
guint value;
@@ -70,6 +73,9 @@
{ GST_VAAPI_LEVEL_H264_L5, "5" },
{ GST_VAAPI_LEVEL_H264_L5_1, "5.1" },
{ GST_VAAPI_LEVEL_H264_L5_2, "5.2" },
+ { GST_VAAPI_LEVEL_H264_L6, "6" },
+ { GST_VAAPI_LEVEL_H264_L6_1, "6.1" },
+ { GST_VAAPI_LEVEL_H264_L6_2, "6.2" },
{ 0, NULL }
/* *INDENT-ON* */
};
@@ -95,6 +101,9 @@
{ GST_VAAPI_LEVEL_H264_L5, 50, 589824, 22080, 110400, 135000, 135000, 2 },
{ GST_VAAPI_LEVEL_H264_L5_1, 51, 983040, 36864, 184320, 240000, 240000, 2 },
{ GST_VAAPI_LEVEL_H264_L5_2, 52, 2073600, 36864, 184320, 240000, 240000, 2 },
+ { GST_VAAPI_LEVEL_H264_L6, 60, 4177920, 139264, 696320, 240000, 240000, 2 },
+ { GST_VAAPI_LEVEL_H264_L6_1, 61, 8355840, 139264, 696320, 480000, 480000, 2 },
+ { GST_VAAPI_LEVEL_H264_L6_2, 62, 16711680, 139264, 696320, 800000, 800000, 2 },
{ 0, }
};
/* *INDENT-ON* */
@@ -179,7 +188,7 @@
profile = GST_VAAPI_PROFILE_H264_STEREO_HIGH;
break;
default:
- g_debug ("unsupported profile_idc value");
+ GST_DEBUG ("unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;
break;
}
@@ -228,7 +237,7 @@
profile_idc = GST_H264_PROFILE_STEREO_HIGH;
break;
default:
- g_debug ("unsupported GstVaapiProfile value");
+ GST_DEBUG ("unsupported GstVaapiProfile value");
profile_idc = 0;
break;
}
@@ -268,7 +277,7 @@
if (llp->level_idc == level_idc)
return llp->level;
}
- g_debug ("unsupported level_idc value");
+ GST_DEBUG ("unsupported level_idc value");
return (GstVaapiLevelH264) 0;
}
@@ -322,7 +331,7 @@
const gchar *
gst_vaapi_utils_h264_get_level_string (GstVaapiLevelH264 level)
{
- if (level < GST_VAAPI_LEVEL_H264_L1 || level > GST_VAAPI_LEVEL_H264_L5_2)
+ if (level < GST_VAAPI_LEVEL_H264_L1 || level > GST_VAAPI_LEVEL_H264_L6_2)
return NULL;
return gst_vaapi_h264_level_map[level - GST_VAAPI_LEVEL_H264_L1].name;
}
@@ -331,7 +340,7 @@
const GstVaapiH264LevelLimits *
gst_vaapi_utils_h264_get_level_limits (GstVaapiLevelH264 level)
{
- if (level < GST_VAAPI_LEVEL_H264_L1 || level > GST_VAAPI_LEVEL_H264_L5_2)
+ if (level < GST_VAAPI_LEVEL_H264_L1 || level > GST_VAAPI_LEVEL_H264_L6_2)
return NULL;
return &gst_vaapi_h264_level_limits[level - GST_VAAPI_LEVEL_H264_L1];
}
@@ -365,7 +374,7 @@
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
break;
default:
- g_debug ("unsupported chroma_format_idc value");
+ GST_DEBUG ("unsupported chroma_format_idc value");
chroma_type = (GstVaapiChromaType) 0;
break;
}
@@ -392,7 +401,7 @@
chroma_format_idc = 3;
break;
default:
- g_debug ("unsupported GstVaapiChromaType value");
+ GST_DEBUG ("unsupported GstVaapiChromaType value");
chroma_format_idc = 1;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_h264.h
^
|
@@ -45,6 +45,9 @@
* @GST_VAAPI_LEVEL_H264_L5: H.264 level 5.
* @GST_VAAPI_LEVEL_H264_L5_1: H.264 level 5.1.
* @GST_VAAPI_LEVEL_H264_L5_2: H.264 level 5.2.
+ * @GST_VAAPI_LEVEL_H264_L6: H.264 level 6.
+ * @GST_VAAPI_LEVEL_H264_L6_1: H.264 level 6.1.
+ * @GST_VAAPI_LEVEL_H264_L6_2: H.264 level 6.2.
*
* The set of all levels for #GstVaapiLevelH264.
*/
@@ -66,6 +69,9 @@
GST_VAAPI_LEVEL_H264_L5,
GST_VAAPI_LEVEL_H264_L5_1,
GST_VAAPI_LEVEL_H264_L5_2,
+ GST_VAAPI_LEVEL_H264_L6,
+ GST_VAAPI_LEVEL_H264_L6_1,
+ GST_VAAPI_LEVEL_H264_L6_2,
} GstVaapiLevelH264;
/* Returns a relative score for the supplied GstVaapiProfile */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_h265.c
^
|
@@ -25,6 +25,9 @@
#include "gstvaapicompat.h"
#include "gstvaapiutils_h265_priv.h"
+#define DEBUG 1
+#include "gstvaapidebug.h"
+
struct map
{
guint value;
@@ -132,22 +135,57 @@
/** Returns GstVaapiProfile from H.265 profile_idc value */
GstVaapiProfile
-gst_vaapi_utils_h265_get_profile (guint8 profile_idc)
+gst_vaapi_utils_h265_get_profile (GstH265SPS * sps)
{
GstVaapiProfile profile;
- switch (profile_idc) {
- case GST_H265_PROFILE_MAIN:
+ switch (sps->profile_tier_level.profile_idc) {
+ case GST_H265_PROFILE_IDC_MAIN:
profile = GST_VAAPI_PROFILE_H265_MAIN;
break;
- case GST_H265_PROFILE_MAIN_10:
+ case GST_H265_PROFILE_IDC_MAIN_10:
profile = GST_VAAPI_PROFILE_H265_MAIN10;
break;
- case GST_H265_PROFILE_MAIN_STILL_PICTURE:
+ case GST_H265_PROFILE_IDC_MAIN_STILL_PICTURE:
profile = GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE;
break;
+ case GST_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSION:
+ if (sps->profile_tier_level.max_12bit_constraint_flag == 1
+ && sps->profile_tier_level.max_10bit_constraint_flag == 1
+ && sps->profile_tier_level.max_8bit_constraint_flag == 0
+ && sps->profile_tier_level.max_422chroma_constraint_flag == 1
+ && sps->profile_tier_level.max_420chroma_constraint_flag == 0
+ && sps->profile_tier_level.max_monochrome_constraint_flag == 0
+ && sps->profile_tier_level.intra_constraint_flag == 0
+ && sps->profile_tier_level.one_picture_only_constraint_flag == 0
+ && sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
+ profile = GST_VAAPI_PROFILE_H265_MAIN_422_10;
+ break;
+ } else if (sps->profile_tier_level.max_12bit_constraint_flag == 1
+ && sps->profile_tier_level.max_10bit_constraint_flag == 1
+ && sps->profile_tier_level.max_8bit_constraint_flag == 1
+ && sps->profile_tier_level.max_422chroma_constraint_flag == 0
+ && sps->profile_tier_level.max_420chroma_constraint_flag == 0
+ && sps->profile_tier_level.max_monochrome_constraint_flag == 0
+ && sps->profile_tier_level.intra_constraint_flag == 0
+ && sps->profile_tier_level.one_picture_only_constraint_flag == 0
+ && sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
+ profile = GST_VAAPI_PROFILE_H265_MAIN_444;
+ break;
+ } else if (sps->profile_tier_level.max_12bit_constraint_flag == 1
+ && sps->profile_tier_level.max_10bit_constraint_flag == 1
+ && sps->profile_tier_level.max_8bit_constraint_flag == 0
+ && sps->profile_tier_level.max_422chroma_constraint_flag == 0
+ && sps->profile_tier_level.max_420chroma_constraint_flag == 0
+ && sps->profile_tier_level.max_monochrome_constraint_flag == 0
+ && sps->profile_tier_level.intra_constraint_flag == 0
+ && sps->profile_tier_level.one_picture_only_constraint_flag == 0
+ && sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
+ profile = GST_VAAPI_PROFILE_H265_MAIN_444_10;
+ break;
+ }
default:
- g_debug ("unsupported profile_idc value");
+ GST_DEBUG ("unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;
break;
}
@@ -170,8 +208,14 @@
case GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE:
profile_idc = GST_H265_PROFILE_MAIN_STILL_PICTURE;
break;
+ case GST_VAAPI_PROFILE_H265_MAIN_422_10:
+ profile_idc = GST_H265_PROFILE_MAIN_422_10;
+ break;
+ case GST_VAAPI_PROFILE_H265_MAIN_444:
+ profile_idc = GST_H265_PROFILE_MAIN_444;
+ break;
default:
- g_debug ("unsupported GstVaapiProfile value");
+ GST_DEBUG ("unsupported GstVaapiProfile value");
profile_idc = 0;
break;
}
@@ -207,7 +251,7 @@
if (llp->level_idc == level_idc)
return llp->level;
}
- g_debug ("unsupported level_idc value");
+ GST_DEBUG ("unsupported level_idc value");
return (GstVaapiLevelH265) 0;
}
@@ -298,13 +342,19 @@
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
break;
case 2:
- chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422;
+ if (luma_bit_depth == 8)
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422;
+ else if (luma_bit_depth > 8)
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_10BPP;
break;
case 3:
- chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
+ if (luma_bit_depth == 8)
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
+ else if (luma_bit_depth > 8)
+ chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444_10BPP;
break;
default:
- g_debug ("unsupported chroma_format_idc value");
+ GST_DEBUG ("unsupported chroma_format_idc value");
chroma_type = (GstVaapiChromaType) 0;
break;
}
@@ -332,7 +382,7 @@
chroma_format_idc = 3;
break;
default:
- g_debug ("unsupported GstVaapiChromaType value");
+ GST_DEBUG ("unsupported GstVaapiChromaType value");
chroma_format_idc = 1;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_h265_priv.h
^
|
@@ -63,7 +63,7 @@
/* Returns GstVaapiProfile from H.265 profile_idc value */
G_GNUC_INTERNAL
GstVaapiProfile
-gst_vaapi_utils_h265_get_profile (guint8 profile_idc);
+gst_vaapi_utils_h265_get_profile (GstH265SPS * sps);
/* Returns H.265 profile_idc value from GstVaapiProfile */
G_GNUC_INTERNAL
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiutils_mpeg2.c
^
|
@@ -25,6 +25,9 @@
#include "gstvaapicompat.h"
#include "gstvaapiutils_mpeg2_priv.h"
+#define DEBUG 1
+#include "gstvaapidebug.h"
+
struct map
{
guint value;
@@ -124,7 +127,7 @@
profile = GST_VAAPI_PROFILE_MPEG2_HIGH;
break;
default:
- g_debug ("unsupported profile_idc value");
+ GST_DEBUG ("unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;
break;
}
@@ -148,7 +151,7 @@
profile_idc = GST_MPEG_VIDEO_PROFILE_HIGH;
break;
default:
- g_debug ("unsupported GstVaapiProfile value");
+ GST_DEBUG ("unsupported GstVaapiProfile value");
profile_idc = 0;
break;
}
@@ -185,7 +188,7 @@
if (llp->level_idc == level_idc)
return llp->level;
}
- g_debug ("unsupported level_idc value");
+ GST_DEBUG ("unsupported level_idc value");
return (GstVaapiLevelMPEG2) 0;
}
@@ -253,7 +256,7 @@
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
break;
default:
- g_debug ("unsupported chroma_format_idc value");
+ GST_DEBUG ("unsupported chroma_format_idc value");
chroma_type = (GstVaapiChromaType) 0;
break;
}
@@ -277,7 +280,7 @@
chroma_format_idc = GST_MPEG_VIDEO_CHROMA_444;
break;
default:
- g_debug ("unsupported GstVaapiChromaType value");
+ GST_DEBUG ("unsupported GstVaapiChromaType value");
chroma_format_idc = 1;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapivalue.c
^
|
@@ -31,6 +31,9 @@
#include <gobject/gvaluecollector.h>
#include "gstvaapivalue.h"
+#define DEBUG 1
+#include "gstvaapidebug.h"
+
static gpointer
default_copy_func (gpointer data)
{
@@ -185,7 +188,7 @@
/* ERRORS */
error_invalid_num_values:
{
- g_error ("invalid number of static values for `%s'", subset->type_name);
+ GST_ERROR ("invalid number of static values for `%s'", subset->type_name);
return FALSE;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapivideopool.c
^
|
@@ -35,11 +35,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_video_pool_ref
-#undef gst_vaapi_video_pool_unref
-#undef gst_vaapi_video_pool_replace
-
#define GST_VAAPI_VIDEO_POOL_GET_CLASS(obj) \
gst_vaapi_video_pool_get_class (GST_VAAPI_VIDEO_POOL (obj))
@@ -60,7 +55,7 @@
GstVaapiVideoPoolObjectType object_type)
{
pool->object_type = object_type;
- pool->display = gst_vaapi_display_ref (display);
+ pool->display = gst_object_ref (display);
pool->used_objects = NULL;
pool->used_count = 0;
pool->capacity = 0;
@@ -90,7 +85,8 @@
GstVaapiVideoPool *
gst_vaapi_video_pool_ref (GstVaapiVideoPool * pool)
{
- return gst_vaapi_video_pool_ref_internal (pool);
+ return (GstVaapiVideoPool *)
+ gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (pool));
}
/**
@@ -103,7 +99,7 @@
void
gst_vaapi_video_pool_unref (GstVaapiVideoPool * pool)
{
- gst_vaapi_video_pool_unref_internal (pool);
+ gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (pool));
}
/**
@@ -119,7 +115,8 @@
gst_vaapi_video_pool_replace (GstVaapiVideoPool ** old_pool_ptr,
GstVaapiVideoPool * new_pool)
{
- gst_vaapi_video_pool_replace_internal (old_pool_ptr, new_pool);
+ gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) (old_pool_ptr),
+ GST_VAAPI_MINI_OBJECT (new_pool));
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapivideopool_priv.h
^
|
@@ -79,30 +79,6 @@
void
gst_vaapi_video_pool_finalize (GstVaapiVideoPool * pool);
-/* Internal aliases */
-
-#define gst_vaapi_video_pool_ref_internal(pool) \
- ((gpointer)gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (pool)))
-
-#define gst_vaapi_video_pool_unref_internal(pool) \
- gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (pool))
-
-#define gst_vaapi_video_pool_replace_internal(old_pool_ptr, new_pool) \
- gst_vaapi_mini_object_replace ((GstVaapiMiniObject **)(old_pool_ptr), \
- GST_VAAPI_MINI_OBJECT (new_pool))
-
-#undef gst_vaapi_video_pool_ref
-#define gst_vaapi_video_pool_ref(pool) \
- gst_vaapi_video_pool_ref_internal ((pool))
-
-#undef gst_vaapi_video_pool_unref
-#define gst_vaapi_video_pool_unref(pool) \
- gst_vaapi_video_pool_unref_internal ((pool))
-
-#undef gst_vaapi_video_pool_replace
-#define gst_vaapi_video_pool_replace(old_pool_ptr, new_pool) \
- gst_vaapi_video_pool_replace_internal ((old_pool_ptr), (new_pool))
-
G_END_DECLS
#endif /* GST_VAAPI_VIDEO_POOL_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow.c
^
|
@@ -33,13 +33,22 @@
#include "gstvaapidisplay_priv.h"
#include "gstvaapisurface_priv.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
+GST_DEBUG_CATEGORY (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
-/* Ensure those symbols are actually defined in the resulting libraries */
-#undef gst_vaapi_window_ref
-#undef gst_vaapi_window_unref
-#undef gst_vaapi_window_replace
+#define _do_init \
+ GST_DEBUG_CATEGORY_INIT (gst_debug_vaapi_window, "vaapiwindow", 0, \
+ "VA-API Window");
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVaapiWindow, gst_vaapi_window,
+ GST_TYPE_OBJECT, _do_init);
+
+enum
+{
+ PROP_DISPLAY = 1,
+ N_PROPERTIES
+};
+static GParamSpec *g_properties[N_PROPERTIES] = { NULL, };
static void
gst_vaapi_window_ensure_size (GstVaapiWindow * window)
@@ -60,7 +69,7 @@
static gboolean
ensure_filter (GstVaapiWindow * window)
{
- GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (window);
+ GstVaapiDisplay *const display = GST_VAAPI_WINDOW_DISPLAY (window);
/* Ensure VPP pipeline is built */
if (window->filter)
@@ -92,7 +101,7 @@
static gboolean
ensure_filter_surface_pool (GstVaapiWindow * window)
{
- GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (window);
+ GstVaapiDisplay *const display = GST_VAAPI_WINDOW_DISPLAY (window);
if (window->surface_pool)
goto ensure_filter;
@@ -114,7 +123,7 @@
static gboolean
gst_vaapi_window_create (GstVaapiWindow * window, guint width, guint height)
{
- gst_vaapi_display_get_size (GST_VAAPI_OBJECT_DISPLAY (window),
+ gst_vaapi_display_get_size (GST_VAAPI_WINDOW_DISPLAY (window),
&window->display_width, &window->display_height);
if (!GST_VAAPI_WINDOW_GET_CLASS (window)->create (window, &width, &height))
@@ -129,24 +138,82 @@
}
static void
-gst_vaapi_window_finalize (GstVaapiWindow * window)
+gst_vaapi_window_finalize (GObject * object)
{
+ GstVaapiWindow *const window = GST_VAAPI_WINDOW (object);
+
gst_vaapi_video_pool_replace (&window->surface_pool, NULL);
gst_vaapi_filter_replace (&window->filter, NULL);
+ gst_vaapi_display_replace (&window->display, NULL);
+
+ G_OBJECT_CLASS (gst_vaapi_window_parent_class)->finalize (object);
}
-void
+static void
+gst_vaapi_window_set_property (GObject * object, guint property_id,
+ const GValue * value, GParamSpec * pspec)
+{
+ GstVaapiWindow *const window = GST_VAAPI_WINDOW (object);
+
+ switch (property_id) {
+ case PROP_DISPLAY:
+ g_assert (window->display == NULL);
+ window->display = g_value_dup_object (value);
+ g_assert (window->display != NULL);
+ window->has_vpp = GST_VAAPI_DISPLAY_HAS_VPP (window->display);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gst_vaapi_window_get_property (GObject * object, guint property_id,
+ GValue * value, GParamSpec * pspec)
+{
+ GstVaapiWindow *const window = GST_VAAPI_WINDOW (object);
+
+ switch (property_id) {
+ case PROP_DISPLAY:
+ g_value_set_object (value, window->display);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
gst_vaapi_window_class_init (GstVaapiWindowClass * klass)
{
- GstVaapiObjectClass *const object_class = GST_VAAPI_OBJECT_CLASS (klass);
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
+
+ object_class->set_property = gst_vaapi_window_set_property;
+ object_class->get_property = gst_vaapi_window_get_property;
+ object_class->finalize = gst_vaapi_window_finalize;
+
+ /**
+ * GstVaapiWindow:display:
+ *
+ * #GstVaapiDisplay to be used.
+ */
+ g_properties[PROP_DISPLAY] =
+ g_param_spec_object ("display", "Gst VA-API Display",
+ "The VA-API display object to use", GST_TYPE_VAAPI_DISPLAY,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME);
- object_class->finalize = (GstVaapiObjectFinalizeFunc)
- gst_vaapi_window_finalize;
+ g_object_class_install_properties (object_class, N_PROPERTIES, g_properties);
+}
+
+static void
+gst_vaapi_window_init (GstVaapiWindow * window)
+{
}
GstVaapiWindow *
-gst_vaapi_window_new_internal (const GstVaapiWindowClass * window_class,
- GstVaapiDisplay * display, GstVaapiID id, guint width, guint height)
+gst_vaapi_window_new_internal (GType type, GstVaapiDisplay * display,
+ GstVaapiID id, guint width, guint height)
{
GstVaapiWindow *window;
@@ -158,24 +225,25 @@
g_return_val_if_fail (height > 0, NULL);
}
- window = gst_vaapi_object_new (GST_VAAPI_OBJECT_CLASS (window_class),
- display);
+ window = g_object_new (type, "display", display, NULL);
if (!window)
return NULL;
window->use_foreign_window = id != GST_VAAPI_ID_INVALID;
- GST_VAAPI_OBJECT_ID (window) = window->use_foreign_window ? id : 0;
- window->has_vpp =
- GST_VAAPI_DISPLAY_HAS_VPP (GST_VAAPI_OBJECT_DISPLAY (window));
+ GST_VAAPI_WINDOW_ID (window) = window->use_foreign_window ? id : 0;
+
+ GST_DEBUG_OBJECT (window, "new window with id = 0x%08" G_GSIZE_MODIFIER
+ "x and size %ux%u", id, width, height);
if (!gst_vaapi_window_create (window, width, height))
goto error;
+
return window;
/* ERRORS */
error:
{
- gst_vaapi_window_unref_internal (window);
+ gst_object_unref (window);
return NULL;
}
}
@@ -239,7 +307,7 @@
{
GstVaapiDisplayClass *dpy_class;
- g_return_val_if_fail (display != NULL, NULL);
+ g_return_val_if_fail (GST_VAAPI_IS_DISPLAY (display), NULL);
dpy_class = GST_VAAPI_DISPLAY_GET_CLASS (display);
if (G_UNLIKELY (!dpy_class->create_window))
@@ -249,33 +317,6 @@
}
/**
- * gst_vaapi_window_ref:
- * @window: a #GstVaapiWindow
- *
- * Atomically increases the reference count of the given @window by one.
- *
- * Returns: The same @window argument
- */
-GstVaapiWindow *
-gst_vaapi_window_ref (GstVaapiWindow * window)
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow.h
^
|
@@ -25,29 +25,28 @@
#ifndef GST_VAAPI_WINDOW_H
#define GST_VAAPI_WINDOW_H
-#include <gst/video/gstvideosink.h>
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapitypes.h>
-#include <gst/vaapi/gstvaapiobject.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapisurface.h>
#include <gst/vaapi/gstvaapipixmap.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW (gst_vaapi_window_get_type ())
#define GST_VAAPI_WINDOW(obj) \
- ((GstVaapiWindow *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW, GstVaapiWindow))
+#define GST_VAAPI_IS_WINDOW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW))
typedef struct _GstVaapiWindow GstVaapiWindow;
typedef struct _GstVaapiWindowClass GstVaapiWindowClass;
-GstVaapiWindow *
-gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height);
+GType
+gst_vaapi_window_get_type (void) G_GNUC_CONST;
GstVaapiWindow *
-gst_vaapi_window_ref (GstVaapiWindow * window);
-
-void
-gst_vaapi_window_unref (GstVaapiWindow * window);
+gst_vaapi_window_new (GstVaapiDisplay * display, guint width, guint height);
void
gst_vaapi_window_replace (GstVaapiWindow ** old_window_ptr,
@@ -105,6 +104,10 @@
gboolean
gst_vaapi_window_unblock_cancel (GstVaapiWindow * window);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindow, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_drm.c
^
|
@@ -30,8 +30,8 @@
#include "gstvaapiwindow_priv.h"
#include "gstvaapidisplay_drm_priv.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
+GST_DEBUG_CATEGORY_EXTERN (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
typedef struct _GstVaapiWindowDRMClass GstVaapiWindowDRMClass;
@@ -57,6 +57,8 @@
GstVaapiWindowClass parent_instance;
};
+G_DEFINE_TYPE (GstVaapiWindowDRM, gst_vaapi_window_drm, GST_TYPE_VAAPI_WINDOW);
+
static gboolean
gst_vaapi_window_drm_show (GstVaapiWindow * window)
{
@@ -91,7 +93,7 @@
return TRUE;
}
-void
+static void
gst_vaapi_window_drm_class_init (GstVaapiWindowDRMClass * klass)
{
GstVaapiWindowClass *const window_class = GST_VAAPI_WINDOW_CLASS (klass);
@@ -104,13 +106,10 @@
}
static void
-gst_vaapi_window_drm_finalize (GstVaapiWindowDRM * window)
+gst_vaapi_window_drm_init (GstVaapiWindowDRM * window)
{
}
-GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE (GstVaapiWindowDRM,
- gst_vaapi_window_drm, gst_vaapi_window_drm_class_init (&g_class));
-
/**
* gst_vaapi_window_drm_new:
* @display: a #GstVaapiDisplay
@@ -132,12 +131,8 @@
GstVaapiWindow *
gst_vaapi_window_drm_new (GstVaapiDisplay * display, guint width, guint height)
{
- GST_DEBUG ("new window, size %ux%u", width, height);
-
g_return_val_if_fail (GST_VAAPI_IS_DISPLAY_DRM (display), NULL);
- return
- gst_vaapi_window_new_internal (GST_VAAPI_WINDOW_CLASS
- (gst_vaapi_window_drm_class ()), display, GST_VAAPI_ID_INVALID, width,
- height);
+ return gst_vaapi_window_new_internal (GST_TYPE_VAAPI_WINDOW_DRM, display,
+ GST_VAAPI_ID_INVALID, width, height);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_drm.h
^
|
@@ -23,19 +23,30 @@
#ifndef GST_VAAPI_WINDOW_DRM_H
#define GST_VAAPI_WINDOW_DRM_H
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_DRM (gst_vaapi_window_drm_get_type ())
#define GST_VAAPI_WINDOW_DRM(obj) \
- ((GstVaapiWindowDRM *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_DRM, GstVaapiWindowDRM))
+#define GST_VAAPI_IS_WINDOW_DRM(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_DRM))
typedef struct _GstVaapiWindowDRM GstVaapiWindowDRM;
+GType
+gst_vaapi_window_drm_get_type (void) G_GNUC_CONST;
+
GstVaapiWindow *
gst_vaapi_window_drm_new (GstVaapiDisplay * display, guint width, guint height);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowDRM, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_DRM_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_egl.c
^
|
@@ -32,16 +32,18 @@
#include "gstvaapitexture_priv.h"
#include "gstvaapidisplay_egl_priv.h"
-#define GST_VAAPI_WINDOW_EGL(obj) \
- ((GstVaapiWindowEGL *)(obj))
+GST_DEBUG_CATEGORY_EXTERN (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
-#define GST_VAAPI_WINDOW_EGL_CLASS(klass) \
- ((GstVaapiWindowEGLClass *)(klass))
+#define GST_VAAPI_WINDOW_EGL_CAST(obj) \
+ ((GstVaapiWindowEGL *)(obj))
+
+#define GST_VAAPI_WINDOW_EGL_GET_PROXY(obj) \
+ (GST_VAAPI_WINDOW_EGL_CAST(obj)->window)
#define GST_VAAPI_WINDOW_EGL_GET_CLASS(obj) \
- GST_VAAPI_WINDOW_EGL_CLASS (GST_VAAPI_WINDOW_GET_CLASS (obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW_EGL, GstVaapiWindowEGLClass))
-typedef struct _GstVaapiWindowEGL GstVaapiWindowEGL;
typedef struct _GstVaapiWindowEGLClass GstVaapiWindowEGLClass;
enum
@@ -123,6 +125,8 @@
"} \n";
/* *IDENT-ON* */
+G_DEFINE_TYPE (GstVaapiWindowEGL, gst_vaapi_window_egl, GST_TYPE_VAAPI_WINDOW);
+
static gboolean
ensure_texture (GstVaapiWindowEGL * window, guint width, guint height)
{
@@ -133,7 +137,7 @@
GST_VAAPI_TEXTURE_HEIGHT (window->texture) == height)
return TRUE;
- texture = gst_vaapi_texture_egl_new (GST_VAAPI_OBJECT_DISPLAY (window),
+ texture = gst_vaapi_texture_egl_new (GST_VAAPI_WINDOW_DISPLAY (window),
GL_TEXTURE_2D, GL_RGBA, width, height);
gst_vaapi_texture_replace (&window->texture, texture);
gst_vaapi_texture_replace (&texture, NULL);
@@ -187,7 +191,8 @@
EglVTable *egl_vtable;
egl_window = egl_window_new (egl_context,
- GSIZE_TO_POINTER (GST_VAAPI_OBJECT_ID (window->window)));
+ GSIZE_TO_POINTER (GST_VAAPI_WINDOW_ID (GST_VAAPI_WINDOW_EGL_GET_PROXY
+ (window))));
if (!egl_window)
return FALSE;
window->egl_window = egl_window;
@@ -207,36 +212,37 @@
args->success = FALSE;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
if (egl_context_set_current (args->egl_context, TRUE, &old_cs)) {
args->success = do_create_objects_unlocked (window, args->width,
args->height, args->egl_context);
egl_context_set_current (args->egl_context, FALSE, &old_cs);
}
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
static gboolean
-gst_vaapi_window_egl_create (GstVaapiWindowEGL * window,
- guint * width, guint * height)
+gst_vaapi_window_egl_create (GstVaapiWindow * window, guint * width,
+ guint * height)
{
GstVaapiDisplayEGL *const display =
- GST_VAAPI_DISPLAY_EGL (GST_VAAPI_OBJECT_DISPLAY (window));
+ GST_VAAPI_DISPLAY_EGL (GST_VAAPI_WINDOW_DISPLAY (window));
const GstVaapiDisplayClass *const native_dpy_class =
GST_VAAPI_DISPLAY_GET_CLASS (display->display);
CreateObjectsArgs args;
g_return_val_if_fail (native_dpy_class != NULL, FALSE);
- window->window =
+ GST_VAAPI_WINDOW_EGL_GET_PROXY (window) =
native_dpy_class->create_window (GST_VAAPI_DISPLAY (display->display),
GST_VAAPI_ID_INVALID, *width, *height);
- if (!window->window)
+ if (!GST_VAAPI_WINDOW_EGL_GET_PROXY (window))
return FALSE;
- gst_vaapi_window_get_size (window->window, width, height);
+ gst_vaapi_window_get_size (GST_VAAPI_WINDOW_EGL_GET_PROXY (window), width,
+ height);
- args.window = window;
+ args.window = GST_VAAPI_WINDOW_EGL_CAST (window);
args.width = *width;
args.height = *height;
args.egl_context = GST_VAAPI_DISPLAY_EGL_CONTEXT (display);
@@ -256,70 +262,76 @@
do_destroy_objects (GstVaapiWindowEGL * window)
{
EglContext *const egl_context =
- GST_VAAPI_DISPLAY_EGL_CONTEXT (GST_VAAPI_OBJECT_DISPLAY (window));
+ GST_VAAPI_DISPLAY_EGL_CONTEXT (GST_VAAPI_WINDOW_DISPLAY (window));
EglContextState old_cs;
if (!window->egl_window)
return;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
if (egl_context_set_current (egl_context, TRUE, &old_cs)) {
do_destroy_objects_unlocked (window);
egl_context_set_current (egl_context, FALSE, &old_cs);
}
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
static void
-gst_vaapi_window_egl_destroy (GstVaapiWindowEGL * window)
+gst_vaapi_window_egl_finalize (GObject * object)
{
+ GstVaapiWindowEGL *const window = GST_VAAPI_WINDOW_EGL (object);
+
egl_context_run (window->egl_window->context,
(EglContextRunFunc) do_destroy_objects, window);
gst_vaapi_window_replace (&window->window, NULL);
gst_vaapi_texture_replace (&window->texture, NULL);
+
+ G_OBJECT_CLASS (gst_vaapi_window_egl_parent_class)->finalize (object);
}
static gboolean
-gst_vaapi_window_egl_show (GstVaapiWindowEGL * window)
+gst_vaapi_window_egl_show (GstVaapiWindow * window)
{
const GstVaapiWindowClass *const klass =
- GST_VAAPI_WINDOW_GET_CLASS (window->window);
+ GST_VAAPI_WINDOW_GET_CLASS (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
g_return_val_if_fail (klass->show, FALSE);
- return klass->show (window->window);
+ return klass->show (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
}
static gboolean
-gst_vaapi_window_egl_hide (GstVaapiWindowEGL * window)
+gst_vaapi_window_egl_hide (GstVaapiWindow * window)
{
const GstVaapiWindowClass *const klass =
- GST_VAAPI_WINDOW_GET_CLASS (window->window);
+ GST_VAAPI_WINDOW_GET_CLASS (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
g_return_val_if_fail (klass->hide, FALSE);
- return klass->hide (window->window);
+ return klass->hide (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
}
static gboolean
-gst_vaapi_window_egl_get_geometry (GstVaapiWindowEGL * window,
- gint * x_ptr, gint * y_ptr, guint * width_ptr, guint * height_ptr)
+gst_vaapi_window_egl_get_geometry (GstVaapiWindow * window, gint * x_ptr,
+ gint * y_ptr, guint * width_ptr, guint * height_ptr)
{
const GstVaapiWindowClass *const klass =
- GST_VAAPI_WINDOW_GET_CLASS (window->window);
+ GST_VAAPI_WINDOW_GET_CLASS (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
- return klass->get_geometry ? klass->get_geometry (window->window,
- x_ptr, y_ptr, width_ptr, height_ptr) : FALSE;
+ return klass->get_geometry ?
+ klass->get_geometry (GST_VAAPI_WINDOW_EGL_GET_PROXY (window), x_ptr,
+ y_ptr, width_ptr, height_ptr) : FALSE;
}
static gboolean
-gst_vaapi_window_egl_set_fullscreen (GstVaapiWindowEGL * window,
+gst_vaapi_window_egl_set_fullscreen (GstVaapiWindow * window,
gboolean fullscreen)
{
const GstVaapiWindowClass *const klass =
- GST_VAAPI_WINDOW_GET_CLASS (window->window);
+ GST_VAAPI_WINDOW_GET_CLASS (GST_VAAPI_WINDOW_EGL_GET_PROXY (window));
- return klass->set_fullscreen ? klass->set_fullscreen (window->window,
+ return klass->set_fullscreen ?
+ klass->set_fullscreen (GST_VAAPI_WINDOW_EGL_GET_PROXY (window),
fullscreen) : FALSE;
}
@@ -341,29 +353,29 @@
GstVaapiWindowEGL *const window = args->window;
EglContextState old_cs;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_egl.h
^
|
@@ -23,17 +23,30 @@
#ifndef GST_VAAPI_WINDOW_EGL_H
#define GST_VAAPI_WINDOW_EGL_H
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_EGL (gst_vaapi_window_egl_get_type ())
#define GST_VAAPI_WINDOW_EGL(obj) \
- ((GstVaapiWindowEGL *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_EGL, GstVaapiWindowEGL))
+#define GST_VAAPI_IS_WINDOW_EGL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_EGL))
+
+typedef struct _GstVaapiWindowEGL GstVaapiWindowEGL;
+
+GType
+gst_vaapi_window_egl_get_type (void) G_GNUC_CONST;
GstVaapiWindow *
gst_vaapi_window_egl_new (GstVaapiDisplay * display, guint width, guint height);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowEGL, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_EGL_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_glx.c
^
|
@@ -36,17 +36,15 @@
#include "gstvaapiutils_x11.h"
#include "gstvaapiutils_glx.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
+GST_DEBUG_CATEGORY_EXTERN (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
+#define GST_VAAPI_WINDOW_GLX_CAST(obj) ((GstVaapiWindowGLX *)(obj))
#define GST_VAAPI_WINDOW_GLX_GET_PRIVATE(window) \
- (&GST_VAAPI_WINDOW_GLX(window)->priv)
-
-#define GST_VAAPI_WINDOW_GLX_CLASS(klass) \
- ((GstVaapiWindowGLXClass *)(klass))
+ gst_vaapi_window_glx_get_instance_private (GST_VAAPI_WINDOW_GLX_CAST (window))
#define GST_VAAPI_WINDOW_GLX_GET_CLASS(obj) \
- GST_VAAPI_WINDOW_GLX_CLASS(GST_VAAPI_OBJECT_GET_CLASS(obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW_GLX, GstVaapiWindowGLXClass))
typedef struct _GstVaapiWindowGLXPrivate GstVaapiWindowGLXPrivate;
typedef struct _GstVaapiWindowGLXClass GstVaapiWindowGLXClass;
@@ -66,8 +64,6 @@
{
/*< private > */
GstVaapiWindowX11 parent_instance;
-
- GstVaapiWindowGLXPrivate priv;
};
/**
@@ -79,11 +75,11 @@
{
/*< private > */
GstVaapiWindowX11Class parent_class;
-
- GstVaapiObjectFinalizeFunc parent_finalize;
- GstVaapiWindowResizeFunc parent_resize;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiWindowGLX, gst_vaapi_window_glx,
+ GST_TYPE_VAAPI_WINDOW_X11);
+
/* Fill rectangle coords with capped bounds */
static inline void
fill_rect (GstVaapiRectangle * dst_rect,
@@ -114,12 +110,12 @@
GstVaapiWindowGLXPrivate *const priv =
GST_VAAPI_WINDOW_GLX_GET_PRIVATE (window);
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
if (priv->gl_context) {
gl_destroy_context (priv->gl_context);
priv->gl_context = NULL;
}
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
static gboolean
@@ -128,14 +124,14 @@
{
GstVaapiWindowGLXPrivate *const priv =
GST_VAAPI_WINDOW_GLX_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
GLContextState parent_cs;
parent_cs.display = dpy;
parent_cs.window = None;
parent_cs.context = foreign_context;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
priv->gl_context = gl_create_context (dpy, DefaultScreen (dpy), &parent_cs);
if (!priv->gl_context) {
GST_DEBUG ("could not create GLX context");
@@ -152,7 +148,7 @@
gl_destroy_context (priv->gl_context);
priv->gl_context = NULL;
end:
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
return priv->gl_context != NULL;
}
@@ -183,7 +179,7 @@
if (!_gst_vaapi_window_glx_ensure_context (window, foreign_context))
return FALSE;
- priv->gl_context->window = GST_VAAPI_OBJECT_ID (window);
+ priv->gl_context->window = GST_VAAPI_WINDOW_ID (window);
if (!gl_set_current_context (priv->gl_context, &old_cs)) {
GST_DEBUG ("could not make newly created GLX context current");
return FALSE;
@@ -222,13 +218,13 @@
{
GstVaapiWindowGLXPrivate *const priv =
GST_VAAPI_WINDOW_GLX_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
if (priv->cmap) {
if (!window->use_foreign_window) {
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
XFreeColormap (dpy, priv->cmap);
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
priv->cmap = None;
}
@@ -239,7 +235,7 @@
{
GstVaapiWindowGLXPrivate *const priv =
GST_VAAPI_WINDOW_GLX_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
XWindowAttributes wattr;
gboolean success = FALSE;
@@ -247,20 +243,20 @@
if (!window->use_foreign_window) {
if (!_gst_vaapi_window_glx_ensure_context (window, NULL))
return None;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
/* XXX: add a GstVaapiDisplayX11:x11-screen property? */
priv->cmap = XCreateColormap (dpy, RootWindow (dpy, DefaultScreen (dpy)),
priv->gl_context->visual->visual, AllocNone);
success = x11_untrap_errors () == 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
} else {
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
- XGetWindowAttributes (dpy, GST_VAAPI_OBJECT_ID (window), &wattr);
+ XGetWindowAttributes (dpy, GST_VAAPI_WINDOW_ID (window), &wattr);
priv->cmap = wattr.colormap;
success = x11_untrap_errors () == 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
if (!success)
return None;
@@ -279,53 +275,52 @@
{
GstVaapiWindowGLXPrivate *const priv =
GST_VAAPI_WINDOW_GLX_GET_PRIVATE (window);
- const GstVaapiWindowGLXClass *const klass =
- GST_VAAPI_WINDOW_GLX_GET_CLASS (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ const GstVaapiWindowClass *const parent_klass =
+ GST_VAAPI_WINDOW_CLASS (gst_vaapi_window_glx_parent_class);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
GLContextState old_cs;
- if (!klass->parent_resize (window, width, height))
+ if (!parent_klass->resize (window, width, height))
return FALSE;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
XSync (dpy, False); /* make sure resize completed */
if (gl_set_current_context (priv->gl_context, &old_cs)) {
gl_resize (width, height);
gl_set_current_context (&old_cs, NULL);
}
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
return TRUE;
}
static void
-gst_vaapi_window_glx_finalize (GstVaapiWindowGLX * window)
+gst_vaapi_window_glx_finalize (GObject * object)
{
- GstVaapiWindow *const base_window = GST_VAAPI_WINDOW (window);
+ GstVaapiWindow *const window = GST_VAAPI_WINDOW (object);
- _gst_vaapi_window_glx_destroy_context (base_window);
- gst_vaapi_window_glx_destroy_colormap (base_window);
+ _gst_vaapi_window_glx_destroy_context (window);
+ gst_vaapi_window_glx_destroy_colormap (window);
- GST_VAAPI_WINDOW_GLX_GET_CLASS (window)->parent_finalize (GST_VAAPI_OBJECT
- (window));
+ G_OBJECT_CLASS (gst_vaapi_window_glx_parent_class)->finalize (object);
}
static void
gst_vaapi_window_glx_class_init (GstVaapiWindowGLXClass * klass)
{
+ GObjectClass *const object_class = G_OBJECT_CLASS (klass);
GstVaapiWindowClass *const window_class = GST_VAAPI_WINDOW_CLASS (klass);
- GstVaapiWindowX11Class *const xwindow_class =
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_glx.h
^
|
@@ -26,17 +26,25 @@
#define GST_VAAPI_WINDOW_GLX_H
#include <GL/glx.h>
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow_x11.h>
#include <gst/vaapi/gstvaapitexture.h>
+#include <gst/vaapi/gstvaapitypes.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_GLX (gst_vaapi_window_glx_get_type ())
#define GST_VAAPI_WINDOW_GLX(obj) \
- ((GstVaapiWindowGLX *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_GLX, GstVaapiWindowGLX))
+#define GST_VAAPI_IS_WINDOW_GLX(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_GLX))
typedef struct _GstVaapiWindowGLX GstVaapiWindowGLX;
+GType
+gst_vaapi_window_glx_get_type (void) G_GNUC_CONST;
+
GstVaapiWindow *
gst_vaapi_window_glx_new (GstVaapiDisplay * display, guint width, guint height);
@@ -60,6 +68,10 @@
GstVaapiTexture * texture, const GstVaapiRectangle * src_rect,
const GstVaapiRectangle * dst_rect);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowGLX, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_GLX_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_priv.h
^
|
@@ -25,39 +25,41 @@
#ifndef GST_VAAPI_WINDOW_PRIV_H
#define GST_VAAPI_WINDOW_PRIV_H
-#include "gstvaapiobject_priv.h"
+#include "gstvaapidisplay.h"
#include "gstvaapifilter.h"
#include "gstvaapisurfacepool.h"
G_BEGIN_DECLS
+#define GST_VAAPI_WINDOW_CAST(window) \
+ ((GstVaapiWindow *)(window))
+
#define GST_VAAPI_WINDOW_CLASS(klass) \
- ((GstVaapiWindowClass *)(klass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_VAAPI_WINDOW, GstVaapiWindowClass))
+
+#define GST_VAAPI_IS_WINDOW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VAAPI_WINDOW))
#define GST_VAAPI_WINDOW_GET_CLASS(obj) \
- GST_VAAPI_WINDOW_CLASS(GST_VAAPI_OBJECT_GET_CLASS(obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW, GstVaapiWindowClass))
-/* GstVaapiWindowClass hooks */
-typedef gboolean (*GstVaapiWindowCreateFunc) (GstVaapiWindow * window,
- guint * width, guint * height);
-typedef gboolean (*GstVaapiWindowShowFunc) (GstVaapiWindow * window);
-typedef gboolean (*GstVaapiWindowHideFunc) (GstVaapiWindow * window);
-typedef gboolean (*GstVaapiWindowGetGeometryFunc) (GstVaapiWindow * window,
- gint * px, gint * py, guint * pwidth, guint * pheight);
-typedef gboolean (*GstVaapiWindowSetFullscreenFunc) (GstVaapiWindow * window,
- gboolean fullscreen);
-typedef gboolean (*GstVaapiWindowResizeFunc) (GstVaapiWindow * window,
- guint width, guint height);
-typedef gboolean (*GstVaapiWindowRenderFunc) (GstVaapiWindow * window,
- GstVaapiSurface * surface, const GstVaapiRectangle * src_rect,
- const GstVaapiRectangle * dst_rect, guint flags);
-typedef gboolean (*GstVaapiWindowRenderPixmapFunc) (GstVaapiWindow * window,
- GstVaapiPixmap * pixmap, const GstVaapiRectangle * src_rect,
- const GstVaapiRectangle * dst_rect);
-typedef guintptr (*GstVaapiWindowGetVisualIdFunc) (GstVaapiWindow * window);
-typedef guintptr (*GstVaapiWindowGetColormapFunc) (GstVaapiWindow * window);
-typedef gboolean (*GstVaapiWindowSetUnblockFunc) (GstVaapiWindow * window);
-typedef gboolean (*GstVaapiWindowSetUnblockCancelFunc) (GstVaapiWindow * window);
+#define GST_VAAPI_WINDOW_DISPLAY(window) \
+ (GST_VAAPI_WINDOW_CAST (window)->display)
+
+#define GST_VAAPI_WINDOW_LOCK_DISPLAY(window) \
+ GST_VAAPI_DISPLAY_LOCK (GST_VAAPI_WINDOW_DISPLAY (window))
+
+#define GST_VAAPI_WINDOW_UNLOCK_DISPLAY(window) \
+ GST_VAAPI_DISPLAY_UNLOCK (GST_VAAPI_WINDOW_DISPLAY (window))
+
+#define GST_VAAPI_WINDOW_NATIVE_DISPLAY(window) \
+ GST_VAAPI_DISPLAY_NATIVE (GST_VAAPI_WINDOW_DISPLAY (window))
+
+#define GST_VAAPI_WINDOW_ID(window) \
+ (GST_VAAPI_WINDOW_CAST (window)->native_id)
+
+#define GST_VAAPI_WINDOW_VADISPLAY(window) \
+ GST_VAAPI_DISPLAY_VADISPLAY (GST_VAAPI_WINDOW_DISPLAY (window))
/**
* GstVaapiWindow:
@@ -67,7 +69,9 @@
struct _GstVaapiWindow
{
/*< private >*/
- GstVaapiObject parent_instance;
+ GstObject parent_instance;
+ GstVaapiDisplay *display;
+ GstVaapiID native_id;
/*< protected >*/
guint width;
@@ -106,60 +110,36 @@
struct _GstVaapiWindowClass
{
/*< private >*/
- GstVaapiObjectClass parent_class;
+ GstObjectClass parent_class;
/*< protected >*/
- GstVaapiWindowCreateFunc create;
- GstVaapiWindowShowFunc show;
- GstVaapiWindowHideFunc hide;
- GstVaapiWindowGetGeometryFunc get_geometry;
- GstVaapiWindowSetFullscreenFunc set_fullscreen;
- GstVaapiWindowResizeFunc resize;
- GstVaapiWindowRenderFunc render;
- GstVaapiWindowRenderPixmapFunc render_pixmap;
- GstVaapiWindowGetVisualIdFunc get_visual_id;
- GstVaapiWindowGetColormapFunc get_colormap;
- GstVaapiWindowSetUnblockFunc unblock;
- GstVaapiWindowSetUnblockCancelFunc unblock_cancel;
+ gboolean (*create) (GstVaapiWindow * window, guint * width, guint * height);
+ gboolean (*show) (GstVaapiWindow * window);
+ gboolean (*hide) (GstVaapiWindow * window);
+ gboolean (*get_geometry) (GstVaapiWindow * window, gint * px, gint * py,
+ guint * pwidth, guint * pheight);
+ gboolean (*set_fullscreen) (GstVaapiWindow * window, gboolean fullscreen);
+ gboolean (*resize) (GstVaapiWindow * window, guint width, guint height);
+ gboolean (*render) (GstVaapiWindow * window, GstVaapiSurface * surface,
+ const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect,
+ guint flags);
+ gboolean (*render_pixmap) (GstVaapiWindow * window, GstVaapiPixmap * pixmap,
+ const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect);
+ guintptr (*get_visual_id) (GstVaapiWindow * window);
+ guintptr (*get_colormap) (GstVaapiWindow * window);
+ gboolean (*unblock) (GstVaapiWindow * window);
+ gboolean (*unblock_cancel) (GstVaapiWindow * window);
};
GstVaapiWindow *
-gst_vaapi_window_new_internal (const GstVaapiWindowClass * window_class,
- GstVaapiDisplay * display, GstVaapiID handle, guint width, guint height);
+gst_vaapi_window_new_internal (GType type, GstVaapiDisplay * display,
+ GstVaapiID handle, guint width, guint height);
GstVaapiSurface *
gst_vaapi_window_vpp_convert_internal (GstVaapiWindow * window,
GstVaapiSurface * surface, const GstVaapiRectangle * src_rect,
const GstVaapiRectangle * dst_rect, guint flags);
-void
-gst_vaapi_window_class_init (GstVaapiWindowClass * klass);
-
-/* Inline reference counting for core libgstvaapi library */
-#ifdef IN_LIBGSTVAAPI_CORE
-#define gst_vaapi_window_ref_internal(window) \
- ((gpointer)gst_vaapi_object_ref(GST_VAAPI_OBJECT(window)))
-
-#define gst_vaapi_window_unref_internal(window) \
- gst_vaapi_object_unref(GST_VAAPI_OBJECT(window))
-
-#define gst_vaapi_window_replace_internal(old_window_ptr, new_window) \
- gst_vaapi_object_replace((GstVaapiObject **)(old_window_ptr), \
- GST_VAAPI_OBJECT(new_window))
-
-#undef gst_vaapi_window_ref
-#define gst_vaapi_window_ref(window) \
- gst_vaapi_window_ref_internal((window))
-
-#undef gst_vaapi_window_unref
-#define gst_vaapi_window_unref(window) \
- gst_vaapi_window_unref_internal((window))
-
-#undef gst_vaapi_window_replace
-#define gst_vaapi_window_replace(old_window_ptr, new_window) \
- gst_vaapi_window_replace_internal((old_window_ptr), (new_window))
-#endif
-
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
^
|
@@ -27,8 +27,8 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include "gstvaapicompat.h"
+#include "gstvaapiobject_priv.h"
#include "gstvaapiwindow_wayland.h"
#include "gstvaapiwindow_priv.h"
#include "gstvaapidisplay_wayland.h"
@@ -37,20 +37,17 @@
#include "gstvaapifilter.h"
#include "gstvaapisurfacepool.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
+GST_DEBUG_CATEGORY_EXTERN (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
#define GST_VAAPI_WINDOW_WAYLAND_CAST(obj) \
((GstVaapiWindowWayland *)(obj))
#define GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE(obj) \
- (&GST_VAAPI_WINDOW_WAYLAND_CAST(obj)->priv)
-
-#define GST_VAAPI_WINDOW_WAYLAND_CLASS(klass) \
- ((GstVaapiWindowWaylandClass *)(klass))
+ gst_vaapi_window_wayland_get_instance_private (GST_VAAPI_WINDOW_WAYLAND_CAST (obj))
#define GST_VAAPI_WINDOW_WAYLAND_GET_CLASS(obj) \
- GST_VAAPI_WINDOW_WAYLAND_CLASS (GST_VAAPI_WINDOW_GET_CLASS (obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW_WAYLAND, GstVaapiWindowWaylandClass))
typedef struct _GstVaapiWindowWaylandPrivate GstVaapiWindowWaylandPrivate;
typedef struct _GstVaapiWindowWaylandClass GstVaapiWindowWaylandClass;
@@ -95,16 +92,15 @@
}
gst_vaapi_video_pool_replace (&frame->surface_pool, NULL);
- if (frame->callback) {
- wl_callback_destroy (frame->callback);
- frame->callback = NULL;
- }
+ g_clear_pointer (&frame->callback, wl_callback_destroy);
g_slice_free (FrameState, frame);
}
struct _GstVaapiWindowWaylandPrivate
{
- struct wl_shell_surface *shell_surface;
+ struct xdg_surface *xdg_surface;
+ struct xdg_toplevel *xdg_toplevel;
+ struct wl_shell_surface *wl_shell_surface;
struct wl_surface *surface;
struct wl_region *opaque_region;
struct wl_event_queue *event_queue;
@@ -127,8 +123,6 @@
{
/*< private > */
GstVaapiWindow parent_instance;
-
- GstVaapiWindowWaylandPrivate priv;
};
/**
@@ -140,13 +134,84 @@
{
/*< private > */
GstVaapiWindowClass parent_class;
- GstVaapiObjectFinalizeFunc parent_finalize;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiWindowWayland, gst_vaapi_window_wayland,
+ GST_TYPE_VAAPI_WINDOW);
+
+/* Object signals */
+enum
+{
+ SIZE_CHANGED,
+ N_SIGNALS
+};
+
+static guint signals[N_SIGNALS];
+
+static void
+handle_xdg_toplevel_configure (void *data, struct xdg_toplevel *xdg_toplevel,
+ int32_t width, int32_t height, struct wl_array *states)
+{
+ GstVaapiWindow *window = GST_VAAPI_WINDOW (data);
+ const uint32_t *state;
+
+ GST_DEBUG ("Got XDG-toplevel::reconfigure, [width x height] = [%d x %d]",
+ width, height);
+
+ wl_array_for_each (state, states) {
+ switch (*state) {
+ case XDG_TOPLEVEL_STATE_FULLSCREEN:
+ case XDG_TOPLEVEL_STATE_MAXIMIZED:
+ case XDG_TOPLEVEL_STATE_RESIZING:
+ case XDG_TOPLEVEL_STATE_ACTIVATED:
+ break;
+ }
+ }
+
+ if (width > 0 && height > 0) {
+ gst_vaapi_window_set_size (window, width, height);
+ g_signal_emit (window, signals[SIZE_CHANGED], 0, width, height);
+ }
+}
+
+static void
+handle_xdg_toplevel_close (void *data, struct xdg_toplevel *xdg_toplevel)
+{
+}
+
+static const struct xdg_toplevel_listener xdg_toplevel_listener = {
+ handle_xdg_toplevel_configure,
+ handle_xdg_toplevel_close,
};
static gboolean
gst_vaapi_window_wayland_show (GstVaapiWindow * window)
{
- GST_WARNING ("unimplemented GstVaapiWindowWayland::show()");
+ GstVaapiWindowWaylandPrivate *priv =
+ GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE (window);
+
+ if (priv->xdg_surface == NULL) {
+ GST_FIXME ("GstVaapiWindowWayland::show() unimplemented for wl_shell");
+ return TRUE;
+ }
+
+ if (priv->xdg_toplevel != NULL) {
+ GST_DEBUG ("XDG toplevel already mapped");
+ return TRUE;
+ }
+
+ /* Create a toplevel window out of it */
+ priv->xdg_toplevel = xdg_surface_get_toplevel (priv->xdg_surface);
+ g_return_val_if_fail (priv->xdg_toplevel, FALSE);
+ xdg_toplevel_set_title (priv->xdg_toplevel, "VA-API Wayland window");
+ wl_proxy_set_queue ((struct wl_proxy *) priv->xdg_toplevel,
+ priv->event_queue);
+
+ xdg_toplevel_add_listener (priv->xdg_toplevel, &xdg_toplevel_listener,
+ window);
+
+ /* Commit the xdg_surface state as top-level window */
+ wl_surface_commit (priv->surface);
return TRUE;
}
@@ -154,7 +219,18 @@
static gboolean
gst_vaapi_window_wayland_hide (GstVaapiWindow * window)
{
- GST_WARNING ("unimplemented GstVaapiWindowWayland::hide()");
+ GstVaapiWindowWaylandPrivate *priv =
+ GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE (window);
+
+ if (priv->xdg_surface == NULL) {
+ GST_FIXME ("GstVaapiWindowWayland::hide() unimplemented for wl_shell");
+ return TRUE;
+ }
+
+ if (priv->xdg_toplevel != NULL) {
+ g_clear_pointer (&priv->xdg_toplevel, xdg_toplevel_destroy);
+ wl_surface_commit (priv->surface);
+ }
return TRUE;
}
@@ -165,7 +241,7 @@
GstVaapiWindowWaylandPrivate *const priv =
GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE (window);
struct wl_display *const wl_display =
- GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
if (priv->sync_failed)
return FALSE;
@@ -219,20 +295,20 @@
}
static void
-handle_ping (void *data, struct wl_shell_surface *shell_surface,
+handle_ping (void *data, struct wl_shell_surface *wl_shell_surface,
uint32_t serial)
{
- wl_shell_surface_pong (shell_surface, serial);
+ wl_shell_surface_pong (wl_shell_surface, serial);
}
static void
-handle_configure (void *data, struct wl_shell_surface *shell_surface,
+handle_configure (void *data, struct wl_shell_surface *wl_shell_surface,
uint32_t edges, int32_t width, int32_t height)
{
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_wayland.h
^
|
@@ -24,17 +24,31 @@
#ifndef GST_VAAPI_WINDOW_WAYLAND_H
#define GST_VAAPI_WINDOW_WAYLAND_H
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_WAYLAND (gst_vaapi_window_wayland_get_type ())
+#define GST_VAAPI_WINDOW_WAYLAND(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_WAYLAND, GstVaapiWindowWayland))
+#define GST_VAAPI_IS_WINDOW_WAYLAND(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_WAYLAND))
+
typedef struct _GstVaapiWindowWayland GstVaapiWindowWayland;
+GType
+gst_vaapi_window_wayland_get_type (void) G_GNUC_CONST;
+
GstVaapiWindow *
gst_vaapi_window_wayland_new (GstVaapiDisplay * display, guint width,
guint height);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiWindowWayland, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_WAYLAND_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_x11.c
^
|
@@ -28,7 +28,6 @@
*/
#include "sysdeps.h"
-#include <string.h>
#include <X11/Xatom.h>
#include "gstvaapicompat.h"
#include "gstvaapiwindow_x11.h"
@@ -41,8 +40,14 @@
#include "gstvaapiutils.h"
#include "gstvaapiutils_x11.h"
-#define DEBUG 1
-#include "gstvaapidebug.h"
+GST_DEBUG_CATEGORY_EXTERN (gst_debug_vaapi_window);
+#define GST_CAT_DEFAULT gst_debug_vaapi_window
+
+#define GST_VAAPI_WINDOW_X11_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW_X11, GstVaapiWindowX11Class))
+
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiWindowX11, gst_vaapi_window_x11,
+ GST_TYPE_VAAPI_WINDOW);
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
@@ -53,13 +58,13 @@
{
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
XClientMessageEvent xclient;
memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage;
- xclient.window = GST_VAAPI_OBJECT_ID (window);
+ xclient.window = GST_VAAPI_WINDOW_ID (window);
xclient.message_type = priv->atom_NET_WM_STATE;
xclient.format = 32;
@@ -78,15 +83,15 @@
static void
wait_event (GstVaapiWindow * window, int type)
{
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
- const Window xid = GST_VAAPI_OBJECT_ID (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
+ const Window xid = GST_VAAPI_WINDOW_ID (window);
XEvent e;
Bool got_event;
for (;;) {
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
got_event = XCheckTypedWindowEvent (dpy, xid, type, &e);
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
if (got_event)
break;
g_usleep (10);
@@ -97,8 +102,8 @@
timed_wait_event (GstVaapiWindow * window, int type, guint64 end_time,
XEvent * e)
{
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
- const Window xid = GST_VAAPI_OBJECT_ID (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
+ const Window xid = GST_VAAPI_WINDOW_ID (window);
XEvent tmp_event;
GTimeVal now;
guint64 now_time;
@@ -107,17 +112,17 @@
if (!e)
e = &tmp_event;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
got_event = XCheckTypedWindowEvent (dpy, xid, type, e);
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
if (got_event)
return TRUE;
do {
g_usleep (10);
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
got_event = XCheckTypedWindowEvent (dpy, xid, type, e);
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
if (got_event)
return TRUE;
g_get_current_time (&now);
@@ -131,15 +136,15 @@
{
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
- const Window xid = GST_VAAPI_OBJECT_ID (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
+ const Window xid = GST_VAAPI_WINDOW_ID (window);
XWindowAttributes wattr;
gboolean has_errors;
if (priv->is_mapped)
return TRUE;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
if (window->use_foreign_window) {
XGetWindowAttributes (dpy, xid, &wattr);
@@ -148,17 +153,17 @@
}
XMapWindow (dpy, xid);
has_errors = x11_untrap_errors () != 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
if (!has_errors) {
wait_event (window, MapNotify);
if (window->use_foreign_window &&
!(wattr.your_event_mask & StructureNotifyMask)) {
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
XSelectInput (dpy, xid, wattr.your_event_mask);
has_errors = x11_untrap_errors () != 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
priv->is_mapped = TRUE;
@@ -173,15 +178,15 @@
{
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
- const Window xid = GST_VAAPI_OBJECT_ID (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
+ const Window xid = GST_VAAPI_WINDOW_ID (window);
XWindowAttributes wattr;
gboolean has_errors;
if (!priv->is_mapped)
return TRUE;
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
if (window->use_foreign_window) {
XGetWindowAttributes (dpy, xid, &wattr);
@@ -190,17 +195,17 @@
}
XUnmapWindow (dpy, xid);
has_errors = x11_untrap_errors () != 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
if (!has_errors) {
wait_event (window, UnmapNotify);
if (window->use_foreign_window &&
!(wattr.your_event_mask & StructureNotifyMask)) {
- GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_LOCK_DISPLAY (window);
x11_trap_errors ();
XSelectInput (dpy, xid, wattr.your_event_mask);
has_errors = x11_untrap_errors () != 0;
- GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window);
}
priv->is_mapped = FALSE;
}
@@ -213,15 +218,15 @@
{
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
- GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (window);
- Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
- Window xid = GST_VAAPI_OBJECT_ID (window);
+ GstVaapiDisplay *const display = GST_VAAPI_WINDOW_DISPLAY (window);
+ Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window);
+ Window xid = GST_VAAPI_WINDOW_ID (window);
guint vid = 0;
Colormap cmap = None;
const GstVaapiDisplayClass *display_class;
const GstVaapiWindowClass *window_class;
XWindowAttributes wattr;
- Atom atoms[2];
+ Atom wm_delete, atoms[2];
gboolean ok;
static const char *atom_names[2] = {
@@ -230,14 +235,14 @@
};
priv->has_xrender =
- GST_VAAPI_DISPLAY_HAS_XRENDER (GST_VAAPI_OBJECT_DISPLAY (window));
+ GST_VAAPI_DISPLAY_HAS_XRENDER (GST_VAAPI_WINDOW_DISPLAY (window));
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
^
|
@@ -26,13 +26,17 @@
#define GST_VAAPI_WINDOW_X11_H
#include <X11/Xlib.h>
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_X11 (gst_vaapi_window_x11_get_type ())
#define GST_VAAPI_WINDOW_X11(obj) \
- ((GstVaapiWindowX11 *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_X11, GstVaapiWindowX11))
+#define GST_VAAPI_IS_WINDOW_X11(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_X11))
/**
* GST_VAAPI_WINDOW_XWINDOW:
@@ -41,10 +45,13 @@
* Macro that evaluates to the underlying X11 #Window of @window
*/
#define GST_VAAPI_WINDOW_XWINDOW(window) \
- gst_vaapi_window_x11_get_xid(GST_VAAPI_WINDOW_X11(window))
+ gst_vaapi_window_x11_get_xid (GST_VAAPI_WINDOW_X11 (window))
typedef struct _GstVaapiWindowX11 GstVaapiWindowX11;
+GType
+gst_vaapi_window_x11_get_type (void) G_GNUC_CONST;
+
GstVaapiWindow *
gst_vaapi_window_x11_new (GstVaapiDisplay * display, guint width, guint height);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapiwindow_x11_priv.h
^
|
@@ -27,20 +27,18 @@
#include "gstvaapiwindow_priv.h"
-#ifdef HAVE_XRENDER
+#if HAVE_XRENDER
# include <X11/extensions/Xrender.h>
#endif
G_BEGIN_DECLS
+#define GST_VAAPI_WINDOW_X11_CAST(obj) ((GstVaapiWindowX11 *)(obj))
#define GST_VAAPI_WINDOW_X11_GET_PRIVATE(obj) \
- (&GST_VAAPI_WINDOW_X11(obj)->priv)
-
-#define GST_VAAPI_WINDOW_X11_CLASS(klass) \
- ((GstVaapiWindowX11Class *)(klass))
+ gst_vaapi_window_x11_get_instance_private (GST_VAAPI_WINDOW_X11_CAST (obj))
#define GST_VAAPI_WINDOW_X11_GET_CLASS(obj) \
- GST_VAAPI_WINDOW_X11_CLASS(GST_VAAPI_WINDOW_GET_CLASS(obj))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_WINDOW_X11, GstVaapiWindowX11Class))
typedef struct _GstVaapiWindowX11Private GstVaapiWindowX11Private;
typedef struct _GstVaapiWindowX11Class GstVaapiWindowX11Class;
@@ -49,7 +47,7 @@
{
Atom atom_NET_WM_STATE;
Atom atom_NET_WM_STATE_FULLSCREEN;
-#ifdef HAVE_XRENDER
+#if HAVE_XRENDER
Picture picture;
#endif
guint is_mapped:1;
@@ -67,8 +65,6 @@
{
/*< private >*/
GstVaapiWindow parent_instance;
-
- GstVaapiWindowX11Private priv;
};
/**
@@ -80,12 +76,8 @@
{
/*< private >*/
GstVaapiWindowClass parent_class;
- GstVaapiObjectFinalizeFunc parent_finalize;
};
-void
-gst_vaapi_window_x11_class_init (GstVaapiWindowX11Class * klass);
-
G_END_DECLS
#endif /* GST_VAAPI_WINDOW_X11_PRIV_H */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/meson.build
^
|
@@ -6,11 +6,15 @@
'gstvaapidecoder.c',
'gstvaapidecoder_dpb.c',
'gstvaapidecoder_h264.c',
+ 'gstvaapidecoder_h265.c',
+ 'gstvaapidecoder_jpeg.c',
'gstvaapidecoder_mpeg2.c',
'gstvaapidecoder_mpeg4.c',
'gstvaapidecoder_objects.c',
'gstvaapidecoder_unit.c',
'gstvaapidecoder_vc1.c',
+ 'gstvaapidecoder_vp8.c',
+ 'gstvaapidecoder_vp9.c',
'gstvaapidisplay.c',
'gstvaapifilter.c',
'gstvaapiimage.c',
@@ -44,9 +48,12 @@
'gstvaapidecoder.h',
'gstvaapidecoder_h264.h',
'gstvaapidecoder_h265.h',
+ 'gstvaapidecoder_jpeg.h',
'gstvaapidecoder_mpeg2.h',
'gstvaapidecoder_mpeg4.h',
'gstvaapidecoder_vc1.h',
+ 'gstvaapidecoder_vp8.h',
+ 'gstvaapidecoder_vp9.h',
'gstvaapidisplay.h',
'gstvaapifilter.h',
'gstvaapiimage.h',
@@ -71,26 +78,6 @@
'video-format.h',
]
-if USE_JPEG_DECODER
- gstlibvaapi_sources += 'gstvaapidecoder_jpeg.c'
- gstlibvaapi_headers += 'gstvaapidecoder_jpeg.h'
-endif
-
-if USE_VP8_DECODER
- gstlibvaapi_sources += 'gstvaapidecoder_vp8.c'
- gstlibvaapi_headers += 'gstvaapidecoder_vp8.h'
-endif
-
-if USE_H265_DECODER
- gstlibvaapi_sources += 'gstvaapidecoder_h265.c'
- gstlibvaapi_headers += 'gstvaapidecoder_h265.h'
-endif
-
-if USE_VP9_DECODER
- gstlibvaapi_sources += 'gstvaapidecoder_vp9.c'
- gstlibvaapi_headers += 'gstvaapidecoder_vp9.h'
-endif
-
if USE_ENCODERS
gstlibvaapi_sources += [
'gstvaapicodedbuffer.c',
@@ -98,8 +85,11 @@
'gstvaapicodedbufferproxy.c',
'gstvaapiencoder.c',
'gstvaapiencoder_h264.c',
+ 'gstvaapiencoder_h265.c',
+ 'gstvaapiencoder_jpeg.c',
'gstvaapiencoder_mpeg2.c',
'gstvaapiencoder_objects.c',
+ 'gstvaapiencoder_vp8.c',
]
gstlibvaapi_headers += [
'gstvaapicodedbuffer.h',
@@ -107,30 +97,35 @@
'gstvaapicodedbufferproxy.h',
'gstvaapiencoder.h',
'gstvaapiencoder_h264.h',
+ 'gstvaapiencoder_h265.h',
+ 'gstvaapiencoder_jpeg.h',
'gstvaapiencoder_mpeg2.h',
+ 'gstvaapiencoder_vp8.h',
]
endif
-if USE_JPEG_ENCODER
- gstlibvaapi_sources += 'gstvaapiencoder_jpeg.c'
- gstlibvaapi_headers += 'gstvaapiencoder_jpeg.h'
-endif
-
-if USE_VP8_ENCODER
- gstlibvaapi_sources += 'gstvaapiencoder_vp8.c'
- gstlibvaapi_headers += 'gstvaapiencoder_vp8.h'
-endif
-
-if USE_H265_ENCODER
- gstlibvaapi_sources += 'gstvaapiencoder_h265.c'
- gstlibvaapi_headers += 'gstvaapiencoder_h265.h'
-endif
-
if USE_VP9_ENCODER
gstlibvaapi_sources += 'gstvaapiencoder_vp9.c'
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'
endif
+if USE_H264_FEI_ENCODER
+ gstlibvaapi_sources += [
+ 'gstvaapifeiutils_h264.c',
+ 'gstvaapifei_objects.c',
+ 'gstvaapifeienc_h264.c',
+ 'gstvaapifeipak_h264.c',
+ 'gstvaapiencoder_h264_fei.c',
+ ]
+ gstlibvaapi_headers += [
+ 'gstvaapifeiutils_h264.h',
+ 'gstvaapifei_objects.h',
+ 'gstvaapifeienc_h264.h',
+ 'gstvaapifeipak_h264.h',
+ 'gstvaapiencoder_h264_fei.h',
+ ]
+endif
+
if USE_DRM
gstlibvaapi_sources += [
'gstvaapidisplay_drm.c',
@@ -188,10 +183,24 @@
endif
if USE_WAYLAND
+ # The XDG shell interface needs to be generated first
+ wayland_protocols_basedir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
+ xdg_shell_xml_spec = join_paths(wayland_protocols_basedir, 'stable', 'xdg-shell', 'xdg-shell.xml')
+ xdg_shell_header = custom_target('vaapi-xdg-shell-client-header',
+ command: [ wayland_scanner_bin, 'client-header', '@INPUT@', '@OUTPUT@' ],
+ input: xdg_shell_xml_spec,
+ output: 'xdg-shell-client-protocol.h')
+ xdg_shell_code = custom_target('vaapi-xdg-shell-client-code',
+ command: [ wayland_scanner_bin, 'private-code', '@INPUT@', '@OUTPUT@' ],
+ input: xdg_shell_xml_spec,
+ output: 'xdg-shell-client-protocol.c')
+
gstlibvaapi_sources += [
'gstvaapidisplay_wayland.c',
'gstvaapiwindow_wayland.c',
- ]
+ xdg_shell_header,
+ xdg_shell_code,
+ ]
gstlibvaapi_headers += [
'gstvaapidisplay_wayland.h',
'gstvaapiwindow_wayland.h',
@@ -203,7 +212,7 @@
gstgl_dep,
gstcodecparsers_dep,
libva_dep,
- gstvaapi_baseutils_dep ]
+ libm ]
if USE_DRM
gstlibvaapi_deps += [libva_drm_dep, libdrm_dep, libudev_dep]
endif
@@ -214,18 +223,16 @@
gstlibvaapi_deps += [libva_x11_dep, x11_dep, gl_dep, libdl_dep]
endif
if USE_WAYLAND
- gstlibvaapi_deps += [libva_wayland_dep, wayland_client_dep]
+ gstlibvaapi_deps += [libva_wayland_dep, wayland_client_dep, wayland_protocols_dep]
endif
if USE_X11
gstlibvaapi_deps += [libva_x11_dep, x11_dep, xrandr_dep, xrender_dep]
endif
gstlibvaapi = static_library('gstlibvaapi-@0@'.format(api_version),
- gstlibvaapi_sources,
- c_args : gstreamer_vaapi_args + ['-DIN_LIBGSTVAAPI_CORE', '-DGST_USE_UNSTABLE_API', '-DGST_VAAPI_VERSION_ID="@0@"'.format(gst_version)],
+ gstlibvaapi_sources + gstlibvaapi_headers,
+ c_args : gstreamer_vaapi_args + [ '-DGST_USE_UNSTABLE_API', '-DGST_VAAPI_VERSION_ID="@0@"'.format(gst_version)],
include_directories: [configinc, libsinc],
- version : libversion,
- soversion : soversion,
dependencies : gstlibvaapi_deps,
)
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/video-format.c
^
|
@@ -32,6 +32,12 @@
#include "gstvaapisurface.h"
#include "video-format.h"
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+# define VIDEO_VA_ENDIANESS VA_MSB_FIRST
+#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
+# define VIDEO_VA_ENDIANESS VA_LSB_FIRST
+#endif
+
typedef struct
{
GstVideoFormat format;
@@ -39,46 +45,49 @@
VAImageFormat va_format;
} GstVideoFormatMap;
-#define DEF_YUV(FORMAT, FOURCC, ENDIAN, BPP, SUB) \
+#define DEF_YUV(FORMAT, FOURCC, BPP, SUB) \
{ G_PASTE(GST_VIDEO_FORMAT_,FORMAT), \
G_PASTE(GST_VAAPI_CHROMA_TYPE_YUV,SUB), \
- { VA_FOURCC FOURCC, VA_##ENDIAN##_FIRST, BPP, }, }
+ { VA_FOURCC FOURCC, VIDEO_VA_ENDIANESS, BPP, }, }
-#define DEF_RGB(FORMAT, FOURCC, ENDIAN, BPP, DEPTH, R,G,B,A) \
+#define DEF_RGB(FORMAT, FOURCC, BPP, DEPTH, R,G,B,A) \
{ G_PASTE(GST_VIDEO_FORMAT_,FORMAT), \
G_PASTE(GST_VAAPI_CHROMA_TYPE_RGB,BPP), \
- { VA_FOURCC FOURCC, VA_##ENDIAN##_FIRST, BPP, DEPTH, R,G,B,A }, }
+ { VA_FOURCC FOURCC, VIDEO_VA_ENDIANESS, BPP, DEPTH, R,G,B,A }, }
/* Image formats, listed in HW order preference */
/* *INDENT-OFF* */
static const GstVideoFormatMap gst_vaapi_video_formats[] = {
- DEF_YUV (NV12, ('N', 'V', '1', '2'), LSB, 12, 420),
- DEF_YUV (YV12, ('Y', 'V', '1', '2'), LSB, 12, 420),
- DEF_YUV (I420, ('I', '4', '2', '0'), LSB, 12, 420),
- DEF_YUV (YUY2, ('Y', 'U', 'Y', '2'), LSB, 16, 422),
- DEF_YUV (UYVY, ('U', 'Y', 'V', 'Y'), LSB, 16, 422),
- DEF_YUV (AYUV, ('A', 'Y', 'U', 'V'), LSB, 32, 444),
-#if G_BYTE_ORDER == G_BIG_ENDIAN
- DEF_RGB (ARGB, ('A', 'R', 'G', 'B'), MSB, 32,
+ /* YUV formats */
+ DEF_YUV (NV12, ('N', 'V', '1', '2'), 12, 420),
+ DEF_YUV (YV12, ('Y', 'V', '1', '2'), 12, 420),
+ DEF_YUV (I420, ('I', '4', '2', '0'), 12, 420),
+ DEF_YUV (YUY2, ('Y', 'U', 'Y', '2'), 16, 422),
+ DEF_YUV (UYVY, ('U', 'Y', 'V', 'Y'), 16, 422),
+ DEF_YUV (Y210, ('Y', '2', '1', '0'), 32, 422_10BPP),
+ DEF_YUV (Y410, ('Y', '4', '1', '0'), 32, 444_10BPP),
+ DEF_YUV (AYUV, ('A', 'Y', 'U', 'V'), 32, 444),
+ DEF_YUV (GRAY8, ('Y', '8', '0', '0'), 8, 400),
+ DEF_YUV (P010_10LE, ('P', '0', '1', '0'), 24, 420_10BPP),
+ /* RGB formats */
+ DEF_RGB (ARGB, ('A', 'R', 'G', 'B'), 32,
32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000),
- DEF_RGB (ABGR, ('A', 'B', 'G', 'R'), MSB, 32,
+ DEF_RGB (ABGR, ('A', 'B', 'G', 'R'), 32,
32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000),
- DEF_RGB (xRGB, ('X', 'R', 'G', 'B'), MSB, 32,
+ DEF_RGB (xRGB, ('X', 'R', 'G', 'B'), 32,
24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000),
- DEF_RGB (xBGR, ('X', 'B', 'G', 'R'), MSB, 32,
+ DEF_RGB (xBGR, ('X', 'B', 'G', 'R'), 32,
24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000),
-#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
- DEF_RGB (BGRA, ('B', 'G', 'R', 'A'), LSB, 32,
+ DEF_RGB (BGRA, ('B', 'G', 'R', 'A'), 32,
32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000),
- DEF_RGB (RGBA, ('R', 'G', 'B', 'A'), LSB, 32,
+ DEF_RGB (RGBA, ('R', 'G', 'B', 'A'), 32,
32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000),
- DEF_RGB (BGRx, ('B', 'G', 'R', 'X'), LSB, 32,
+ DEF_RGB (BGRx, ('B', 'G', 'R', 'X'), 32,
24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000),
- DEF_RGB (RGBx, ('R', 'G', 'B', 'X'), LSB, 32,
+ DEF_RGB (RGBx, ('R', 'G', 'B', 'X'), 32,
24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000),
-#endif
- DEF_YUV (GRAY8, ('Y', '8', '0', '0'), LSB, 8, 400),
- DEF_YUV (P010_10LE, ('P', '0', '1', '0'), LSB, 24, 420_10BPP),
+ DEF_RGB (RGB16, ('R', 'G', '1', '6'), 16,
+ 16, 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000),
{0,}
};
/* *INDENT-ON* */
@@ -275,6 +284,39 @@
}
/**
+ * gst_vaapi_video_format_from_chroma:
+ * @chroma_type: a #GstVaapiChromaType
+ *
+ * Returns the "preferred" pixel format that matches with
+ * @chroma_type.
+ *
+ * Returns: the preferred pixel format for @chroma_type
+ **/
+GstVideoFormat
+gst_vaapi_video_format_from_chroma (guint chroma_type)
+{
+ switch (chroma_type) {
+ case GST_VAAPI_CHROMA_TYPE_YUV422:
+ return GST_VIDEO_FORMAT_YUY2;
+ case GST_VAAPI_CHROMA_TYPE_YUV400:
+ return GST_VIDEO_FORMAT_GRAY8;
+ case GST_VAAPI_CHROMA_TYPE_YUV420:
+ case GST_VAAPI_CHROMA_TYPE_RGB32: /* GstVideoGLTextureUploadMeta */
+ return GST_VIDEO_FORMAT_NV12;
+ case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
+ return GST_VIDEO_FORMAT_P010_10LE;
+ case GST_VAAPI_CHROMA_TYPE_YUV444:
+ return GST_VIDEO_FORMAT_AYUV;
+ case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
+ return GST_VIDEO_FORMAT_Y210;
+ case GST_VAAPI_CHROMA_TYPE_YUV444_10BPP:
+ return GST_VIDEO_FORMAT_Y410;
+ default:
+ return GST_VIDEO_FORMAT_UNKNOWN;
+ }
+}
+
+/**
* gst_vaapi_video_format_get_best_native:
* @format: a #GstVideoFormat
*
@@ -293,17 +335,5 @@
return GST_VIDEO_FORMAT_NV12;
chroma_type = gst_vaapi_video_format_get_chroma_type (format);
- switch (chroma_type) {
- case GST_VAAPI_CHROMA_TYPE_YUV422:
- return GST_VIDEO_FORMAT_YUY2;
- case GST_VAAPI_CHROMA_TYPE_YUV400:
- return GST_VIDEO_FORMAT_GRAY8;
- case GST_VAAPI_CHROMA_TYPE_YUV420:
- case GST_VAAPI_CHROMA_TYPE_RGB32: /* GstVideoGLTextureUploadMeta */
- return GST_VIDEO_FORMAT_NV12;
- case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
- return GST_VIDEO_FORMAT_P010_10LE;
- default:
- return GST_VIDEO_FORMAT_UNKNOWN;
- };
+ return gst_vaapi_video_format_from_chroma (chroma_type);
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst-libs/gst/vaapi/video-format.h
^
|
@@ -54,6 +54,9 @@
gst_vaapi_video_format_get_score (GstVideoFormat format);
GstVideoFormat
+gst_vaapi_video_format_from_chroma (guint chroma);
+
+GstVideoFormat
gst_vaapi_video_format_get_best_native (GstVideoFormat format);
G_END_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/Makefile.am
^
|
@@ -81,13 +81,19 @@
libgstvaapi_enc_source_c = \
gstvaapiencode.c \
gstvaapiencode_h264.c \
+ gstvaapiencode_h265.c \
+ gstvaapiencode_jpeg.c \
gstvaapiencode_mpeg2.c \
+ gstvaapiencode_vp8.c \
$(NULL)
libgstvaapi_enc_source_h = \
gstvaapiencode.h \
gstvaapiencode_h264.h \
+ gstvaapiencode_h265.h \
+ gstvaapiencode_jpeg.h \
gstvaapiencode_mpeg2.h \
+ gstvaapiencode_vp8.h \
$(NULL)
if USE_ENCODERS
@@ -95,27 +101,6 @@
libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
endif
-libgstvaapi_jpegenc_source_c = gstvaapiencode_jpeg.c
-libgstvaapi_jpegenc_source_h = gstvaapiencode_jpeg.h
-if USE_JPEG_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
-endif
-
-libgstvaapi_vp8enc_source_c = gstvaapiencode_vp8.c
-libgstvaapi_vp8enc_source_h = gstvaapiencode_vp8.h
-if USE_VP8_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
-endif
-
-libgstvaapi_h265enc_source_c = gstvaapiencode_h265.c
-libgstvaapi_h265enc_source_h = gstvaapiencode_h265.h
-if USE_H265_ENCODER
-libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
-libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
-endif
-
libgstvaapi_vp9enc_source_c = gstvaapiencode_vp9.c
libgstvaapi_vp9enc_source_h = gstvaapiencode_vp9.h
if USE_VP9_ENCODER
@@ -168,12 +153,6 @@
EXTRA_DIST = \
$(libgstvaapi_enc_source_c) \
$(libgstvaapi_enc_source_h) \
- $(libgstvaapi_jpegenc_source_c) \
- $(libgstvaapi_jpegenc_source_h) \
- $(libgstvaapi_vp8enc_source_c) \
- $(libgstvaapi_vp8enc_source_h) \
- $(libgstvaapi_h265enc_source_c) \
- $(libgstvaapi_h265enc_source_h) \
$(libgstvaapi_vp9enc_source_c) \
$(libgstvaapi_vp9enc_source_h) \
$(libgstvaapi_h264feienc_source_c) \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapi.c
^
|
@@ -31,18 +31,9 @@
#if USE_ENCODERS
#include "gstvaapiencode_h264.h"
#include "gstvaapiencode_mpeg2.h"
-
-#if USE_JPEG_ENCODER
#include "gstvaapiencode_jpeg.h"
-#endif
-
-#if USE_VP8_ENCODER
#include "gstvaapiencode_vp8.h"
-#endif
-
-#if USE_H265_ENCODER
#include "gstvaapiencode_h265.h"
-#endif
#if USE_VP9_ENCODER
#include "gstvaapiencode_vp9.h"
@@ -155,18 +146,12 @@
static const GstVaapiEncoderMap vaapi_encode_map[] = {
DEF_ENC (H264, h264),
DEF_ENC (MPEG2, mpeg2),
-#if USE_JPEG_ENCODER
DEF_ENC (JPEG, jpeg),
-#endif
-#if USE_VP8_ENCODER
DEF_ENC (VP8, vp8),
-#endif
#if USE_VP9_ENCODER
DEF_ENC (VP9, vp9),
#endif
-#if USE_H265_ENCODER
DEF_ENC (H265, h265),
-#endif
};
#undef DEF_ENC
@@ -244,7 +229,7 @@
gst_vaapiencode_register (plugin, display);
#endif
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
return TRUE;
@@ -258,7 +243,7 @@
}
unsupported_driver:
{
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
return TRUE; /* return TRUE to avoid get blacklisted */
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c
^
|
@@ -70,16 +70,10 @@
GST_CAPS_CODEC("video/x-xvid")
GST_CAPS_CODEC("video/x-h263")
GST_CAPS_CODEC("video/x-h264")
-#if USE_H265_DECODER
GST_CAPS_CODEC("video/x-h265")
-#endif
GST_CAPS_CODEC("video/x-wmv")
-#if USE_VP8_DECODER
GST_CAPS_CODEC("video/x-vp8")
-#endif
-#if USE_VP9_DECODER
GST_CAPS_CODEC("video/x-vp9")
-#endif
;
static const char gst_vaapidecode_src_caps_str[] =
@@ -87,7 +81,7 @@
#if (USE_GLX || USE_EGL)
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS ";"
#endif
- GST_VIDEO_CAPS_MAKE("{ NV12, I420, YV12, P010_10LE }") ";"
+ GST_VIDEO_CAPS_MAKE("{ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }") ";"
GST_VAAPI_MAKE_DMABUF_CAPS;
static GstStaticPadTemplate gst_vaapidecode_src_factory =
@@ -110,9 +104,7 @@
};
static const GstVaapiDecoderMap vaapi_decode_map[] = {
-#if USE_JPEG_DECODER
{GST_VAAPI_CODEC_JPEG, GST_RANK_MARGINAL, "jpeg", "image/jpeg", NULL},
-#endif
{GST_VAAPI_CODEC_MPEG2, GST_RANK_PRIMARY, "mpeg2",
"video/mpeg, mpegversion=2, systemstream=(boolean)false", NULL},
{GST_VAAPI_CODEC_MPEG4, GST_RANK_PRIMARY, "mpeg4",
@@ -122,15 +114,9 @@
gst_vaapi_decode_h264_install_properties},
{GST_VAAPI_CODEC_VC1, GST_RANK_PRIMARY, "vc1",
"video/x-wmv, wmvversion=3, format={WMV3,WVC1}", NULL},
-#if USE_VP8_DECODER
{GST_VAAPI_CODEC_VP8, GST_RANK_PRIMARY, "vp8", "video/x-vp8", NULL},
-#endif
-#if USE_VP9_DECODER
{GST_VAAPI_CODEC_VP9, GST_RANK_PRIMARY, "vp9", "video/x-vp9", NULL},
-#endif
-#if USE_H265_DECODER
{GST_VAAPI_CODEC_H265, GST_RANK_PRIMARY, "h265", "video/x-h265", NULL},
-#endif
{0 /* the rest */ , GST_RANK_PRIMARY + 1, NULL,
gst_vaapidecode_sink_caps_str, NULL},
};
@@ -238,8 +224,9 @@
out_caps = gst_caps_make_writable (out_caps);
gst_caps_append (out_caps, gst_caps_from_string (GST_VAAPI_MAKE_DMABUF_CAPS));
- raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps
- (GST_VAAPI_PLUGIN_BASE (decode));
+ raw_caps = gst_vaapi_plugin_base_get_allowed_srcpad_raw_caps
+ (GST_VAAPI_PLUGIN_BASE (decode),
+ GST_VIDEO_INFO_FORMAT (&decode->decoded_info));
if (!raw_caps) {
gst_caps_unref (out_caps);
GST_WARNING_OBJECT (decode, "failed to create raw sink caps");
@@ -760,8 +747,14 @@
ret = GST_FLOW_NOT_SUPPORTED;
break;
default:
+ ret = GST_FLOW_OK;
GST_VIDEO_DECODER_ERROR (vdec, 1, STREAM, DECODE, ("Decoding error"),
("Decode error %d", status), ret);
+ GST_INFO ("requesting upstream a key unit");
+ gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decode),
+ gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+ FALSE, 0));
+ ret = GST_FLOW_OK;
break;
}
gst_video_decoder_drop_frame (vdec, frame);
@@ -916,7 +909,6 @@
}
}
break;
-#if USE_H265_DECODER
case GST_VAAPI_CODEC_H265:
decode->decoder = gst_vaapi_decoder_h265_new (dpy, caps);
@@ -938,26 +930,19 @@
}
}
break;
-#endif
case GST_VAAPI_CODEC_WMV3:
case GST_VAAPI_CODEC_VC1:
decode->decoder = gst_vaapi_decoder_vc1_new (dpy, caps);
break;
-#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
decode->decoder = gst_vaapi_decoder_jpeg_new (dpy, caps);
break;
-#endif
-#if USE_VP8_DECODER
case GST_VAAPI_CODEC_VP8:
decode->decoder = gst_vaapi_decoder_vp8_new (dpy, caps);
break;
-#endif
-#if USE_VP9_DECODER
case GST_VAAPI_CODEC_VP9:
decode->decoder = gst_vaapi_decoder_vp9_new (dpy, caps);
break;
-#endif
default:
decode->decoder = NULL;
break;
@@ -1085,7 +1070,10 @@
success =
gst_vaapi_plugin_base_ensure_display (GST_VAAPI_PLUGIN_BASE (decode));
if (old_display)
- gst_vaapi_display_unref (old_display);
+ gst_object_unref (old_display);
+
+ /* Disable errors on decode errors */
+ gst_video_decoder_set_max_errors (vdec, -1);
return success;
}
@@ -1175,9 +1163,15 @@
decode->current_frame_size = 0;
break;
default:
- GST_ERROR ("parse error %d", status);
- ret = GST_FLOW_EOS;
+ GST_WARNING ("parse error %d", status);
+ /* just keep parsing, the decoder should have flushed the broken unit */
+ ret = GST_VAAPI_DECODE_FLOW_PARSE_DATA;
decode->current_frame_size = 0;
+
+ GST_INFO ("requesting upstream a key unit");
+ gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decode),
+ gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+ FALSE, 0));
break;
}
return ret;
@@ -1271,6 +1265,13 @@
have_high |= profile == GST_VAAPI_PROFILE_H264_HIGH;
}
+ if (have_high) {
+ allowed_sinkpad_caps =
+ add_h264_profile_in_caps (allowed_sinkpad_caps, "progressive-high");
+ allowed_sinkpad_caps =
+ add_h264_profile_in_caps (allowed_sinkpad_caps, "constrained-high");
+ }
+
if (base_only && (!have_mvc || !have_svc) && have_high) {
if (!have_mvc) {
GST_DEBUG ("base_only: force adding MVC profiles in caps");
@@ -1475,7 +1476,7 @@
element_class->set_context = gst_vaapi_base_set_context;
gst_element_class_set_static_metadata (element_class, longname,
- "Codec/Decoder/Video", description,
+ "Codec/Decoder/Video/Hardware", description,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>, "
"Halley Zhao <halley.zhao@intel.com>, "
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>, "
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapidecodebin.c
^
|
@@ -86,16 +86,10 @@
GST_CAPS_CODEC("video/x-xvid")
GST_CAPS_CODEC("video/x-h263")
GST_CAPS_CODEC("video/x-h264")
-#if USE_H265_DECODER
GST_CAPS_CODEC("video/x-h265")
-#endif
GST_CAPS_CODEC("video/x-wmv")
-#if USE_VP8_DECODER
GST_CAPS_CODEC("video/x-vp8")
-#endif
-#if USE_VP9_DECODER
GST_CAPS_CODEC("video/x-vp9")
-#endif
;
/* *INDENT-ON* */
@@ -252,7 +246,7 @@
element_class->change_state = gst_vaapi_decode_bin_change_state;
gst_element_class_set_static_metadata (element_class,
"VA-API Decode Bin",
- "Codec/Decoder/Video",
+ "Codec/Decoder/Video/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>, "
"Victor Jaquez <victorx.jaquez@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode.c
^
|
@@ -181,7 +181,7 @@
g_value_copy (value, &prop_value->value);
if (encoder)
- return (gst_vaapi_encoder_set_property (encoder, prop_id,
+ return (gst_vaapi_encoder_set_property (encoder, prop_value->id,
value) == GST_VAAPI_ENCODER_STATUS_SUCCESS);
return TRUE;
@@ -530,7 +530,7 @@
GST_VAAPI_PLUGIN_BASE_DISPLAY (encode) = NULL;
success = ensure_display (encode);
if (old_display)
- gst_vaapi_display_unref (old_display);
+ gst_object_unref (old_display);
return success;
}
@@ -591,7 +591,6 @@
gst_vaapiencode_set_format (GstVideoEncoder * venc, GstVideoCodecState * state)
{
GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
- gboolean ret;
g_return_val_if_fail (state->caps != NULL, FALSE);
@@ -610,12 +609,6 @@
encode->input_state = gst_video_codec_state_ref (state);
encode->input_state_changed = TRUE;
- ret = gst_pad_start_task (GST_VAAPI_PLUGIN_BASE_SRC_PAD (encode),
- (GstTaskFunction) gst_vaapiencode_buffer_loop, encode, NULL);
-
- if (!ret)
- return FALSE;
-
/* Store some tags */
{
GstTagList *tags = gst_tag_list_new_empty ();
@@ -650,16 +643,24 @@
GstVideoCodecFrame * frame)
{
GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
+ GstPad *const srcpad = GST_VAAPI_PLUGIN_BASE_SRC_PAD (encode);
GstVaapiEncoderStatus status;
GstVaapiVideoMeta *meta;
GstVaapiSurfaceProxy *proxy;
GstFlowReturn ret;
GstBuffer *buf;
+ GstTaskState task_state;
#if USE_H264_FEI_ENCODER
GstVaapiFeiVideoMeta *feimeta = NULL;
GstVaapiEncodeClass *const klass = GST_VAAPIENCODE_GET_CLASS (venc);
#endif
+ task_state = gst_pad_get_task_state (srcpad);
+ if (task_state == GST_TASK_STOPPED || task_state == GST_TASK_PAUSED)
+ if (!gst_pad_start_task (srcpad,
+ (GstTaskFunction) gst_vaapiencode_buffer_loop, encode, NULL))
+ goto error_task_failed;
+
buf = NULL;
ret = gst_vaapi_plugin_base_get_input_buffer (GST_VAAPI_PLUGIN_BASE (encode),
frame->input_buffer, &buf);
@@ -697,6 +698,13 @@
return GST_FLOW_OK;
/* ERRORS */
+error_task_failed:
+ {
+ GST_ELEMENT_ERROR (venc, RESOURCE, FAILED,
+ ("Failed to start encoding thread."), (NULL));
+ gst_video_codec_frame_unref (frame);
+ return GST_FLOW_ERROR;
+ }
error_buffer_invalid:
{
if (buf)
@@ -761,6 +769,9 @@
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_pad_stop_task (GST_VAAPI_PLUGIN_BASE_SRC_PAD (encode));
+
+ if (!gst_vaapiencode_drain (encode))
+ goto drain_error;
break;
default:
break;
@@ -768,6 +779,12 @@
return
GST_ELEMENT_CLASS (gst_vaapiencode_parent_class)->change_state (element,
transition);
+
+drain_error:
+ {
+ GST_ERROR ("failed to drain pending encoded frames");
+ return GST_STATE_CHANGE_FAILURE;
+ }
}
static gboolean
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_h264.c
^
|
@@ -38,11 +38,11 @@
* If #GstVaapiEncodeH264:dct8x8 is enabled, then High profile is
* used. Otherwise, if #GstVaapiEncodeH264:cabac entropy coding is
* enabled or #GstVaapiEncodeH264:max-bframes are allowed, then Main
- * Profile is in effect, and otherwise Baseline profile applies. The
- * high profile is imposed by default, which is fine for most software
- * players and settings, but in some cases (e.g. hardware platforms) a
- * more restricted profile/level may be necessary. The recommended way
- * to set a profile is to set it in the downstream caps.
+ * Profile is in effect. The element will alway go with the maximal
+ * profile available in the caps negotation and otherwise Baseline
+ * profile applies. But in some cases (e.g. hardware platforms) a more
+ * restrictedprofile/level may be necessary. The recommended way to
+ * set a profile is to set it in the downstream caps.
*
* You can also set parameters to adjust the latency of encoding:
* #GstVaapiEncodeH264:quality-level is a number between 1-7, in the
@@ -308,7 +308,7 @@
const char *stream_format = NULL;
GstStructure *structure;
guint i, num_structures;
- GstVaapiProfile profile;
+ GstVaapiProfile profile = GST_VAAPI_PROFILE_UNKNOWN;
GstCaps *available_caps;
available_caps = get_available_caps (encode);
@@ -319,7 +319,18 @@
}
if (!gst_caps_can_intersect (allowed_caps, available_caps)) {
GST_INFO_OBJECT (encode, "downstream requested an unsupported profile, "
- "but encoder will output a compatible one");
+ "but encoder will try to output a compatible one");
+
+ /* Let's try the best profile in the allowed caps.
+ * The internal encoder will fail later if it can't handle it */
+ profile = find_best_profile (allowed_caps);
+
+ } else {
+ GstCaps *profile_caps;
+ profile_caps = gst_caps_intersect (allowed_caps, available_caps);
+ profile = find_best_profile (profile_caps);
+
+ gst_caps_unref (profile_caps);
}
/* Check whether "stream-format" is avcC mode */
@@ -331,14 +342,14 @@
continue;
stream_format = gst_structure_get_string (structure, "stream-format");
}
- encode->is_avc = stream_format && strcmp (stream_format, "avc") == 0;
+ encode->is_avc = (g_strcmp0 (stream_format, "avc") == 0);
- /* Check for the largest profile that is supported */
- profile = find_best_profile (available_caps);
if (profile != GST_VAAPI_PROFILE_UNKNOWN) {
GST_INFO ("using %s profile as target decoder constraints",
gst_vaapi_utils_h264_get_profile_string (profile));
ret = gst_vaapi_encoder_h264_set_max_profile (encoder, profile);
+ } else {
+ ret = FALSE;
}
gst_caps_unref (allowed_caps);
@@ -390,6 +401,8 @@
ret = TRUE;
}
+ GST_INFO_OBJECT (encode, "out caps %" GST_PTR_FORMAT, caps);
+
if (!ret)
GST_LOG ("There is no compatible profile in the requested caps.");
@@ -580,7 +593,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API H264 encoder",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC, "Wind Yuan <feng.yuan@intel.com>");
/* sink pad */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_h264_fei.c
^
|
@@ -523,7 +523,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API H264 FEI Advanced encoder (Experimental)",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com> ,"
"Yi A Wang <yi.a.wang@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_h265.c
^
|
@@ -423,7 +423,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API H265 encoder",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_jpeg.c
^
|
@@ -161,7 +161,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API JPEG encoder",
- "Codec/Encoder/Image",
+ "Codec/Encoder/Image/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_mpeg2.c
^
|
@@ -165,7 +165,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API MPEG-2 encoder",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC, "Guangxin Xu <guangxin.xu@intel.com>");
/* sink pad */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_vp8.c
^
|
@@ -161,7 +161,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API VP8 encoder",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapiencode_vp9.c
^
|
@@ -161,7 +161,7 @@
gst_element_class_set_static_metadata (element_class,
"VA-API VP9 encoder",
- "Codec/Encoder/Video",
+ "Codec/Encoder/Video/Hardware",
GST_PLUGIN_DESC,
"Sreerenj Balachandran <sreerenj.balachandran@intel.com>");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipluginbase.c
^
|
@@ -57,7 +57,7 @@
plugin->display_type = gst_vaapi_display_get_display_type (display);
gst_vaapi_plugin_base_set_display_name (plugin, display_name);
}
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
}
/**
@@ -1253,51 +1253,99 @@
#endif
}
+static GArray *
+extract_allowed_surface_formats (GstVaapiDisplay * display,
+ GArray * img_formats, GstVideoFormat specified_format,
+ GstPadDirection direction)
+{
+ guint i;
+ GArray *out_formats;
+ GstVaapiSurface *surface = NULL;
+
+ g_assert (direction == GST_PAD_SRC || direction == GST_PAD_SINK);
+
+ out_formats =
+ g_array_sized_new (FALSE, FALSE, sizeof (GstVideoFormat),
+ img_formats->len);
+ if (!out_formats)
+ return NULL;
+
+ for (i = 0; i < img_formats->len; i++) {
+ const GstVideoFormat img_format =
+ g_array_index (img_formats, GstVideoFormat, i);
+ GstVaapiImage *image;
+ GstVideoInfo vi;
+ GstVideoFormat surface_format;
+ gboolean res;
+
+ if (img_format == GST_VIDEO_FORMAT_UNKNOWN)
+ continue;
+
+ surface_format =
+ (specified_format == GST_VIDEO_FORMAT_UNKNOWN) ?
+ img_format : specified_format;
+ if (!surface) {
+ gst_video_info_set_format (&vi, surface_format, 64, 64);
+ surface = gst_vaapi_surface_new_full (display, &vi, 0);
+ if (!surface)
+ continue;
+ }
+
+ image = gst_vaapi_image_new (display, img_format, 64, 64);
+ if (!image) {
+ /* Just reuse the surface if the format is specified */
+ if (specified_format == GST_VIDEO_FORMAT_UNKNOWN)
+ gst_vaapi_object_replace (&surface, NULL);
+
+ continue;
+ }
+
+ res = FALSE;
+ if (direction == GST_PAD_SRC) {
+ res = gst_vaapi_surface_get_image (surface, image);
+ } else {
+ res = gst_vaapi_surface_put_image (surface, image);
+ }
+ if (res)
+ g_array_append_val (out_formats, img_format);
+
+ gst_vaapi_object_unref (image);
+ /* Just reuse the surface if the format is specified */
+ if (specified_format == GST_VIDEO_FORMAT_UNKNOWN)
+ gst_vaapi_object_replace (&surface, NULL);
+ }
+
+ if (surface)
+ gst_vaapi_object_unref (surface);
+
+ if (out_formats->len == 0) {
+ g_array_unref (out_formats);
+ return NULL;
+ }
+ return out_formats;
+}
+
static gboolean
-ensure_allowed_raw_caps (GstVaapiPluginBase * plugin)
+ensure_allowed_raw_caps (GstVaapiPluginBase * plugin, GstVideoFormat format,
+ GstPadDirection direction)
{
GArray *formats, *out_formats;
- GstVaapiSurface *surface;
GstVaapiDisplay *display;
- guint i;
GstCaps *out_caps;
gboolean ret = FALSE;
if (plugin->allowed_raw_caps)
return TRUE;
- out_formats = formats = NULL;
- surface = NULL;
-
- display = gst_vaapi_display_ref (plugin->display);
+ out_formats = NULL;
+ display = gst_object_ref (plugin->display);
formats = gst_vaapi_display_get_image_formats (display);
if (!formats)
goto bail;
-
out_formats =
- g_array_sized_new (FALSE, FALSE, sizeof (GstVideoFormat), formats->len);
+ extract_allowed_surface_formats (display, formats, format, direction);
if (!out_formats)
goto bail;
-
- surface =
- gst_vaapi_surface_new (display, GST_VAAPI_CHROMA_TYPE_YUV420, 64, 64);
- if (!surface)
- goto bail;
-
- for (i = 0; i < formats->len; i++) {
- const GstVideoFormat format = g_array_index (formats, GstVideoFormat, i);
- GstVaapiImage *image;
-
- if (format == GST_VIDEO_FORMAT_UNKNOWN)
- continue;
- image = gst_vaapi_image_new (display, format, 64, 64);
- if (!image)
- continue;
- if (gst_vaapi_surface_put_image (surface, image))
- g_array_append_val (out_formats, format);
- gst_vaapi_object_unref (image);
- }
-
out_caps = gst_vaapi_video_format_new_template_caps_from_list (out_formats);
if (!out_caps)
goto bail;
@@ -1311,25 +1359,41 @@
g_array_unref (formats);
if (out_formats)
g_array_unref (out_formats);
- if (surface)
- gst_vaapi_object_unref (surface);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
return ret;
}
/**
- * gst_vaapi_plugin_base_get_allowed_raw_caps:
+ * gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps:
+ * @plugin: a #GstVaapiPluginBase
+ *
+ * Returns the raw #GstCaps allowed by the element.
+ *
+ * Returns: the allowed raw #GstCaps or %NULL
+ **/
+GstCaps *
+gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps (GstVaapiPluginBase * plugin)
+{
+ if (!ensure_allowed_raw_caps (plugin, GST_VIDEO_FORMAT_UNKNOWN, GST_PAD_SINK))
+ return NULL;
+ return plugin->allowed_raw_caps;
+}
+
+/**
+ * gst_vaapi_plugin_base_get_allowed_srcpad_raw_caps:
* @plugin: a #GstVaapiPluginBase
+ * @format: a #GstVideoFormat, the format we need to check
*
* Returns the raw #GstCaps allowed by the element.
*
* Returns: the allowed raw #GstCaps or %NULL
**/
GstCaps *
-gst_vaapi_plugin_base_get_allowed_raw_caps (GstVaapiPluginBase * plugin)
+gst_vaapi_plugin_base_get_allowed_srcpad_raw_caps (GstVaapiPluginBase *
+ plugin, GstVideoFormat format)
{
- if (!ensure_allowed_raw_caps (plugin))
+ if (!ensure_allowed_raw_caps (plugin, format, GST_PAD_SRC))
return NULL;
return plugin->allowed_raw_caps;
}
@@ -1348,7 +1412,7 @@
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (GstVaapiPluginBase * plugin,
GstObject * object)
{
-#if VA_CHECK_VERSION (0,36,0) && USE_EGL && USE_GST_GL_HELPERS
+#if USE_EGL && USE_GST_GL_HELPERS
GstGLContext *const gl_context = GST_GL_CONTEXT (object);
plugin->srcpad_can_dmabuf =
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipluginbase.h
^
|
@@ -251,7 +251,12 @@
G_GNUC_INTERNAL
GstCaps *
-gst_vaapi_plugin_base_get_allowed_raw_caps (GstVaapiPluginBase * plugin);
+gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps (GstVaapiPluginBase * plugin);
+
+G_GNUC_INTERNAL
+GstCaps *
+gst_vaapi_plugin_base_get_allowed_srcpad_raw_caps (
+ GstVaapiPluginBase * plugin, GstVideoFormat format);
G_GNUC_INTERNAL
void
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.c
^
|
@@ -41,6 +41,9 @@
#endif
#if USE_GST_GL_HELPERS
# include <gst/gl/gl.h>
+#if USE_EGL && GST_GL_HAVE_PLATFORM_EGL
+# include <gst/gl/egl/gstgldisplay_egl.h>
+#endif
#endif
#include "gstvaapipluginutil.h"
#include "gstvaapipluginbase.h"
@@ -129,123 +132,199 @@
}
return NULL;
}
-#endif
-static GstVaapiDisplay *
-gst_vaapi_create_display_from_gl_context (GstObject * gl_context_object)
+static GstVaapiDisplayType
+gst_vaapi_get_display_type_from_gl (GstGLDisplayType gl_display_type,
+ GstGLPlatform gl_platform)
{
-#if USE_GST_GL_HELPERS
- GstGLContext *const gl_context = GST_GL_CONTEXT (gl_context_object);
- GstGLDisplay *const gl_display = gst_gl_context_get_display (gl_context);
- gpointer native_display =
- GSIZE_TO_POINTER (gst_gl_display_get_handle (gl_display));
- GstGLPlatform platform = gst_gl_context_get_gl_platform (gl_context);
- GstVaapiDisplay *display, *out_display;
- GstVaapiDisplayType display_type;
-
- switch (gst_gl_display_get_handle_type (gl_display)) {
+ switch (gl_display_type) {
#if USE_X11
- case GST_GL_DISPLAY_TYPE_X11:
+ case GST_GL_DISPLAY_TYPE_X11:{
#if USE_GLX
- if (platform == GST_GL_PLATFORM_GLX) {
- display_type = GST_VAAPI_DISPLAY_TYPE_GLX;
- break;
- }
+ if (gl_platform == GST_GL_PLATFORM_GLX)
+ return GST_VAAPI_DISPLAY_TYPE_GLX;
#endif
- display_type = GST_VAAPI_DISPLAY_TYPE_X11;
- break;
+ return GST_VAAPI_DISPLAY_TYPE_X11;
+ }
#endif
#if USE_WAYLAND
- case GST_GL_DISPLAY_TYPE_WAYLAND:
- display_type = GST_VAAPI_DISPLAY_TYPE_WAYLAND;
- break;
+ case GST_GL_DISPLAY_TYPE_WAYLAND:{
+ return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
+ }
+#endif
+#if USE_EGL
+ case GST_GL_DISPLAY_TYPE_EGL:{
+ return GST_VAAPI_DISPLAY_TYPE_EGL;
+ }
#endif
- case GST_GL_DISPLAY_TYPE_ANY:{
- /* Derive from the active window */
- GstGLWindow *const gl_window = gst_gl_context_get_window (gl_context);
- const gchar *const gl_window_type = g_getenv ("GST_GL_WINDOW");
+ default:
+ /* unsupported display. Still DRM may work. */
+ break;
+ }
- display_type = GST_VAAPI_DISPLAY_TYPE_ANY;
- if (!gl_window)
- break;
- native_display = GSIZE_TO_POINTER (gst_gl_window_get_display (gl_window));
+ return GST_VAAPI_DISPLAY_TYPE_ANY;
+}
- if (gl_window_type) {
+static GstVaapiDisplayType
+gst_vaapi_get_display_type_from_gl_env (void)
+{
+ const gchar *const gl_window_type = g_getenv ("GST_GL_WINDOW");
+
+ if (!gl_window_type) {
+#if USE_X11 && GST_GL_HAVE_WINDOW_X11
+ return GST_VAAPI_DISPLAY_TYPE_X11;
+#elif USE_WAYLAND && GST_GL_HAVE_WINDOW_WAYLAND
+ return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
+#elif USE_EGL && GST_GL_HAVE_PLATFORM_EGL
+ return GST_VAAPI_DISPLAY_TYPE_EGL;
+#endif
+ }
#if USE_X11
- if (!display_type && g_strcmp0 (gl_window_type, "x11") == 0)
- display_type = GST_VAAPI_DISPLAY_TYPE_X11;
+ if (g_strcmp0 (gl_window_type, "x11") == 0)
+ return GST_VAAPI_DISPLAY_TYPE_X11;
#endif
#if USE_WAYLAND
- if (!display_type && g_strcmp0 (gl_window_type, "wayland") == 0)
- display_type = GST_VAAPI_DISPLAY_TYPE_WAYLAND;
+ if (g_strcmp0 (gl_window_type, "wayland") == 0)
+ return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
#endif
- } else {
-#if USE_X11 && GST_GL_HAVE_WINDOW_X11
- if (!display_type)
- display_type = GST_VAAPI_DISPLAY_TYPE_X11;
-#elif USE_WAYLAND && GST_GL_HAVE_WINDOW_WAYLAND
- if (!display_type)
- display_type = GST_VAAPI_DISPLAY_TYPE_WAYLAND;
+#if USE_EGL
+ {
+ const gchar *const gl_platform_type = g_getenv ("GST_GL_PLATFORM");
+ if (g_strcmp0 (gl_platform_type, "egl") == 0)
+ return GST_VAAPI_DISPLAY_TYPE_EGL;
+ }
#endif
- }
- gst_object_unref (gl_window);
- break;
- }
+
+ return GST_VAAPI_DISPLAY_TYPE_ANY;
+}
+
+#if USE_EGL
+static gint
+gst_vaapi_get_gles_version_from_gl_api (GstGLAPI gl_api)
+{
+ switch (gl_api) {
+ case GST_GL_API_GLES1:
+ return 1;
+ case GST_GL_API_GLES2:
+ return 2;
+ case GST_GL_API_OPENGL:
+ case GST_GL_API_OPENGL3:
+ return 0;
default:
- display_type = GST_VAAPI_DISPLAY_TYPE_ANY;
break;
}
- gst_object_unref (gl_display);
+ return -1;
+}
- display = gst_vaapi_create_display_from_handle (display_type, native_display);
- if (!display)
- return NULL;
+static guintptr
+gst_vaapi_get_egl_handle_from_gl_display (GstGLDisplay * gl_display)
+{
+ guintptr egl_handle = 0;
+ GstGLDisplayEGL *egl_display;
+
+ egl_display = gst_gl_display_egl_from_gl_display (gl_display);
+ if (egl_display) {
+ egl_handle = gst_gl_display_get_handle (GST_GL_DISPLAY (egl_display));
+ gst_object_unref (egl_display);
+ }
+ return egl_handle;
+}
+#endif /* USE_EGL */
- switch (platform) {
+static GstVaapiDisplay *
+gst_vaapi_create_display_from_egl (GstGLDisplay * gl_display,
+ GstGLContext * gl_context, GstVaapiDisplayType display_type,
+ gpointer native_display)
+{
+ GstVaapiDisplay *display = NULL;
#if USE_EGL
- case GST_GL_PLATFORM_EGL:{
- guint gles_version;
+ GstGLAPI gl_api;
+ gint gles_version;
+ guintptr egl_handler;
+
+ gl_api = gst_gl_context_get_gl_api (gl_context);
+ gles_version = gst_vaapi_get_gles_version_from_gl_api (gl_api);
+ if (gles_version == -1)
+ return NULL;
- switch (gst_gl_context_get_gl_api (gl_context)) {
- case GST_GL_API_GLES1:
- gles_version = 1;
- goto create_egl_display;
- case GST_GL_API_GLES2:
- gles_version = 2;
- goto create_egl_display;
- case GST_GL_API_OPENGL:
- case GST_GL_API_OPENGL3:
- gles_version = 0;
- create_egl_display:
- out_display = gst_vaapi_display_egl_new (display, gles_version);
- break;
- default:
- out_display = NULL;
- break;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.h
^
|
@@ -105,7 +105,7 @@
#define GST_VAAPI_MAKE_SURFACE_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
- GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, P010_10LE }")
+ GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV, Y410 }")
#define GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c
^
|
@@ -244,13 +244,17 @@
if (!gst_vaapipostproc_ensure_filter (postproc))
return FALSE;
- postproc->filter_ops = gst_vaapi_filter_get_operations (postproc->filter);
- if (!postproc->filter_ops)
- return FALSE;
+ if (!postproc->filter_ops) {
+ postproc->filter_ops = gst_vaapi_filter_get_operations (postproc->filter);
+ if (!postproc->filter_ops)
+ return FALSE;
+ }
- postproc->filter_formats = gst_vaapi_filter_get_formats (postproc->filter);
- if (!postproc->filter_formats)
- return FALSE;
+ if (!postproc->filter_formats) {
+ postproc->filter_formats = gst_vaapi_filter_get_formats (postproc->filter);
+ if (!postproc->filter_formats)
+ return FALSE;
+ }
return TRUE;
}
@@ -318,6 +322,7 @@
{
GstVaapiPostproc *const postproc = GST_VAAPIPOSTPROC (trans);
+ g_mutex_lock (&postproc->postproc_lock);
ds_reset (&postproc->deinterlace_state);
gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (postproc));
@@ -325,6 +330,7 @@
gst_video_info_init (&postproc->sinkpad_info);
gst_video_info_init (&postproc->srcpad_info);
gst_video_info_init (&postproc->filter_pool_info);
+ g_mutex_unlock (&postproc->postproc_lock);
return TRUE;
}
@@ -721,13 +727,15 @@
if (!outbuf_meta)
goto error_create_meta;
- proxy =
- gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL
- (postproc->filter_pool));
- if (!proxy)
- goto error_create_proxy;
- gst_vaapi_video_meta_set_surface_proxy (outbuf_meta, proxy);
- gst_vaapi_surface_proxy_unref (proxy);
+ if (!gst_vaapi_video_meta_get_surface_proxy (outbuf_meta)) {
+ proxy =
+ gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL
+ (postproc->filter_pool));
+ if (!proxy)
+ goto error_create_proxy;
+ gst_vaapi_video_meta_set_surface_proxy (outbuf_meta, proxy);
+ gst_vaapi_surface_proxy_unref (proxy);
+ }
if (deint) {
deint_flags = (tff ? GST_VAAPI_DEINTERLACE_FLAG_TOPFIELD : 0);
@@ -1066,7 +1074,7 @@
if (GST_VIDEO_INFO_WIDTH (&postproc->srcpad_info) !=
GST_VIDEO_INFO_WIDTH (&postproc->sinkpad_info)
- && GST_VIDEO_INFO_HEIGHT (&postproc->srcpad_info) !=
+ || GST_VIDEO_INFO_HEIGHT (&postproc->srcpad_info) !=
GST_VIDEO_INFO_HEIGHT (&postproc->sinkpad_info))
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SIZE;
@@ -1092,7 +1100,7 @@
return FALSE;
}
- raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps
+ raw_caps = gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps
(GST_VAAPI_PLUGIN_BASE (postproc));
if (!raw_caps) {
gst_caps_unref (out_caps);
@@ -1280,6 +1288,11 @@
/* dont' GstVideoCropMeta if use_vpp */
if (meta->info->api == GST_VIDEO_CROP_META_API_TYPE && postproc->use_vpp)
return FALSE;
+
+ /* don't copy GstParentBufferMeta if use_vpp */
+ if (meta->info->api == GST_PARENT_BUFFER_META_API_TYPE && postproc->use_vpp)
+ return FALSE;
+
return TRUE;
}
@@ -1309,9 +1322,7 @@
ret = GST_FLOW_NOT_SUPPORTED;
if (postproc->flags) {
/* Use VA/VPP extensions to process this frame */
- if (postproc->has_vpp &&
- (postproc->flags != GST_VAAPI_POSTPROC_FLAG_DEINTERLACE ||
- deint_method_is_advanced (postproc->deinterlace_method))) {
+ if (postproc->has_vpp) {
ret = gst_vaapipostproc_process_vpp (trans, buf, outbuf);
if (ret != GST_FLOW_NOT_SUPPORTED)
goto done;
@@ -1711,8 +1722,7 @@
element_class->set_context = gst_vaapi_base_set_context;
gst_element_class_set_static_metadata (element_class,
"VA-API video postprocessing",
- "Filter/Converter/Video;Filter/Converter/Video/Scaler;"
- "Filter/Effect/Video;Filter/Effect/Video/Deinterlace",
+ "Filter/Converter/Effect/Video/Scaler/Deinterlace/Hardware",
GST_PLUGIN_DESC, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* sink pad */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapipostprocutil.c
^
|
@@ -709,9 +709,11 @@
/* we don't need to do format conversion if GL_TEXTURE_UPLOAD_META
* is negotiated */
- if (f != GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META
- && postproc->format != format)
+ if (f == GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META) {
+ postproc->format = DEFAULT_FORMAT;
+ } else if (postproc->format != format) {
postproc->format = format;
+ }
return outcaps;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapisink.c
^
|
@@ -439,6 +439,35 @@
}
if (do_expose)
gst_vaapisink_video_overlay_expose (GST_VIDEO_OVERLAY (sink));
+
+ /* Handle Display events */
+ for (;;) {
+ gst_vaapi_display_lock (display);
+ if (XPending (x11_dpy) == 0) {
+ gst_vaapi_display_unlock (display);
+ break;
+ }
+ XNextEvent (x11_dpy, &e);
+ gst_vaapi_display_unlock (display);
+
+ switch (e.type) {
+ case ClientMessage:{
+ Atom wm_delete;
+
+ wm_delete = XInternAtom (x11_dpy, "WM_DELETE_WINDOW", False);
+ if (wm_delete == (Atom) e.xclient.data.l[0]) {
+ /* Handle window deletion by posting an error on the bus */
+ GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
+ ("Output window was closed"), (NULL));
+ return FALSE;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
}
return TRUE;
}
@@ -452,7 +481,7 @@
PointerMotionMask | ExposureMask | StructureNotifyMask);
if (!sink->foreign_window)
- x11_event_mask |= ButtonPressMask | ButtonReleaseMask;
+ x11_event_mask |= ButtonPressMask | ButtonReleaseMask;
if (sink->window) {
gst_vaapi_display_lock (GST_VAAPI_DISPLAY (display));
@@ -504,6 +533,17 @@
#include <gst/vaapi/gstvaapidisplay_wayland.h>
#include <gst/vaapi/gstvaapiwindow_wayland.h>
+static void
+on_window_wayland_size_changed (GstVaapiWindowWayland * window, gint width,
+ gint height, gpointer user_data)
+{
+ GstVaapiSink *sink = GST_VAAPISINK (user_data);
+
+ GST_DEBUG ("Wayland window size changed to: %dx%d", width, height);
+ gst_vaapisink_reconfigure_window (sink);
+ gst_vaapisink_show_frame (GST_VIDEO_SINK_CAST (sink), NULL);
+}
+
static gboolean
gst_vaapisink_wayland_create_window (GstVaapiSink * sink, guint width,
guint height)
@@ -515,6 +555,10 @@
sink->window = gst_vaapi_window_wayland_new (display, width, height);
if (!sink->window)
return FALSE;
+
+ g_signal_connect_object (sink->window, "size-changed",
+ G_CALLBACK (on_window_wayland_size_changed), sink, 0);
+
return TRUE;
}
@@ -1215,7 +1259,7 @@
/* Ensures possible raw caps earlier to avoid race conditions at
* get_caps() */
- if (!gst_vaapi_plugin_base_get_allowed_raw_caps (plugin))
+ if (!gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps (plugin))
return FALSE;
return TRUE;
@@ -1251,7 +1295,8 @@
out_caps = gst_caps_from_string (surface_caps_str);
raw_caps =
- gst_vaapi_plugin_base_get_allowed_raw_caps (GST_VAAPI_PLUGIN_BASE (sink));
+ gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps (GST_VAAPI_PLUGIN_BASE
+ (sink));
if (!raw_caps)
return out_caps;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapivideobufferpool.c
^
|
@@ -32,9 +32,6 @@
GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapivideopool);
#define GST_CAT_DEFAULT gst_debug_vaapivideopool
-G_DEFINE_TYPE (GstVaapiVideoBufferPool,
- gst_vaapi_video_buffer_pool, GST_TYPE_BUFFER_POOL);
-
enum
{
PROP_0,
@@ -52,9 +49,8 @@
guint forced_video_meta:1;
};
-#define GST_VAAPI_VIDEO_BUFFER_POOL_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_VAAPI_TYPE_VIDEO_BUFFER_POOL, \
- GstVaapiVideoBufferPoolPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiVideoBufferPool,
+ gst_vaapi_video_buffer_pool, GST_TYPE_BUFFER_POOL);
static void
gst_vaapi_video_buffer_pool_finalize (GObject * object)
@@ -77,7 +73,7 @@
switch (prop_id) {
case PROP_DISPLAY:
- priv->display = gst_vaapi_display_ref (g_value_get_pointer (value));
+ priv->display = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -497,8 +493,6 @@
GST_DEBUG_CATEGORY_INIT (gst_debug_vaapivideopool,
"vaapivideopool", 0, "VA-API video pool");
- g_type_class_add_private (klass, sizeof (GstVaapiVideoBufferPoolPrivate));
-
object_class->finalize = gst_vaapi_video_buffer_pool_finalize;
object_class->set_property = gst_vaapi_video_buffer_pool_set_property;
object_class->get_property = gst_vaapi_video_buffer_pool_get_property;
@@ -516,19 +510,15 @@
g_object_class_install_property
(object_class,
PROP_DISPLAY,
- g_param_spec_pointer ("display",
- "Display",
+ g_param_spec_object ("display", "Display",
"The GstVaapiDisplay to use for this video pool",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ GST_TYPE_VAAPI_DISPLAY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
static void
gst_vaapi_video_buffer_pool_init (GstVaapiVideoBufferPool * pool)
{
- GstVaapiVideoBufferPoolPrivate *const priv =
- GST_VAAPI_VIDEO_BUFFER_POOL_GET_PRIVATE (pool);
-
- pool->priv = priv;
+ pool->priv = gst_vaapi_video_buffer_pool_get_instance_private (pool);
}
GstBufferPool *
@@ -552,10 +542,9 @@
gboolean
gst_vaapi_video_buffer_pool_copy_buffer (GstBufferPool * pool)
{
- GstVaapiVideoBufferPoolPrivate *priv;
+ GstVaapiVideoBufferPool *va_pool = (GstVaapiVideoBufferPool *) pool;
g_return_val_if_fail (GST_VAAPI_IS_VIDEO_BUFFER_POOL (pool), FALSE);
- priv = GST_VAAPI_VIDEO_BUFFER_POOL_GET_PRIVATE (pool);
- return priv->forced_video_meta;
+ return va_pool->priv->forced_video_meta;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapivideocontext.c
^
|
@@ -31,6 +31,9 @@
#if USE_X11
#include <gst/vaapi/gstvaapidisplay_x11.h>
#endif
+#if USE_WAYLAND
+#include <gst/vaapi/gstvaapidisplay_wayland.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (GST_CAT_CONTEXT);
@@ -103,6 +106,17 @@
gst_vaapi_display_x11_new_with_va_display (va_display, x11_display);
}
#endif
+#if USE_WAYLAND
+ if (!display) {
+ struct wl_display *wl_display = NULL;
+ if (gst_structure_get (structure, "wl-display", G_TYPE_POINTER,
+ &wl_display, NULL)) {
+ display =
+ gst_vaapi_display_wayland_new_with_va_display (va_display,
+ wl_display);
+ }
+ }
+#endif
_init_context_debug ();
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapivideomemory.c
^
|
@@ -162,30 +162,6 @@
return TRUE;
}
-static GstVaapiSurface *
-new_surface (GstVaapiDisplay * display, const GstVideoInfo * vip,
- GstVaapiImageUsageFlags usage_flag)
-{
- GstVaapiSurface *surface;
- GstVaapiChromaType chroma_type;
-
- /* Try with explicit format first */
- if (!use_native_formats (usage_flag) &&
- GST_VIDEO_INFO_FORMAT (vip) != GST_VIDEO_FORMAT_ENCODED) {
- surface = gst_vaapi_surface_new_full (display, vip, 0);
- if (surface)
- return surface;
- }
-
- /* Try to pick something compatible, i.e. with same chroma type */
- chroma_type =
- gst_vaapi_video_format_get_chroma_type (GST_VIDEO_INFO_FORMAT (vip));
- if (!chroma_type)
- return NULL;
- return gst_vaapi_surface_new (display, chroma_type,
- GST_VIDEO_INFO_WIDTH (vip), GST_VIDEO_INFO_HEIGHT (vip));
-}
-
static GstVaapiSurfaceProxy *
new_surface_proxy (GstVaapiVideoMemory * mem)
{
@@ -733,7 +709,7 @@
/* ERRORS */
error_no_derive_image:
{
- GST_ERROR ("Cannot create a VA derived image from surface %p", surface);
+ GST_INFO ("Cannot create a VA derived image from surface %p", surface);
return FALSE;
}
error_cannot_map:
@@ -743,63 +719,117 @@
}
}
+#ifndef GST_DISABLE_GST_DEBUG
+static const gchar *
+gst_vaapi_image_usage_flags_to_string (GstVaapiImageUsageFlags usage_flag)
+{
+ switch (usage_flag) {
+ case GST_VAAPI_IMAGE_USAGE_FLAG_NATIVE_FORMATS:
+ return "native uploading";
+ case GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_RENDER:
+ return "direct rendering";
+ case GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_UPLOAD:
+ return "direct uploading";
+ default:
+ return "unknown";
+ }
+}
+#endif
+
static inline gboolean
-allocator_configure_surface_info (GstVaapiDisplay * display,
- GstVaapiVideoAllocator * allocator, GstVaapiImageUsageFlags req_usage_flag)
+allocator_configure_surface_try_specified_format (GstVaapiDisplay * display,
+ const GstVideoInfo * allocation_info, GstVaapiImageUsageFlags usage_flag,
+ GstVideoInfo * ret_surface_info, GstVaapiImageUsageFlags * ret_usage_flag)
{
- const GstVideoInfo *vinfo;
- GstVideoInfo *sinfo;
- GstVaapiSurface *surface = NULL;
- GstVideoFormat fmt;
+ GstVaapiImageUsageFlags rflag;
+ GstVaapiSurface *surface;
+ GstVideoInfo sinfo, rinfo;
- vinfo = &allocator->allocation_info;
- allocator->usage_flag = GST_VAAPI_IMAGE_USAGE_FLAG_NATIVE_FORMATS;
+ /* Try to create a surface with the given allocation info */
+ surface = gst_vaapi_surface_new_full (display, allocation_info, 0);
+ if (!surface)
+ return FALSE;
- fmt = gst_vaapi_video_format_get_best_native (GST_VIDEO_INFO_FORMAT (vinfo));
- if (fmt == GST_VIDEO_FORMAT_UNKNOWN)
- goto error_invalid_format;
+ /* surface created and just native format usage was requested */
+ if (use_native_formats (usage_flag)) {
+ rflag = GST_VAAPI_IMAGE_USAGE_FLAG_NATIVE_FORMATS;
+ rinfo = *allocation_info;
+ goto out;
+ }
- gst_video_info_set_format (&allocator->surface_info, fmt,
- GST_VIDEO_INFO_WIDTH (vinfo), GST_VIDEO_INFO_HEIGHT (vinfo));
+ /* Further checks whether that surface can support direct
+ * upload/render */
+ if (gst_video_info_update_from_surface (&sinfo, surface)) {
+ if (GST_VIDEO_INFO_FORMAT (&sinfo) ==
+ GST_VIDEO_INFO_FORMAT (allocation_info)) {
+ /* Set the correct flag */
+ if (use_direct_rendering (usage_flag)
+ && !use_direct_uploading (usage_flag)) {
+ rflag = GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_RENDER;
+ } else if (!use_direct_rendering (usage_flag)
+ && use_direct_uploading (usage_flag)) {
+ rflag = GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_UPLOAD;
+ } else {
+ g_assert_not_reached ();
+ }
+ } else {
+ /* It shouldn't happen, but still it's possible. Just use
+ * native. */
+ GST_FIXME ("Got a derive image with different format!");
+ rflag = GST_VAAPI_IMAGE_USAGE_FLAG_NATIVE_FORMATS;
+ }
- /* nothing to configure */
- if (use_native_formats (req_usage_flag)
- || GST_VIDEO_INFO_FORMAT (vinfo) == GST_VIDEO_FORMAT_ENCODED)
- return TRUE;
+ rinfo = sinfo;
+ goto out;
+ }
- surface = new_surface (display, vinfo, req_usage_flag);
- if (!surface)
- goto error_no_surface;
+ /* Can not derive image or not the same format, don't use derived
+ images, just fallback to use native */
+ rflag = GST_VAAPI_IMAGE_USAGE_FLAG_NATIVE_FORMATS;
+ rinfo = *allocation_info;
- sinfo = &allocator->surface_info;
- if (!gst_video_info_update_from_surface (sinfo, surface))
- goto bail;
+out:
+ gst_vaapi_object_unref (surface);
- /* if not the same format, don't use derived images */
- if (GST_VIDEO_INFO_FORMAT (sinfo) != GST_VIDEO_INFO_FORMAT (vinfo))
- goto bail;
+ *ret_surface_info = rinfo;
+ *ret_usage_flag = rflag;
+ return TRUE;
+}
- if (use_direct_rendering (req_usage_flag)
- && !use_direct_uploading (req_usage_flag)) {
- allocator->usage_flag = GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_RENDER;
- GST_INFO_OBJECT (allocator, "has direct-rendering for %s surfaces",
- GST_VIDEO_INFO_FORMAT_STRING (sinfo));
- } else if (!use_direct_rendering (req_usage_flag)
- && use_direct_uploading (req_usage_flag)) {
- allocator->usage_flag = GST_VAAPI_IMAGE_USAGE_FLAG_DIRECT_UPLOAD;
- GST_INFO_OBJECT (allocator, "has direct-uploading for %s surfaces",
- GST_VIDEO_INFO_FORMAT_STRING (sinfo));
- }
+static inline gboolean
+allocator_configure_surface_try_other_format (GstVaapiDisplay * display,
+ const GstVideoInfo * allocation_info, GstVideoInfo * ret_surface_info)
+{
+ GstVaapiSurface *surface;
+ GstVideoFormat fmt;
+ GstVideoInfo sinfo;
-bail:
- if (surface)
- gst_vaapi_object_unref (surface);
+ /* Find a best native surface format if possible */
+ fmt = gst_vaapi_video_format_get_best_native
+ (GST_VIDEO_INFO_FORMAT (allocation_info));
+ if (fmt == GST_VIDEO_FORMAT_UNKNOWN
+ || fmt == GST_VIDEO_INFO_FORMAT (allocation_info))
+ goto error_invalid_format;
+
+ /* create a info with "best native" format */
+ gst_video_info_set_format (&sinfo, fmt,
+ GST_VIDEO_INFO_WIDTH (allocation_info),
+ GST_VIDEO_INFO_HEIGHT (allocation_info));
+
+ /* try it */
+ surface = gst_vaapi_surface_new_full (display, &sinfo, 0);
+ if (!surface)
+ goto error_no_surface;
+ gst_vaapi_object_unref (surface);
+
+ *ret_surface_info = sinfo;
return TRUE;
/* ERRORS */
error_invalid_format:
{
- GST_ERROR ("Cannot handle format %s", GST_VIDEO_INFO_FORMAT_STRING (vinfo));
+ GST_ERROR ("Cannot handle format %s",
+ GST_VIDEO_INFO_FORMAT_STRING (allocation_info));
return FALSE;
}
error_no_surface:
@@ -810,6 +840,50 @@
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapivideometa.c
^
|
@@ -226,7 +226,7 @@
copy->buffer = NULL;
copy->ref_count = 1;
- copy->display = gst_vaapi_display_ref (meta->display);
+ copy->display = gst_object_ref (meta->display);
copy->image_pool = NULL;
copy->image = meta->image ? gst_vaapi_object_ref (meta->image) : NULL;
copy->proxy = meta->proxy ? gst_vaapi_surface_proxy_copy (meta->proxy) : NULL;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/gstvaapivideometa_texture.c
^
|
@@ -178,7 +178,8 @@
GstVaapiSurfaceProxy *const proxy =
gst_vaapi_video_meta_get_surface_proxy (vmeta);
GstVaapiSurface *const surface = gst_vaapi_surface_proxy_get_surface (proxy);
- GstVaapiDisplay *const dpy = GST_VAAPI_OBJECT_DISPLAY (surface);
+ GstVaapiDisplay *const dpy =
+ gst_vaapi_object_get_display (GST_VAAPI_OBJECT (surface));
GstVaapiTexture *texture = NULL;
if (!gst_vaapi_display_has_opengl (dpy))
@@ -186,7 +187,8 @@
if (meta_texture->texture
/* Check whether VA display changed */
- && GST_VAAPI_OBJECT_DISPLAY (meta_texture->texture) == dpy
+ && gst_vaapi_object_get_display
+ (GST_VAAPI_OBJECT (meta_texture->texture)) == dpy
/* Check whether texture id changed */
&& (gst_vaapi_texture_get_id (meta_texture->texture) == texture_id[0])) {
texture = meta_texture->texture;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gst/vaapi/meson.build
^
|
@@ -21,26 +21,24 @@
vaapi_sources += [
'gstvaapiencode.c',
'gstvaapiencode_h264.c',
+ 'gstvaapiencode_h265.c',
+ 'gstvaapiencode_jpeg.c',
'gstvaapiencode_mpeg2.c',
+ 'gstvaapiencode_vp8.c',
]
endif
-if USE_JPEG_ENCODER
- vaapi_sources += 'gstvaapiencode_jpeg.c'
-endif
-
-if USE_VP8_ENCODER
- vaapi_sources += 'gstvaapiencode_vp8.c'
-endif
-
-if USE_H265_ENCODER
- vaapi_sources += 'gstvaapiencode_h265.c'
-endif
-
if USE_VP9_ENCODER
vaapi_sources += 'gstvaapiencode_vp9.c'
endif
+if USE_H264_FEI_ENCODER
+ vaapi_sources += [
+ 'gstvaapifeivideometa.c',
+ 'gstvaapiencode_h264_fei.c',
+ ]
+endif
+
gstvaapi = library('gstvaapi',
vaapi_sources,
c_args : gstreamer_vaapi_args + ['-DGST_USE_UNSTABLE_API'],
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/gstreamer-vaapi.doap
^
|
@@ -20,18 +20,58 @@
<repository>
<GitRepository>
- <location rdf:resource="git://anongit.freedesktop.org/gstreamer/gstreamer-vaapi"/>
- <browse rdf:resource="http://cgit.freedesktop.org/gstreamer/gstreamer-vaapi"/>
+ <location rdf:resource="git://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi"/>
+ <browse rdf:resource="http://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi"/>
</GitRepository>
</repository>
<release>
<Version>
- <revision>1.14.1</revision>
- <branch>1.14</branch>
+ <revision>1.16.1</revision>
+ <branch>1.16</branch>
<name></name>
- <created>2018-05-17</created>
- <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.14.1.tar.xz" />
+ <created>2019-09-23</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.16.1.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
+ <revision>1.16.0</revision>
+ <branch>master</branch>
+ <name></name>
+ <created>2019-04-19</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.16.0.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
+ <revision>1.15.90</revision>
+ <branch>master</branch>
+ <name></name>
+ <created>2019-04-11</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.15.90.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
+ <revision>1.15.2</revision>
+ <branch>master</branch>
+ <name></name>
+ <created>2019-02-26</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.15.2.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
+ <revision>1.15.1</revision>
+ <branch>master</branch>
+ <name></name>
+ <created>2019-01-17</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.15.1.tar.xz" />
</Version>
</release>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/meson.build
^
|
@@ -1,6 +1,6 @@
project('gstreamer-vaapi', 'c',
- version : '1.14.1',
- meson_version : '>= 0.36.0',
+ version : '1.16.1',
+ meson_version : '>= 0.47.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
@@ -15,12 +15,17 @@
gst_version_nano = 0
endif
-libva_req = ['>= 0.30.4', '!= 0.99.0']
+libva_req = ['>= 0.39.0', '!= 0.99.0']
glib_req = '>= 2.40.0'
+libwayland_req = '>= 1.11.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
cc = meson.get_compiler('c')
+if cc.has_link_argument('-Wl,-Bsymbolic-functions')
+ add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
+endif
+
# Symbol visibility
if cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
@@ -47,23 +52,46 @@
fallback : ['gst-plugins-bad', 'gstcodecparsers_dep'])
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstgl_dep'], required: false)
+
+# Disable compiler warnings for unused variables and args if gst debug system is disabled
+if gst_dep.type_name() == 'internal'
+ gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
+else
+ # We can't check that in the case of subprojects as we won't
+ # be able to build against an internal dependency (which is not built yet)
+ gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
+endif
+
+if gst_debug_disabled
+ message('GStreamer debug system is disabled')
+ add_project_arguments(cc.get_supported_arguments(['-Wno-unused']), language: 'c')
+else
+ message('GStreamer debug system is enabled')
+endif
+
+# Other deps
gmodule_dep = dependency('gmodule-2.0', required: false)
libva_dep = dependency('libva', version: libva_req)
-libva_drm_dep = dependency('libva-drm', version: '>= 0.33.0', required: false)
-libva_wayland_dep = dependency('libva-wayland', version: '>= 0.33.0', required: false)
-libva_x11_dep = dependency('libva-x11', version: '>= 0.31.0', required: false)
+libva_drm_dep = dependency('libva-drm', version: libva_req, required: false)
+libva_wayland_dep = dependency('libva-wayland', version: libva_req, required: false)
+libva_x11_dep = dependency('libva-x11', version: libva_req, required: false)
libdrm_dep = dependency('libdrm', required: false)
libudev_dep = dependency('libudev', required: false)
egl_dep = dependency('egl', required: false)
gl_dep = dependency('gl', required: false)
glesv2_dep = dependency('glesv2', required: false)
libdl_dep = cc.find_library('dl', required: false)
-wayland_client_dep = dependency('wayland-client', required: false)
+wayland_client_dep = dependency('wayland-client', version: libwayland_req, required: false)
+wayland_protocols_dep = dependency('wayland-protocols', version: '>= 1.15', required: false)
+wayland_scanner_bin = find_program('wayland-scanner', required: false)
x11_dep = dependency('x11', required: false)
xrandr_dep = dependency('xrandr', required: false)
xrender_dep = dependency('xrender', required: false)
+# some of the examples can use GTK+-3
+gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : get_option('examples'))
+
GLES_VERSION_MASK = gl_dep.found() ? 1 : 0
if glesv2_dep.found()
if (cc.has_header('GLES2/gl2.h', dependencies: glesv2_dep) and
@@ -77,24 +105,21 @@
endif
endif
-USE_ENCODERS = libva_dep.version().version_compare('>= 0.34.0') and get_option('with_encoders') != 'no'
-USE_H265_DECODER = cc.has_header('va/va_dec_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_H265_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_JPEG_DECODER = cc.has_header('va/va_dec_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_JPEG_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_VP8_DECODER = cc.has_header('va/va_dec_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_VP8_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-USE_VP9_DECODER = cc.has_header('va/va_dec_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
+USE_ENCODERS = get_option('with_encoders') != 'no'
USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
-
-USE_VPP = cc.has_header('va/va_vpp.h', dependencies: libva_dep, prefix: '#include <va/va_vpp.h>')
+USE_H264_FEI_ENCODER = USE_ENCODERS and cc.has_header('va/va_fei_h264.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no'
-USE_WAYLAND = libva_wayland_dep.found() and wayland_client_dep.found() and get_option('with_wayland') != 'no'
+USE_WAYLAND = libva_wayland_dep.found() and wayland_client_dep.found() and wayland_protocols_dep.found() and wayland_scanner_bin.found() and get_option('with_wayland') != 'no'
USE_X11 = libva_x11_dep.found() and x11_dep.found() and get_option('with_x11') != 'no'
+driverdir = libva_dep.get_pkgconfig_variable('driverdir')
+if driverdir == ''
+ driverdir = '@0@/@1@/@2@'.format(get_option('prefix'), get_option('libdir'), 'dri')
+endif
+
cdata = configuration_data()
cdata.set('GST_API_VERSION_S', '"@0@.@1@"'.format(gst_version_major, gst_version_minor))
cdata.set('PACKAGE', '"gstreamer-vaapi"')
@@ -103,67 +128,28 @@
cdata.set('PACKAGE_NAME', '"GStreamer VA-API Plug-ins"')
cdata.set('PACKAGE_STRING', '"GStreamer VA-API Plug-ins @0@"'.format(gst_version))
cdata.set('PACKAGE_BUGREPORT', '"http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer"')
+cdata.set('VA_DRIVERS_PATH', '"@0@"'.format(driverdir))
cdata.set10('USE_DRM', USE_DRM)
cdata.set10('USE_EGL', USE_EGL)
cdata.set10('USE_ENCODERS', USE_ENCODERS)
cdata.set10('USE_GLX', USE_GLX)
-cdata.set10('USE_H265_DECODER', USE_H265_DECODER)
-cdata.set10('USE_H265_ENCODER', USE_H265_ENCODER)
-cdata.set10('USE_JPEG_DECODER', USE_JPEG_DECODER)
-cdata.set10('USE_JPEG_ENCODER', USE_JPEG_ENCODER)
-cdata.set10('USE_VP8_DECODER', USE_VP8_DECODER)
-cdata.set10('USE_VP8_ENCODER', USE_VP8_ENCODER)
-cdata.set10('USE_VP9_DECODER', USE_VP9_DECODER)
cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
+cdata.set10('USE_H264_FEI_ENCODER', USE_H264_FEI_ENCODER)
cdata.set10('USE_WAYLAND', USE_WAYLAND)
cdata.set10('USE_X11', USE_X11)
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))
cdata.set10('HAVE_XRANDR', xrandr_dep.found())
cdata.set10('HAVE_XRENDER', xrender_dep.found())
-cdata.set10('USE_VA_VPP', USE_VPP)
cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found())
cdata.set('USE_GLES_VERSION_MASK', GLES_VERSION_MASK)
-runcmd = run_command('pkg-config', '--variable=driverdir', 'libva')
-if runcmd.returncode() == 0
- cdata.set('VA_DRIVERS_PATH', '"@0@"'.format(runcmd.stdout().strip()))
-endif
-
-if libva_dep.version().version_compare('< 0.38.0')
- check_headers = [
- [USE_H265_DECODER, 'HAVE_VA_VA_DEC_HEVC_H'],
- [USE_H265_ENCODER, 'HAVE_VA_VA_ENC_HEVC_H'],
- [USE_JPEG_DECODER, 'HAVE_VA_VA_DEC_JPEG_H'],
- [USE_JPEG_ENCODER, 'HAVE_VA_VA_ENC_JPEG_H'],
- [USE_VP8_DECODER, 'HAVE_VA_VA_DEC_VP8_H'],
- [USE_VP8_ENCODER, 'HAVE_VA_VA_ENC_VP8_H'],
- [USE_VP9_DECODER, 'HAVE_VA_VA_DEC_VP9_H'],
- [USE_VP9_ENCODER, 'HAVE_VA_VA_DEC_VP9_H'],
- [USE_VPP, 'HAVE_VA_VA_VPP_H'],
- ]
- foreach h : check_headers
- if h.get(0)
- cdata.set(h.get(1), 1)
- endif
- endforeach
-
- if USE_ENCODERS
- check_headers = [
- ['HAVE_VA_VA_ENC_MPEG2_H', 'va/va_enc_mpeg2.h'],
- ['HAVE_VA_VA_ENC_H264_H', 'va/va_enc_h264.h'],
- ]
- foreach h : check_headers
- if cc.has_header(h.get(1), dependencies: libva_dep, prefix: '#include <va/va.h>')
- cdata.set(h.get(0), 1)
- endif
- endforeach
- endif
-endif
api_version = '1.0'
soversion = 0
# maintaining compatibility with the previous libtool versioning
# current = minor * 100 + micro
-libversion = '@0@.@1@.0'.format(soversion, gst_version_minor * 100 + gst_version_micro)
+curversion = gst_version_minor * 100 + gst_version_micro
+libversion = '@0@.@1@.0'.format(soversion, curversion)
+osxversion = curversion + 1
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
@@ -174,7 +160,9 @@
subdir('gst-libs')
subdir('gst')
-#subdir('tests')
+if not get_option('examples').disabled()
+ subdir('tests')
+endif
-python3 = import('python3').find_python()
+python3 = import('python').find_installation()
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/meson_options.txt
^
|
@@ -4,3 +4,7 @@
option('with_glx', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
option('with_wayland', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
option('with_egl', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
+
+# Common feature options
+option('examples', type : 'feature', value : 'auto', yield : true)
+option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Build API documentation with gtk-doc')
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/decoder.c
^
|
@@ -21,7 +21,6 @@
*/
#include "gst/vaapi/sysdeps.h"
-#include <string.h>
#include <gst/vaapi/gstvaapidecoder_h264.h>
#include <gst/vaapi/gstvaapidecoder_jpeg.h>
#include <gst/vaapi/gstvaapidecoder_mpeg2.h>
@@ -109,11 +108,9 @@
case GST_VAAPI_CODEC_H264:
decoder = gst_vaapi_decoder_h264_new (display, caps);
break;
-#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
decoder = gst_vaapi_decoder_jpeg_new (display, caps);
break;
-#endif
case GST_VAAPI_CODEC_MPEG2:
decoder = gst_vaapi_decoder_mpeg2_new (display, caps);
break;
|
[-]
[+]
|
Added |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/elements/meson.build
^
|
@@ -0,0 +1,28 @@
+examples = [
+ 'test-vaapisink',
+ 'test-vaapipostproc',
+ 'test-roi',
+]
+
+foreach example : examples
+ executable(example, '@0@.c'.format(example),
+ c_args : gstreamer_vaapi_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [gst_dep, gstvideo_dep],
+ install: false)
+endforeach
+
+if USE_X11
+if gtk_dep.found()
+ executable('test-vaapicontext', 'test-vaapicontext.c',
+ c_args : gstreamer_vaapi_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [ gst_dep,
+ gstvideo_dep,
+ libva_dep,
+ x11_dep,
+ gtk_dep,
+ libva_x11_dep ],
+ install: false)
+endif
+endif
|
[-]
[+]
|
Added |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/meson.build
^
|
@@ -0,0 +1,83 @@
+libdecutils_sources = [
+ 'decoder.c',
+ 'test-h264.c',
+ 'test-jpeg.c',
+ 'test-mpeg2.c',
+ 'test-mpeg4.c',
+ 'test-vc1.c',
+]
+
+libdecutils_headers = [
+ 'decoder.h',
+ 'test-h264.h',
+ 'test-jpeg.h',
+ 'test-mpeg2.h',
+ 'test-mpeg4.h',
+ 'test-vc1.h',
+]
+
+libutils_sources = [
+ 'codec.c',
+ 'image.c',
+ 'output.c',
+ 'test-subpicture-data.c',
+ 'y4mreader.c',
+]
+
+libutils_headers = [
+ 'codec.h',
+ 'image.h',
+ 'output.h',
+ 'test-subpicture-data.h',
+ 'y4mreader.h',
+]
+
+test_examples = [
+ 'simple-decoder',
+ 'test-decode',
+ 'test-display',
+ 'test-filter',
+ 'test-surfaces',
+ 'test-windows',
+ 'test-subpicture',
+]
+
+if USE_ENCODERS
+ test_examples += [ 'simple-encoder' ]
+endif
+
+if USE_H264_FEI_ENCODER
+ test_examples += [
+ 'test-fei-enc-out',
+ 'test-fei-enc-in',
+ ]
+endif
+
+if USE_GLX
+ test_examples += [ 'test-textures' ]
+endif
+
+libutils = static_library('libutils',
+ libutils_sources + libutils_headers,
+ c_args : gstreamer_vaapi_args,
+ include_directories: [configinc, libsinc],
+ dependencies : gstlibvaapi_deps,
+ install: false)
+
+libdecutils = static_library('libdecutils',
+ libdecutils_sources + libdecutils_headers,
+ c_args : gstreamer_vaapi_args,
+ include_directories: [configinc, libsinc],
+ dependencies : gstlibvaapi_deps,
+ install: false)
+
+foreach example : test_examples
+ executable(example, '@0@.c'.format(example),
+ c_args : gstreamer_vaapi_args,
+ include_directories: [configinc, libsinc],
+ dependencies : [gst_dep, libva_dep, gstlibvaapi_dep],
+ link_with: [libutils, libdecutils],
+ install: false)
+endforeach
+
+subdir('elements')
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/output.c
^
|
@@ -21,7 +21,6 @@
*/
#include "gst/vaapi/sysdeps.h"
-#include <string.h>
#include <gst/gst.h>
#if USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
@@ -182,7 +181,7 @@
if (display) {
if (gst_vaapi_display_get_display (display))
break;
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
display = NULL;
}
}
@@ -203,7 +202,7 @@
egl_display = NULL;
g_print ("error: unsupported EGL renderering mode\n");
#endif
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
if (!egl_display)
return NULL;
display = egl_display;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/simple-decoder.c
^
|
@@ -373,11 +373,9 @@
case GST_VAAPI_CODEC_H264:
app->decoder = gst_vaapi_decoder_h264_new (app->display, caps);
break;
-#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
app->decoder = gst_vaapi_decoder_jpeg_new (app->display, caps);
break;
-#endif
case GST_VAAPI_CODEC_MPEG2:
app->decoder = gst_vaapi_decoder_mpeg2_new (app->display, caps);
break;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/simple-encoder.c
^
|
@@ -234,7 +234,8 @@
size_t written;
gboolean ret = FALSE;
- gst_buffer_map (buffer, &info, GST_MAP_READ);
+ if (!gst_buffer_map (buffer, &info, GST_MAP_READ))
+ return FALSE;
if (info.size <= 0 || !info.data)
return FALSE;
@@ -302,7 +303,7 @@
}
if (app->display)
- gst_vaapi_display_unref (app->display);
+ gst_object_unref (app->display);
if (app->output_file)
fclose (app->output_file);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-decode.c
^
|
@@ -23,7 +23,6 @@
*/
#include "gst/vaapi/sysdeps.h"
-#include <string.h>
#include <gst/vaapi/gstvaapisurface.h>
#include "decoder.h"
#include "output.h"
@@ -79,7 +78,7 @@
if (CHECK_DISPLAY_CACHE)
display2 = video_output_create_display (NULL);
else
- display2 = gst_vaapi_display_ref (display);
+ display2 = gst_object_ref (display);
if (!display2)
g_error ("could not create second VA display");
@@ -134,10 +133,10 @@
if (pixmap)
gst_vaapi_pixmap_unref (pixmap);
gst_vaapi_surface_proxy_unref (proxy);
- gst_vaapi_decoder_unref (decoder);
- gst_vaapi_window_unref (window);
- gst_vaapi_display_unref (display);
- gst_vaapi_display_unref (display2);
+ gst_object_unref (decoder);
+ gst_object_unref (window);
+ gst_object_unref (display);
+ gst_object_unref (display2);
g_free (g_codec_str);
video_output_exit ();
return 0;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-display.c
^
|
@@ -222,7 +222,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
}
g_print ("\n");
@@ -241,7 +241,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
close (drm_device);
}
g_print ("\n");
@@ -267,7 +267,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
close (drm_device);
}
g_print ("\n");
@@ -299,7 +299,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
@@ -325,7 +325,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
@@ -347,7 +347,7 @@
g_print ("Pixel aspect ratio: %u/%u\n", par_n, par_d);
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
}
g_print ("\n");
@@ -366,7 +366,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
@@ -393,7 +393,7 @@
g_error ("could not create Gst/VA display");
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
XCloseDisplay (x11_display);
}
g_print ("\n");
@@ -416,7 +416,7 @@
g_print ("Pixel aspect ratio: %u/%u\n", par_n, par_d);
dump_info (display);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
}
g_print ("\n");
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-fei-enc-in.c
^
|
@@ -279,7 +279,8 @@
size_t written;
gboolean ret = FALSE;
- gst_buffer_map (buffer, &info, GST_MAP_READ);
+ if (!gst_buffer_map (buffer, &info, GST_MAP_READ))
+ return FALSE;
if (info.size <= 0 || !info.data)
return FALSE;
@@ -346,7 +347,7 @@
}
if (app->display)
- gst_vaapi_display_unref (app->display);
+ gst_object_unref (app->display);
if (app->output_file)
fclose (app->output_file);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-filter.c
^
|
@@ -440,11 +440,11 @@
pause ();
- gst_vaapi_filter_unref (filter);
+ gst_object_unref (filter);
gst_vaapi_object_unref (dst_surface);
gst_vaapi_object_unref (src_surface);
- gst_vaapi_window_unref (window);
- gst_vaapi_display_unref (display);
+ gst_object_unref (window);
+ gst_object_unref (display);
video_output_exit ();
g_free (g_src_format_str);
g_free (g_crop_rect_str);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-subpicture.c
^
|
@@ -21,7 +21,6 @@
*/
#include "gst/vaapi/sysdeps.h"
-#include <string.h>
#include <gst/vaapi/gstvaapisurface.h>
#include "decoder.h"
#include "output.h"
@@ -164,9 +163,9 @@
gst_video_overlay_composition_unref (compo);
gst_vaapi_surface_proxy_unref (proxy);
- gst_vaapi_decoder_unref (decoder);
- gst_vaapi_window_unref (window);
- gst_vaapi_display_unref (display);
+ gst_object_unref (decoder);
+ gst_object_unref (window);
+ gst_object_unref (display);
g_free (g_codec_str);
video_output_exit ();
return 0;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-surfaces.c
^
|
@@ -98,7 +98,7 @@
}
/* Unref in random order to check objects are correctly refcounted */
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
gst_vaapi_video_pool_unref (pool);
gst_vaapi_object_unref (surface);
video_output_exit ();
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-textures.c
^
|
@@ -172,8 +172,8 @@
gst_vaapi_texture_unref (textures[1]);
glDeleteTextures (1, &texture_id);
- gst_vaapi_window_unref (window);
- gst_vaapi_display_unref (display);
+ gst_object_unref (window);
+ gst_object_unref (display);
gst_deinit ();
return 0;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/test-windows.c
^
|
@@ -131,11 +131,11 @@
g_error ("could not render surface");
pause ();
- gst_vaapi_window_unref (window);
+ gst_object_unref (window);
}
gst_vaapi_object_unref (surface);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
#endif
#if USE_X11
@@ -161,7 +161,7 @@
g_error ("could not render surface");
pause ();
- gst_vaapi_window_unref (window);
+ gst_object_unref (window);
}
g_print ("#\n");
@@ -194,13 +194,13 @@
g_error ("could not render surface");
pause ();
- gst_vaapi_window_unref (window);
+ gst_object_unref (window);
XUnmapWindow (dpy, win);
XDestroyWindow (dpy, win);
}
gst_vaapi_object_unref (surface);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
#endif
#if USE_WAYLAND
@@ -226,11 +226,11 @@
g_error ("could not render surface");
pause ();
- gst_vaapi_window_unref (window);
+ gst_object_unref (window);
}
gst_vaapi_object_unref (surface);
- gst_vaapi_display_unref (display);
+ gst_object_unref (display);
#endif
gst_deinit ();
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/y4mreader.c
^
|
@@ -19,10 +19,9 @@
* Boston, MA 02110-1301 USA
*/
+#include "gst/vaapi/sysdeps.h"
#include "y4mreader.h"
-#include <stdio.h>
-
/* format documentation:
* http://wiki.multimedia.cx/index.php?title=YUV4MPEG2 */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-vaapi-1.16.1.tar.xz/gstreamer-vaapi/tests/y4mreader.h
^
|
@@ -19,7 +19,8 @@
* Boston, MA 02110-1301 USA
*/
-#include "gst/vaapi/sysdeps.h"
+#include <gst/gst.h>
+#include <stdio.h>
#include <gst/vaapi/gstvaapiimage.h>
typedef struct _Y4MReader Y4MReader;
|