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

56 lines
1.2 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_FBSINK_H__
#define __GST_FBSINK_H__
#include <gst/gst.h>
#include <gst/video/gstvideosink.h>
#include "gstaicfb.h"
#include "dma_allocator.h"
G_BEGIN_DECLS
#define GST_TYPE_FBSINK \
(gst_fbsink_get_type())
#define GST_FBSINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FBSINK,Gstfbsink))
#define GST_FBSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FBSINK,GstfbsinkClass))
#define GST_IS_FBSINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FBSINK))
#define GST_IS_FBSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FBSINK))
typedef struct _Gstfbsink Gstfbsink;
typedef struct _GstfbsinkClass GstfbsinkClass;
2024-11-29 08:23:11 +00:00
#define FRAME_NUM (2)
2024-11-29 08:13:19 +00:00
struct _Gstfbsink {
GstVideoSink videosink;
2024-11-29 08:23:11 +00:00
struct gst_aicfb* aicfb;
2024-11-29 08:13:19 +00:00
int dmabuf_fd;
2024-11-29 08:23:11 +00:00
struct mpp_buf buf[FRAME_NUM];
2024-11-29 08:13:19 +00:00
int alloc_flag;
2024-11-29 08:23:11 +00:00
int cur_frame_id; // id of current displayed frame
2024-11-29 08:13:19 +00:00
2024-11-29 08:23:11 +00:00
GstMemory *prev_mem;
2024-11-29 08:13:19 +00:00
};
struct _GstfbsinkClass {
GstVideoSinkClass parent_class;
};
GType gst_fbsink_get_type (void);
G_END_DECLS
#endif /* __GST_FBSINK_H__ */