37 #include "gstilbcencoderinterface.h" |
37 #include "gstilbcencoderinterface.h" |
38 #include "gstg729encoderinterface.h" |
38 #include "gstg729encoderinterface.h" |
39 #include "gstg729decoderinterface.h" |
39 #include "gstg729decoderinterface.h" |
40 #else //__USE_GSTREAMER__ |
40 #else //__USE_GSTREAMER__ |
41 #include <sounddevice.h> |
41 #include <sounddevice.h> |
42 #include <VoIPDownlinkStream.h> |
42 #include <voipdownlinkstream.h> |
43 #include <VoIPUplinkStream.h> |
43 #include <voipuplinkstream.h> |
44 |
44 |
45 // FORWARD DECLARATIONS |
45 // FORWARD DECLARATIONS |
46 class CAudioOutput; |
46 class CAudioOutput; |
47 class CErrorConcealmentIntfc; |
47 class CErrorConcealmentIntfc; |
48 class CSpeechEncoderConfig; |
48 class CSpeechEncoderConfig; |
55 #endif //__USE_GSTREAMER__ |
55 #endif //__USE_GSTREAMER__ |
56 |
56 |
57 namespace TMS { |
57 namespace TMS { |
58 |
58 |
59 // ----------------------------------------------------------------------------- |
59 // ----------------------------------------------------------------------------- |
60 // Class Name: IPCallStreamBase |
60 // Class Name: TMSIPCallStreamBase |
61 // |
61 // |
62 // Base abstract class for creating VoIP uplink and downlink streams. |
62 // Base abstract class for creating VoIP uplink and downlink streams. |
63 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
64 class IPCallStreamBase : public CBase |
64 class TMSIPCallStreamBase : public CBase |
65 #ifndef __USE_GSTREAMER__ |
65 #ifndef __USE_GSTREAMER__ |
66 , public MDevSoundObserver |
66 , public MDevSoundObserver |
67 #endif //__USE_GSTREAMER__ |
67 #endif //__USE_GSTREAMER__ |
68 { |
68 { |
69 public: |
69 public: |
70 enum TStreamState |
70 enum TStreamState |
71 { |
71 { |
130 TBool iWriteDataXferHndlToClient; |
130 TBool iWriteDataXferHndlToClient; |
131 TUint32 iKey; |
131 TUint32 iKey; |
132 }; |
132 }; |
133 |
133 |
134 // ----------------------------------------------------------------------------- |
134 // ----------------------------------------------------------------------------- |
135 // Class Name: TMSVoIPDownlink |
135 // Class Name: TMSIPDownlink |
136 // |
136 // |
137 // Class handling VoIP downlink stream object. |
137 // Class handling VoIP downlink stream object. |
138 // ----------------------------------------------------------------------------- |
138 // ----------------------------------------------------------------------------- |
139 class TMSVoIPDownlink : public IPCallStreamBase |
139 class TMSIPDownlink : public TMSIPCallStreamBase |
140 { |
140 { |
141 public: |
141 public: |
142 virtual ~TMSVoIPDownlink(); |
142 virtual ~TMSIPDownlink(); |
143 |
143 |
144 #ifdef __USE_GSTREAMER__ |
144 #ifdef __USE_GSTREAMER__ |
145 static void cb_raw_playback_handoff(GstElement* appsrc, guint size); |
145 static void cb_raw_playback_handoff(GstElement* appsrc, guint size); |
146 static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data); |
146 static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data); |
147 #endif //__USE_GSTREAMER__ |
147 #endif //__USE_GSTREAMER__ |
148 static TMSVoIPDownlink* NewL(const guint32 codecID, |
148 static TMSIPDownlink* NewL(const guint32 codecID, |
149 const TMMFPrioritySettings priority); |
149 const TMMFPrioritySettings priority); |
150 TMSVoIPDownlink(); |
150 TMSIPDownlink(); |
151 void ConstructL(const guint32 codecID, |
151 void ConstructL(const guint32 codecID, |
152 const TMMFPrioritySettings priority); |
152 const TMMFPrioritySettings priority); |
153 |
153 |
154 gint SetCodecCi(); |
154 gint SetCodecCi(); |
155 void Start(); |
155 void Start(); |
227 HBufC8* fbuf; |
227 HBufC8* fbuf; |
228 #endif |
228 #endif |
229 }; |
229 }; |
230 |
230 |
231 // ----------------------------------------------------------------------------- |
231 // ----------------------------------------------------------------------------- |
232 // Class Name: TMSVoIPUplink |
232 // Class Name: TMSIPUplink |
233 // |
233 // |
234 // Class handling VoIP uplink stream. |
234 // Class handling VoIP uplink stream. |
235 // ----------------------------------------------------------------------------- |
235 // ----------------------------------------------------------------------------- |
236 class TMSVoIPUplink : public IPCallStreamBase |
236 class TMSIPUplink : public TMSIPCallStreamBase |
237 { |
237 { |
238 public: |
238 public: |
239 virtual ~TMSVoIPUplink(); |
239 virtual ~TMSIPUplink(); |
240 |
240 |
241 #ifdef __USE_GSTREAMER__ |
241 #ifdef __USE_GSTREAMER__ |
242 static void cb_record_raw_handoff(GstElement *sink); |
242 static void cb_record_raw_handoff(GstElement *sink); |
243 static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data); |
243 static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data); |
244 #endif //__USE_GSTREAMER__ |
244 #endif //__USE_GSTREAMER__ |
245 static TMSVoIPUplink* NewL(const guint32 codecID, |
245 static TMSIPUplink* NewL(const guint32 codecID, |
246 const TMMFPrioritySettings priority); |
246 const TMMFPrioritySettings priority); |
247 TMSVoIPUplink(); |
247 TMSIPUplink(); |
248 void ConstructL(const guint32 codecID, |
248 void ConstructL(const guint32 codecID, |
249 const TMMFPrioritySettings priority); |
249 const TMMFPrioritySettings priority); |
250 |
250 |
251 gint SetCodecCi(); |
251 gint SetCodecCi(); |
252 void Start(); |
252 void Start(); |