linuxOS_D21X/source/artinchip/gst1-plugins-aic/gstvedec.h

75 lines
1.5 KiB
C
Raw Normal View History

2024-11-29 08:13:19 +00:00
/*
* Copyright (C) 2020-2023 ArtInChip Technology Co., Ltd.
2024-11-29 08:33:21 +00:00
*
* SPDX-License-Identifier: Apache-2.0
*
2024-11-29 08:13:19 +00:00
* Authors: <qi.xu@artinchip.com>
*/
#ifndef __GST_VE_DEC_H__
#define __GST_VE_DEC_H__
#include <gst/video/gstvideodecoder.h>
#include "mpp_decoder.h"
2024-11-29 08:23:11 +00:00
#include "gstmppallocator.h"
2024-11-29 08:13:19 +00:00
G_BEGIN_DECLS
#define GST_TYPE_VE_DEC \
(gst_ve_dec_get_type())
#define GST_VE_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VE_DEC,GstVeDec))
#define GST_VE_DEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VE_DEC,GstVeDecClass))
#define GST_IS_VE_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VE_DEC))
#define GST_IS_VE_DEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VE_DEC))
typedef struct _GstVeDec GstVeDec;
typedef struct _GstVeDecClass GstVeDecClass;
struct VeFrame {
long long pts;
int system_frame_number; // system_frame_number in struct GstVideoCodecFrame
};
struct _GstVeDec {
GstVideoDecoder decoder;
enum mpp_codec_type dec_type;
struct mpp_decoder *mpp_dec;
2024-11-29 08:23:11 +00:00
GstMppAllocator *allocator;
2024-11-29 08:13:19 +00:00
GstVideoCodecState *input_state;
GstVideoInfo info;
int width;
int height;
GHashTable *pts2frame;
// system_frame_number in struct GstVideoCodecFrame
GList *system_frame_number_in_ve;
int task_ret;
int stop_flag;
// decode Task
GstTask* dec_task;
GRecMutex lock;
int dec_task_ret;
};
struct _GstVeDecClass {
GstVideoDecoderClass decoder_class;
};
GType gst_ve_dec_get_type(void);
G_END_DECLS
#endif /* __GST_VPU_DEC_H__ */