1 /* 2 * gstrtponviftimestamp.h 3 * 4 * Copyright (C) 2014 Axis Communications AB 5 * Author: Guillaume Desmottes <guillaume.desmottes@collabora.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __GST_RTP_ONVIF_TIMESTAMP_H__ 22 #define __GST_RTP_ONVIF_TIMESTAMP_H__ 23 24 25 #include <gst/gst.h> 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif /* __cplusplus */ 30 31 #define GST_TYPE_RTP_ONVIF_TIMESTAMP \ 32 (gst_rtp_onvif_timestamp_get_type()) 33 #define GST_RTP_ONVIF_TIMESTAMP(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_ONVIF_TIMESTAMP,GstRtpOnvifTimestamp)) 35 #define GST_RTP_ONVIF_TIMESTAMP_CLASS(klass) \ 36 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_ONVIF_TIMESTAMP,GstRtpOnvifTimestampClass)) 37 #define GST_IS_RTP_ONVIF_TIMESTAMP(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_ONVIF_TIMESTAMP)) 39 #define GST_IS_RTP_ONVIF_TIMESTAMP_CLASS(klass) \ 40 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_ONVIF_TIMESTAMP)) 41 42 typedef struct _GstRtpOnvifTimestamp GstRtpOnvifTimestamp; 43 typedef struct _GstRtpOnvifTimestampClass GstRtpOnvifTimestampClass; 44 45 struct _GstRtpOnvifTimestamp { 46 GstElement element; 47 48 /* pads */ 49 GstPad *sinkpad,*srcpad; 50 51 GstClockTime prop_ntp_offset; 52 guint prop_cseq; 53 gboolean prop_set_e_bit; 54 gboolean prop_set_t_bit; 55 56 /* currently used ntp-offset 57 *(can be changed runtime with a GstNtpOffset event) 58 */ 59 GstClockTime ntp_offset; 60 /* a GstNtpOffset event might mark the stream as discontinued */ 61 gboolean set_d_bit; 62 gboolean set_e_bit; 63 gboolean set_t_bit; 64 65 GstSegment segment; 66 /* Buffer waiting to be handled, only used if prop_set_e_bit is TRUE */ 67 GQueue *event_queue; 68 GstBuffer *buffer; 69 GstBufferList *list; 70 }; 71 72 struct _GstRtpOnvifTimestampClass { 73 GstElementClass parent_class; 74 }; 75 76 GType gst_rtp_onvif_timestamp_get_type(void); 77 78 #ifdef __cplusplus 79 } 80 #endif /* __cplusplus */ 81 82 #endif /* __GST_RTP_ONVIF_TIMESTAMP_H__ */ 83