2013-12-07 22:55:13 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2010, 2013 Ole André Vadla Ravnås <oleavr@soundrop.com>
|
|
|
|
* Copyright (C) 2012, 2013 Alessandro Decina <alessandro.d@gmail.com>
|
2010-10-27 17:30:11 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:38:00 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2010-10-27 17:30:11 +00:00
|
|
|
*/
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
#ifndef _GST_VTDEC_H_
|
|
|
|
#define _GST_VTDEC_H_
|
2010-10-27 17:30:11 +00:00
|
|
|
|
2012-03-03 18:03:11 +00:00
|
|
|
#include <gst/video/video.h>
|
2013-12-07 22:55:13 +00:00
|
|
|
#include <gst/video/gstvideodecoder.h>
|
|
|
|
#include <CoreMedia/CoreMedia.h>
|
|
|
|
#include <VideoToolbox/VideoToolbox.h>
|
2015-12-10 05:22:08 +00:00
|
|
|
#include "videotexturecache.h"
|
2016-01-29 04:07:59 +00:00
|
|
|
#include "glcontexthelper.h"
|
2019-09-03 03:56:22 +00:00
|
|
|
#if defined(APPLEMEDIA_MOLTENVK)
|
|
|
|
#include <gst/vulkan/vulkan.h>
|
|
|
|
#endif
|
2023-02-23 13:14:57 +00:00
|
|
|
#define GST_USE_UNSTABLE_API
|
|
|
|
#include <gst/codecparsers/gsth264parser.h>
|
2010-10-27 17:30:11 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
#define GST_TYPE_VTDEC (gst_vtdec_get_type())
|
|
|
|
#define GST_VTDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VTDEC,GstVtdec))
|
|
|
|
#define GST_VTDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VTDEC,GstVtdecClass))
|
|
|
|
#define GST_IS_VTDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VTDEC))
|
|
|
|
#define GST_IS_VTDEC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VTDEC))
|
2010-10-27 17:30:11 +00:00
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
typedef struct _GstVtdec GstVtdec;
|
|
|
|
typedef struct _GstVtdecClass GstVtdecClass;
|
2010-10-27 17:30:11 +00:00
|
|
|
|
2023-02-23 13:14:57 +00:00
|
|
|
#define GST_VTDEC_DPB_MAX_SIZE 16
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
struct _GstVtdec
|
2010-10-27 17:30:11 +00:00
|
|
|
{
|
2013-12-07 22:55:13 +00:00
|
|
|
GstVideoDecoder base_vtdec;
|
2015-11-17 00:21:27 +00:00
|
|
|
GstVideoCodecState *input_state;
|
2013-12-07 22:55:13 +00:00
|
|
|
GstVideoInfo video_info;
|
|
|
|
CMFormatDescriptionRef format_description;
|
|
|
|
VTDecompressionSessionRef session;
|
|
|
|
GAsyncQueue *reorder_queue;
|
2013-12-11 07:11:50 +00:00
|
|
|
gint reorder_queue_length;
|
2015-12-10 05:22:08 +00:00
|
|
|
GstVideoTextureCache *texture_cache;
|
2016-01-29 04:07:59 +00:00
|
|
|
GstGLContextHelper *ctxh;
|
2015-03-07 09:28:35 +00:00
|
|
|
|
2019-09-03 03:56:22 +00:00
|
|
|
#if defined(APPLEMEDIA_MOLTENVK)
|
|
|
|
GstVulkanInstance *instance;
|
|
|
|
GstVulkanDevice *device;
|
|
|
|
#endif
|
|
|
|
|
2015-03-07 09:28:35 +00:00
|
|
|
gboolean require_hardware;
|
2010-10-27 17:30:11 +00:00
|
|
|
};
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
struct _GstVtdecClass
|
2010-10-27 17:30:11 +00:00
|
|
|
{
|
2013-12-07 22:55:13 +00:00
|
|
|
GstVideoDecoderClass base_vtdec_class;
|
2010-10-27 17:30:11 +00:00
|
|
|
};
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
GType gst_vtdec_get_type (void);
|
2010-10-27 17:30:11 +00:00
|
|
|
|
2015-03-07 09:28:35 +00:00
|
|
|
void gst_vtdec_register_elements (GstPlugin * plugin);
|
|
|
|
|
2010-10-27 17:30:11 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2013-12-07 22:55:13 +00:00
|
|
|
#endif
|