1 /* GStreamer 2 * Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 /* 20 * Unless otherwise indicated, Source Code is licensed under MIT license. 21 * See further explanation attached in License Statement (distributed in the file 22 * LICENSE). 23 * 24 * Permission is hereby granted, free of charge, to any person obtaining a copy of 25 * this software and associated documentation files (the "Software"), to deal in 26 * the Software without restriction, including without limitation the rights to 27 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 28 * of the Software, and to permit persons to whom the Software is furnished to do 29 * so, subject to the following conditions: 30 * 31 * The above copyright notice and this permission notice shall be included in all 32 * copies or substantial portions of the Software. 33 * 34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 35 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 36 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 37 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 38 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 39 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 40 * SOFTWARE. 41 */ 42 43 #ifndef __GST_RTP_DEC_H__ 44 #define __GST_RTP_DEC_H__ 45 46 #include <gst/gst.h> 47 48 G_BEGIN_DECLS 49 50 #define GST_TYPE_RTP_DEC (gst_rtp_dec_get_type()) 51 #define GST_IS_RTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_DEC)) 52 #define GST_IS_RTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEC)) 53 #define GST_RTP_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_DEC, GstRTPDec)) 54 #define GST_RTP_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEC, GstRTPDecClass)) 55 56 typedef struct _GstRTPDec GstRTPDec; 57 typedef struct _GstRTPDecClass GstRTPDecClass; 58 typedef struct _GstRTPDecSession GstRTPDecSession; 59 60 struct _GstRTPDec { 61 GstElement element; 62 63 guint latency; 64 GSList *sessions; 65 GstClock *provided_clock; 66 }; 67 68 struct _GstRTPDecClass { 69 GstElementClass parent_class; 70 71 /* get the caps for pt */ 72 GstCaps* (*request_pt_map) (GstRTPDec *rtpdec, guint session, guint pt); 73 74 void (*clear_pt_map) (GstRTPDec *rtpdec); 75 76 void (*on_new_ssrc) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 77 void (*on_ssrc_collision) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 78 void (*on_ssrc_validated) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 79 void (*on_bye_ssrc) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 80 void (*on_bye_timeout) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 81 void (*on_timeout) (GstRTPDec *rtpdec, guint session, guint32 ssrc); 82 }; 83 84 GType gst_rtp_dec_get_type(void); 85 86 G_END_DECLS 87 88 #endif /* __GST_RTP_DEC_H__ */ 89