Wed, 16 Nov 2005 00:01:23 +0000
[gaim-migrate @ 14408]
A patch from Sadrul
"when you set an account to offline while it is "connecting", it
doesn't disconnect. marv hit on this last night"
committer: Mark Doliner <markdoliner@pidgin.im>
| 12024 | 1 | /* |
| 2 | The mediastreamer library aims at providing modular media processing and I/O | |
| 3 | for linphone, but also for any telephony application. | |
| 4 | Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org | |
| 5 | ||
| 6 | This library is free software; you can redistribute it and/or | |
| 7 | modify it under the terms of the GNU Lesser General Public | |
| 8 | License as published by the Free Software Foundation; either | |
| 9 | version 2.1 of the License, or (at your option) any later version. | |
| 10 | ||
| 11 | This library is distributed in the hope that it will be useful, | |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | Lesser General Public License for more details. | |
| 15 | ||
| 16 | You should have received a copy of the GNU Lesser General Public | |
| 17 | License along with this library; if not, write to the Free Software | |
| 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 | */ | |
| 20 | ||
| 21 | ||
| 22 | #ifndef MSRTPRECV_H | |
| 23 | #define MSRTPRECV_H | |
| 24 | ||
| 25 | #include "msfilter.h" | |
| 26 | #include "mssync.h" | |
| 27 | ||
| 28 | /* because of a conflict between config.h from oRTP and config.h from linphone:*/ | |
| 29 | #undef PACKAGE | |
| 30 | #undef VERSION | |
| 31 | #include <ortp/ortp.h> | |
| 32 | ||
| 33 | /*this is the class that implements a copy filter*/ | |
| 34 | ||
| 35 | #define MSRTPRECV_MAX_OUTPUTS 1 /* max output per filter*/ | |
| 36 | ||
| 37 | #define MSRTPRECV_DEF_GRAN 4096 /* the default granularity*/ | |
| 38 | ||
| 39 | struct _MSRtpRecv | |
| 40 | { | |
| 41 | /* the MSCopy derivates from MSFilter, so the MSFilter object MUST be the first of the MSCopy object | |
| 42 | in order to the object mechanism to work*/ | |
| 43 | MSFilter filter; | |
| 44 | MSFifo *f_outputs[MSRTPRECV_MAX_OUTPUTS]; | |
| 45 | MSQueue *q_outputs[MSRTPRECV_MAX_OUTPUTS]; | |
| 46 | MSSync *sync; | |
| 47 | RtpSession *rtpsession; | |
| 48 | guint32 prev_ts; | |
| 49 | gint stream_started; | |
| 50 | }; | |
| 51 | ||
| 52 | typedef struct _MSRtpRecv MSRtpRecv; | |
| 53 | ||
| 54 | struct _MSRtpRecvClass | |
| 55 | { | |
| 56 | /* the MSCopy derivates from MSFilter, so the MSFilter class MUST be the first of the MSCopy class | |
| 57 | in order to the class mechanism to work*/ | |
| 58 | MSFilterClass parent_class; | |
| 59 | }; | |
| 60 | ||
| 61 | typedef struct _MSRtpRecvClass MSRtpRecvClass; | |
| 62 | ||
| 63 | /* PUBLIC */ | |
| 64 | #define MS_RTP_RECV(filter) ((MSRtpRecv*)(filter)) | |
| 65 | #define MS_RTP_RECV_CLASS(klass) ((MSRtpRecvClass*)(klass)) | |
| 66 | MSFilter * ms_rtp_recv_new(void); | |
| 67 | RtpSession * ms_rtp_recv_set_session(MSRtpRecv *obj,RtpSession *session); | |
| 68 | #define ms_rtp_recv_unset_session(obj) (ms_rtp_recv_set_session((obj),NULL)) | |
| 69 | #define ms_rtp_recv_get_session(obj) ((obj)->rtpsession) | |
| 70 | ||
| 71 | ||
| 72 | ||
| 73 | /* FOR INTERNAL USE*/ | |
| 74 | void ms_rtp_recv_init(MSRtpRecv *r); | |
| 75 | void ms_rtp_recv_class_init(MSRtpRecvClass *klass); | |
| 76 | void ms_rtp_recv_destroy( MSRtpRecv *obj); | |
| 77 | void ms_rtp_recv_process(MSRtpRecv *r); | |
| 78 | void ms_rtp_recv_setup(MSRtpRecv *r,MSSync *sync); | |
| 79 | ||
| 80 | #endif |