1 /* 2 * gstrtpvp8depay.h - Header for GstRtpVP8Depay 3 * Copyright (C) 2011 Sjoerd Simons <sjoerd@luon.net> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef __GST_RTP_VP8_DEPAY_H__ 21 #define __GST_RTP_VP8_DEPAY_H__ 22 23 #include <gst/base/gstadapter.h> 24 #include <gst/rtp/gstrtpbasedepayload.h> 25 26 G_BEGIN_DECLS 27 28 #define GST_TYPE_RTP_VP8_DEPAY \ 29 (gst_rtp_vp8_depay_get_type()) 30 #define GST_RTP_VP8_DEPAY(obj) \ 31 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RTP_VP8_DEPAY, GstRtpVP8Depay)) 32 #define GST_RTP_VP8_DEPAY_CLASS(klass) \ 33 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RTP_VP8_DEPAY, \ 34 GstRtpVP8DepayClass)) 35 #define GST_IS_RTP_VP8_DEPAY(obj) \ 36 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RTP_VP8_DEPAY)) 37 #define GST_IS_RTP_VP8_DEPAY_CLASS(klass) \ 38 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RTP_VP8_DEPAY)) 39 #define GST_RTP_VP8_DEPAY_GET_CLASS(obj) \ 40 (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_VP8_DEPAY, \ 41 GstRtpVP8DepayClass)) 42 43 typedef struct _GstRtpVP8Depay GstRtpVP8Depay; 44 typedef struct _GstRtpVP8DepayClass GstRtpVP8DepayClass; 45 46 struct _GstRtpVP8DepayClass 47 { 48 GstRTPBaseDepayloadClass parent_class; 49 }; 50 51 struct _GstRtpVP8Depay 52 { 53 GstRTPBaseDepayload parent; 54 GstAdapter *adapter; 55 gboolean started; 56 57 gboolean caps_sent; 58 /* In between pictures, we might store GstRTPPacketLost events instead 59 * of forwarding them immediately, we check upon reception of a new 60 * picture id whether a gap was introduced, in which case we do forward 61 * the event. This is to avoid forwarding spurious lost events for FEC 62 * packets. 63 */ 64 gboolean stop_lost_events; 65 GstEvent *last_lost_event; 66 gboolean waiting_for_keyframe; 67 gint last_profile; 68 gint last_width; 69 gint last_height; 70 guint last_picture_id; 71 72 gboolean wait_for_keyframe; 73 gboolean request_keyframe; 74 gboolean last_pushed_was_lost_event; 75 }; 76 77 GType gst_rtp_vp8_depay_get_type (void); 78 79 G_END_DECLS 80 81 #endif /* #ifndef __GST_RTP_VP8_DEPAY_H__ */ 82