y4mdec: descend from GstBaseParse
This is an overhaul/simplification of the element. Now it supports seek, while the performance remains more or less the same. Fixes: #4373 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8719>
This commit is contained in:
parent
ef7829b6ad
commit
7c8a5cd28d
@ -29615,10 +29615,11 @@
|
|||||||
"description": "Encodes and demuxes/decodes YUV4MPEG streams (mjpegtools)",
|
"description": "Encodes and demuxes/decodes YUV4MPEG streams (mjpegtools)",
|
||||||
"elements": {
|
"elements": {
|
||||||
"y4mdec": {
|
"y4mdec": {
|
||||||
"author": "David Schleef <ds@schleef.org>",
|
"author": "David Schleef <ds@schleef.org>\nVictor Jaquez <vjaquez@igalia.com>",
|
||||||
"description": "Demuxes/decodes YUV4MPEG streams",
|
"description": "Demuxes/decodes YUV4MPEG streams",
|
||||||
"hierarchy": [
|
"hierarchy": [
|
||||||
"GstY4mDec",
|
"GstY4mDec",
|
||||||
|
"GstBaseParse",
|
||||||
"GstElement",
|
"GstElement",
|
||||||
"GstObject",
|
"GstObject",
|
||||||
"GInitiallyUnowned",
|
"GInitiallyUnowned",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -21,46 +21,41 @@
|
|||||||
#define _GST_Y4M_DEC_H_
|
#define _GST_Y4M_DEC_H_
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstadapter.h>
|
#include <gst/base/gstbaseparse.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_Y4M_DEC (gst_y4m_dec_get_type())
|
#define GST_TYPE_Y4M_DEC \
|
||||||
#define GST_Y4M_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_Y4M_DEC,GstY4mDec))
|
(gst_y4m_dec_get_type())
|
||||||
#define GST_Y4M_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_Y4M_DEC,GstY4mDecClass))
|
#define GST_Y4M_DEC(obj) \
|
||||||
#define GST_IS_Y4M_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_Y4M_DEC))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_Y4M_DEC,GstY4mDec))
|
||||||
#define GST_IS_Y4M_DEC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_Y4M_DEC))
|
#define GST_Y4M_DEC_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_Y4M_DEC,GstY4mDecClass))
|
||||||
|
#define GST_IS_Y4M_DEC(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_Y4M_DEC))
|
||||||
|
#define GST_IS_Y4M_DEC_CLASS(obj) \
|
||||||
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_Y4M_DEC))
|
||||||
|
|
||||||
typedef struct _GstY4mDec GstY4mDec;
|
typedef struct _GstY4mDec GstY4mDec;
|
||||||
typedef struct _GstY4mDecClass GstY4mDecClass;
|
typedef struct _GstY4mDecClass GstY4mDecClass;
|
||||||
|
|
||||||
struct _GstY4mDec
|
struct _GstY4mDec
|
||||||
{
|
{
|
||||||
GstElement base_y4mdec;
|
GstBaseParse parent;
|
||||||
|
|
||||||
GstPad *sinkpad;
|
|
||||||
GstPad *srcpad;
|
|
||||||
GstAdapter *adapter;
|
|
||||||
|
|
||||||
/* state */
|
/* state */
|
||||||
gboolean have_header;
|
gint state;
|
||||||
int frame_index;
|
|
||||||
int header_size;
|
|
||||||
|
|
||||||
gboolean have_new_segment;
|
|
||||||
GstSegment segment;
|
|
||||||
|
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
GstVideoInfo out_info;
|
GstVideoInfo out_info;
|
||||||
gboolean video_meta;
|
gboolean has_video_meta;
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool;
|
||||||
gboolean padded;
|
gboolean passthrough;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstY4mDecClass
|
struct _GstY4mDecClass
|
||||||
{
|
{
|
||||||
GstElementClass base_y4mdec_class;
|
GstBaseParseClass parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_y4m_dec_get_type (void);
|
GType gst_y4m_dec_get_type (void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user