/* GStreamer * Copyright (C) <2021> Charles Lu * * 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. */ #pragma once #include #include #include #include #include "thead_camera.h" G_BEGIN_DECLS #define GST_TYPE_THEAD_CAMERA \ (gst_thead_camera_get_type()) #define GST_THEAD_CAMERA(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_THEAD_CAMERA,GstTHeadCamera)) #define GST_THEAD_CAMERA_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_THEAD_CAMERA,GstTHeadCameraClass)) #define GST_IS_THEAD_CAMERA(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_THEAD_CAMERA)) #define GST_IS_THEAD_CAMERA_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_THEAD_CAMERA)) typedef struct _GstTHeadCamera GstTHeadCamera; typedef struct _GstTHeadCameraClass GstTHeadCameraClass; /** * GstTHeadCamera: * * Opaque data structure. */ struct _GstTHeadCamera { GstPushSrc element; /* video state */ GstVideoInfo info; /* protected by the object or stream lock */ gboolean bayer; THeadCamera *theadCamera; /* running time and frames for current caps */ GstClockTime running_time; // total running time gint64 timestamp_offset; // PROP_TIMESTAMP_OFFSET gint64 n_frames; // total frames sent gboolean reverse; /* previous caps running time and frames */ GstClockTime accum_rtime; // accumulated running_time gint64 accum_frames; // accumulated frames }; struct _GstTHeadCameraClass { GstPushSrcClass parent_class; }; GType gst_thead_camera_get_type (void); G_END_DECLS