From 74a9f76d32e1777ee6de3a0a49a5978ef389869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 27 Oct 2016 12:31:49 +0200 Subject: [PATCH] docs: replace vaapidecode with each codec In the spirit of the codec split, this patch removes the documentation of vaapidecode and adds a page per each possible decoder. Nonetheless, only those available in the compilation system are going to be instrospected, because the rest are not registered. --- .../gstreamer-vaapi-plugins-docs.xml.in | 10 +- .../gstreamer-vaapi-plugins-sections.txt | 85 +++++- gst/vaapi/Makefile.am | 1 + gst/vaapi/gstvaapidecode.c | 50 ---- gst/vaapi/gstvaapidecodebin.c | 6 +- gst/vaapi/gstvaapidecodedoc.c | 254 ++++++++++++++++++ 6 files changed, 346 insertions(+), 60 deletions(-) create mode 100644 gst/vaapi/gstvaapidecodedoc.c diff --git a/docs/plugins/gstreamer-vaapi-plugins-docs.xml.in b/docs/plugins/gstreamer-vaapi-plugins-docs.xml.in index c9cb5fc1f4..5eec5ca8aa 100644 --- a/docs/plugins/gstreamer-vaapi-plugins-docs.xml.in +++ b/docs/plugins/gstreamer-vaapi-plugins-docs.xml.in @@ -11,8 +11,15 @@ gstreamer-vaapi Elements - + + + + + + + + @@ -21,6 +28,7 @@ + diff --git a/docs/plugins/gstreamer-vaapi-plugins-sections.txt b/docs/plugins/gstreamer-vaapi-plugins-sections.txt index e3bc8e4031..2833db3d5a 100644 --- a/docs/plugins/gstreamer-vaapi-plugins-sections.txt +++ b/docs/plugins/gstreamer-vaapi-plugins-sections.txt @@ -1,10 +1,4 @@
-element-vaapidecode -vaapidecode - -GstVaapiDecode -GstVaapiDecodeClass -
element-vaapijpegdec @@ -14,6 +8,70 @@ GstVaapiDecode_jpeg GstVaapiDecode_jpegClass
+
+element-vaapimpeg2dec +vaapimpeg2dec + +GstVaapiDecode_mpeg2 +GstVaapiDecode_mpeg2Class +
+ +
+element-vaapimpeg4dec +vaapimpeg4dec + +GstVaapiDecode_mpeg4 +GstVaapiDecode_mpeg4Class +
+ +
+element-vaapih263dec +vaapih263dec + +GstVaapiDecode_h263 +GstVaapiDecode_h263Class +
+ +
+element-vaapih264dec +vaapih264dec + +GstVaapiDecode_h264 +GstVaapiDecode_h264Class +
+ +
+element-vaapih265dec +vaapih265dec + +GstVaapiDecode_h265 +GstVaapiDecode_h265Class +
+ +
+element-vaapivc1dec +vaapivc1dec + +GstVaapiDecode_vc1 +GstVaapiDecode_vc1Class +
+ +
+element-vaapivp8dec +vaapivp8dec + +GstVaapiDecode_vp8 +GstVaapiDecode_vp8Class +
+ +
+element-vaapivp9dec +vaapivp9dec + +GstVaapiDecode_vp9 +GstVaapiDecode_vp9Class +
+
element-vaapidecodebin vaapidecodebin @@ -134,3 +192,18 @@ GstVaapiEncodeVP8 GstVaapiEncodeVP8Class gst_vaapiencode_vp8_get_type
+ +
+element-vaapivp9enc +vaapivp9enc + +GST_IS_VAAPIENCODE_VP9 +GST_IS_VAAPIENCODE_VP9_CLASS +GST_TYPE_VAAPIENCODE_VP9 +GST_VAAPIENCODE_VP9 +GST_VAAPIENCODE_VP9_CLASS +GST_VAAPIENCODE_VP9_GET_CLASS +GstVaapiEncodeVP9 +GstVaapiEncodeVP9Class +gst_vaapiencode_vp9_get_type +
diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am index 016b3d92b8..90212480b9 100644 --- a/gst/vaapi/Makefile.am +++ b/gst/vaapi/Makefile.am @@ -43,6 +43,7 @@ endif libgstvaapi_source_c = \ gstvaapi.c \ gstvaapidecode.c \ + gstvaapidecodedoc.c \ gstvaapipluginbase.c \ gstvaapipluginutil.c \ gstvaapipostproc.c \ diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 6f84427127..51001ef0f0 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -20,56 +20,6 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA -*/ - -/** - * SECTION:element-vaapidecode - * @short_description: A VA-API based video decoder - * - * vaapidecode decodes from raw bitstreams to surfaces suitable for - * the vaapisink or vaapipostproc elements using the installed VA-API - * back-end. - * - * In the case of OpenGL based elements, the buffers have the - * #GstVideoGLTextureUploadMeta meta, which efficiently copies the - * content of the VA-API surface into a GL texture. - * - * Also it can deliver normal video buffers that can be rendered or - * processed by other elements, but the performance would be rather - * bad. - * - * - * Example launch line - * |[ - * gst-launch-1.0 filesrc location=~/big_buck_bunny.mov ! qtdemux ! h264parse ! vaapidecode ! vaapisink - * ]| - * - */ - -/** - * SECTION:element-vaapijpegdec - * @short_description: A VA-API based JPEG image decoder - * - * vaapijpegdec decodes a JPEG image to surfaces suitable for the - * vaapisink or vaapipostproc elements using the installed VA-API - * back-end. - * - * In the case of OpenGL based elements, the buffers have the - * #GstVideoGLTextureUploadMeta meta, which efficiently copies the - * content of the VA-API surface into a GL texture. - * - * Also it can deliver normal video buffers that can be rendered or - * processed by other elements, but the performance would be rather - * bad. - * - * - * Example launch line - * |[ - * gst-launch-1.0 filesrc location=~/image.jpeg ! jpegparse ! vaapijpegdec ! imagefreeze ! vaapisink - * ]| - * */ #include "gstcompat.h" diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index 0e3b713c26..92856146a4 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -26,9 +26,9 @@ * @short_description: A VA-API based video decoder with a * post-processor * - * vaapidecodebin is similar #GstVaapiDecode, but it is composed by - * the vaapidecode, a #GstQueue, and the #GstVaapiPostproc, if it is - * available and functional in the setup. + * vaapidecodebin is similar vaapi{CODEC}dec, but it is composed by + * the unregistered vaapidecode, a #GstQueue, and the + * #GstVaapiPostproc, if it is available and functional in the setup. * * It offers the functionality of #GstVaapiDecode and the many options * of #GstVaapiPostproc. diff --git a/gst/vaapi/gstvaapidecodedoc.c b/gst/vaapi/gstvaapidecodedoc.c new file mode 100644 index 0000000000..aafe9fa66d --- /dev/null +++ b/gst/vaapi/gstvaapidecodedoc.c @@ -0,0 +1,254 @@ +/* + * gstvaapidecodedoc.c - VA-API video decoders documentation + * + * Copyright (C) 2016 Intel Corporation + * Author: Victor Jaquez + * + * 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 + */ + +/** + * SECTION:element-vaapijpegdec + * @short_description: A VA-API based JPEG image decoder + * + * vaapijpegdec decodes a JPEG image to surfaces suitable for the + * vaapisink or vaapipostproc elements using the installed VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/image.jpeg ! jpegparse ! vaapijpegdec ! imagefreeze ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapimpeg2dec + * @short_description: A VA-API based MPEG2 video decoder + * + * vaapimpeg2dec decodes from MPEG2 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/sample.mpg ! mpegpsdemux ! vaapimpeg2dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapimpeg4dec + * @short_description: A VA-API based MPEG4 video decoder + * + * vaapimpeg4dec decodes from MPEG4 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/sample.mpeg4 ! mpeg4videoparse ! vaapimpeg4dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapih263dec + * @short_description: A VA-API based H263 video decoder + * + * vaapih263dec decodes from H263 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/sample.h263 ! h263parse ! vaapih263dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapih264dec + * @short_description: A VA-API based H264 video decoder + * + * vaapih264dec decodes from H264 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/big_buck_bunny.mov ! qtdemux ! h264parse ! vaapih264dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapih265dec + * @short_description: A VA-API based H265 video decoder + * + * vaapih265dec decodes from H265 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=./sample.bin ! h265parse ! vaapih265dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapivc1dec + * @short_description: A VA-API based VC1 video decoder + * + * vaapivc1dec decodes from VC1 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=~/elephants_dream.wmv ! asfdemux ! vaapivc1dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapivp8dec + * @short_description: A VA-API based VP8 video decoder + * + * vaapivp8dec decodes from VP8 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=./sample.webm ! matroskademux ! vaapivp8dec ! vaapisink + * ]| + * + */ + +/** + * SECTION:element-vaapivp9dec + * @short_description: A VA-API based VP9 video decoder + * + * vaapivp9dec decodes from VP9 bitstreams to surfaces suitable + * for the vaapisink or vaapipostproc elements using the installed + * VA-API + * back-end. + * + * In the case of OpenGL based elements, the buffers have the + * #GstVideoGLTextureUploadMeta meta, which efficiently copies the + * content of the VA-API surface into a GL texture. + * + * Also it can deliver normal video buffers that can be rendered or + * processed by other elements, but the performance would be rather + * bad. + * + * + * Example launch line + * |[ + * gst-launch-1.0 filesrc location=./sample.vp9.webm ! ivfparse ! vaapivp9dec ! vaapisink + * ]| + * + */