| /* GStreamer |
| * Copyright (C) 2022 <xuesong.jiang@amlogic.com> |
| * |
| * 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 |
| * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| * Boston, MA 02110-1301, USA. |
| */ |
| |
| #ifndef __GST_AML_VIDEO_SINK_H__ |
| #define __GST_AML_VIDEO_SINK_H__ |
| |
| #include <gst/gst.h> |
| #include <gst/video/video.h> |
| #include "aml_version.h" |
| #include <gst/base/gstqueuearray.h> |
| |
| G_BEGIN_DECLS |
| |
| #define GST_TYPE_AML_VIDEO_SINK \ |
| (gst_aml_video_sink_get_type()) |
| #define GST_AML_VIDEO_SINK(obj) \ |
| (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AML_VIDEO_SINK,GstAmlVideoSink)) |
| #define GST_AML_VIDEO_SINK_CLASS(klass) \ |
| (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AML_VIDEO_SINK,GstAmlVideoSinkClass)) |
| #define GST_IS_AML_VIDEO_SINK(obj) \ |
| (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AML_VIDEO_SINK)) |
| #define GST_IS_AML_VIDEO_SINK_CLASS(klass) \ |
| (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AML_VIDEO_SINK)) |
| #define GST_AML_VIDEO_SINK_GET_CLASS(inst) \ |
| (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_AML_VIDEO_SINK, GstAmlVideoSinkClass)) |
| #define GST_AML_VIDEO_SINK_GET_PRIVATE(obj) ((GST_AML_VIDEO_SINK (obj))->priv) |
| |
| typedef struct _GstAmlVideoSink GstAmlVideoSink; |
| typedef struct _GstAmlVideoSinkClass GstAmlVideoSinkClass; |
| typedef struct _GstAmlVideoSinkPrivate GstAmlVideoSinkPrivate; |
| |
| struct _GstAmlVideoSink |
| { |
| GstVideoSink parent; |
| |
| GstClockTime last_displayed_buf_pts; |
| GstClockTime last_dec_buf_pts; |
| |
| /* eos detect */ |
| gint queued; |
| gint dequeued; |
| gint rendered; |
| gint dropped; |
| gboolean default_sync; |
| gint immediately_render; |
| gint avsync_mode; |
| gboolean pip_mode; |
| gint display_output_index; |
| GMutex eos_lock; |
| GCond eos_cond; |
| GMutex report_info_lock; |
| gboolean quit_eos_detect_thread; |
| GThread *detect_thread_handle; |
| gboolean quit_rotation_thread; |
| GThread *rotation_thread_handle; |
| GstQueueArray* buffer_queue; |
| GMutex rotation_buffer_lock; |
| gint frame_rate_num; |
| gint frame_rate_denom; |
| gboolean frame_rate_changed; |
| double frame_rate; |
| gboolean video_playing; |
| |
| gboolean secure_mode; |
| gboolean pixel_aspect_ratio_changed; |
| double pixel_aspect_ratio; |
| gboolean keep_last_frame_on_flush; |
| gboolean enable_decoded_buffer_signal; |
| gint zorder; |
| gboolean update_zorder; |
| |
| GstAmlVideoSinkPrivate *priv; |
| }; |
| |
| struct _GstAmlVideoSinkClass |
| { |
| GstVideoSinkClass parent; |
| }; |
| |
| GType gst_aml_video_sink_get_type (void) G_GNUC_CONST; |
| |
| G_END_DECLS |
| |
| #endif /* __GST_AML_VIDEO_SINK_H__ */ |