[Opalvoip-svn] SF.net SVN: opalvoip:[20627] opal/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2008-07-28 01:58:25
|
Revision: 20627 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=20627&view=rev Author: rjongbloed Date: 2008-07-28 01:58:31 +0000 (Mon, 28 Jul 2008) Log Message: ----------- Removed OPAL_AUDIO define from configuration as is very difficult to achieve, will never be kept op to date, and will be incredibly rarely used. Modified Paths: -------------- opal/trunk/configure.ac opal/trunk/include/codec/opalpluginmgr.h opal/trunk/include/h323/h323caps.h opal/trunk/include/opal/buildopts.h.in opal/trunk/include/opal/mediafmt.h opal/trunk/include/opal/mediastrm.h opal/trunk/include/opal/mediatype.h opal/trunk/include/opal/pcss.h opal/trunk/include/t38/t38proto.h opal/trunk/samples/openphone/main.h opal/trunk/samples/simple/main.h opal/trunk/src/codec/g7231mf.cxx opal/trunk/src/codec/g726mf.cxx opal/trunk/src/codec/g728mf.cxx opal/trunk/src/codec/g729mf.cxx opal/trunk/src/codec/gsm0610mf.cxx opal/trunk/src/codec/gsmamrmf.cxx opal/trunk/src/codec/iLBCmf.cxx opal/trunk/src/codec/opalpluginmgr.cxx opal/trunk/src/h323/h323.cxx opal/trunk/src/h323/h323caps.cxx opal/trunk/src/opal/mediafmt.cxx opal/trunk/src/opal/mediastrm.cxx opal/trunk/src/opal/mediatype.cxx opal/trunk/src/opal/opal_c.cxx opal/trunk/src/opal/pcss.cxx opal/trunk/src/opal/rtpconn.cxx opal/trunk/src/sip/sdp.cxx Modified: opal/trunk/configure.ac =================================================================== --- opal/trunk/configure.ac 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/configure.ac 2008-07-28 01:58:31 UTC (rev 20627) @@ -20,7 +20,6 @@ h460=yes sip=yes iax=yes -audio=yes video=yes rfc4175=yes g711plc=yes @@ -347,24 +346,8 @@ AC_SUBST(OPAL_HAVE_SPEEX_SPEEX_H) dnl ######################################################################## -dnl enable audio, video, SIP, H.323 and IAX +dnl enable video, SIP, H.323 and IAX -dnl MSWIN_DISPLAY audio,Audio -dnl MSWIN_DEFINE audio,OPAL_AUDIO - -AC_ARG_ENABLE(audio, - [ --disable-audio disable audio codec support], - audio=$enableval) -AC_MSG_CHECKING(audio codec support) -if test "$audio" = "yes" ; then - AC_SUBST(OPAL_AUDIO, 1) - AC_DEFINE(OPAL_AUDIO) - AC_MSG_RESULT(enabled) -else - AC_MSG_RESULT(disabled) - g711plc=no -fi - dnl ######################################################################## dnl check for dynamic library code (dlopen and friends) Modified: opal/trunk/include/codec/opalpluginmgr.h =================================================================== --- opal/trunk/include/codec/opalpluginmgr.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/codec/opalpluginmgr.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -79,14 +79,12 @@ public: OpalPluginCodecHandler(); -#if OPAL_AUDIO virtual OpalMediaFormatInternal * OnCreateAudioFormat(OpalPluginCodecManager & mgr, const PluginCodec_Definition * encoderCodec, const char * rtpEncodingName, unsigned frameTime, unsigned timeUnits, time_t timeStamp); -#endif #if OPAL_VIDEO virtual OpalMediaFormatInternal * OnCreateVideoFormat(OpalPluginCodecManager & mgr, @@ -241,8 +239,6 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - class OpalPluginAudioFormatInternal : public OpalAudioFormatInternal, public OpalPluginMediaFormatInternal { public: @@ -304,7 +300,6 @@ int ConvertOne(int codedSample) const; }; -#endif /////////////////////////////////////////////////////////////////////////////// @@ -472,7 +467,6 @@ }; #if OPAL_H323 -#if OPAL_AUDIO ////////////////////////////////////////////////////////////////////////////// // @@ -590,7 +584,6 @@ virtual PString GetFormatName() const; }; -#endif #if OPAL_VIDEO Modified: opal/trunk/include/h323/h323caps.h =================================================================== --- opal/trunk/include/h323/h323caps.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/h323/h323caps.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -531,7 +531,6 @@ //@} }; -#if OPAL_AUDIO /**This class describes the interface to an audio codec used to transfer data via the logical channels opened and managed by the H323 control channel. @@ -925,7 +924,6 @@ //@} }; -#endif // OPAL_AUDIO #if OPAL_VIDEO Modified: opal/trunk/include/opal/buildopts.h.in =================================================================== --- opal/trunk/include/opal/buildopts.h.in 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/opal/buildopts.h.in 2008-07-28 01:58:31 UTC (rev 20627) @@ -76,8 +76,6 @@ // Media support // -#undef OPAL_AUDIO - #if P_VIDEO #undef OPAL_VIDEO #endif @@ -91,11 +89,7 @@ #endif -#ifdef OPAL_AUDIO #undef OPAL_G711PLC -#else -#define NO_OPAL_AUDIO -#endif #ifdef OPAL_VIDEO #undef OPAL_RFC4175 Modified: opal/trunk/include/opal/mediafmt.h =================================================================== --- opal/trunk/include/opal/mediafmt.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/opal/mediafmt.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -1038,7 +1038,6 @@ }; -#if OPAL_AUDIO class OpalAudioFormatInternal : public OpalMediaFormatInternal { public: @@ -1079,7 +1078,6 @@ static const PString & TxFramesPerPacketOption(); static const PString & MaxFramesPerPacketOption(); }; -#endif #if OPAL_VIDEO class OpalVideoFormatInternal : public OpalMediaFormatInternal @@ -1159,7 +1157,6 @@ #define OPAL_T38 "T.38" #define OPAL_H224 "H.224" -#if OPAL_AUDIO extern const OpalAudioFormat & GetOpalPCM16(); extern const OpalAudioFormat & GetOpalPCM16_16KHZ(); extern const OpalAudioFormat & GetOpalL16_MONO_8KHZ(); @@ -1182,7 +1179,6 @@ extern const OpalAudioFormat & GetOpalGSM0610(); extern const OpalAudioFormat & GetOpalGSMAMR(); extern const OpalAudioFormat & GetOpaliLBC(); -#endif extern const OpalMediaFormat & GetOpalRFC2833(); #if OPAL_T38_CAPABILITY Modified: opal/trunk/include/opal/mediastrm.h =================================================================== --- opal/trunk/include/opal/mediastrm.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/opal/mediastrm.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -667,7 +667,7 @@ PFile file; }; -#if OPAL_AUDIO + #if P_AUDIO /**This class describes a media stream that transfers data to/from a audio @@ -726,10 +726,8 @@ PINDEX soundChannelBuffers; }; -#endif +#endif // P_AUDIO -#endif // OPAL_AUDIO - #if OPAL_VIDEO /**This class describes a media stream that transfers data to/from a Modified: opal/trunk/include/opal/mediatype.h =================================================================== --- opal/trunk/include/opal/mediatype.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/opal/mediatype.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -267,7 +267,6 @@ virtual PString GetRTPEncoding() const; }; -#if OPAL_AUDIO class OpalAudioMediaType : public OpalRTPAVPMediaType { public: @@ -278,9 +277,7 @@ #endif }; -#endif // OPAL_AUDIO - #if OPAL_VIDEO class OpalVideoMediaType : public OpalRTPAVPMediaType { Modified: opal/trunk/include/opal/pcss.h =================================================================== --- opal/trunk/include/opal/pcss.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/opal/pcss.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,7 +39,11 @@ #include <ptbuildopts.h> #ifndef P_AUDIO +#ifdef _MSC_VER +#pragma message("PTLib soundcard support not available") +#else #warning "PTLib soundcard support not available" +#endif #else #include <ptlib/sound.h> Modified: opal/trunk/include/t38/t38proto.h =================================================================== --- opal/trunk/include/t38/t38proto.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/include/t38/t38proto.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -58,8 +58,6 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - /** * This format is identical to the OpalPCM16 except that it uses a different * sessionID in order to be compatible with T.38 @@ -84,7 +82,6 @@ ); }; -#endif /////////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/samples/openphone/main.h =================================================================== --- opal/trunk/samples/openphone/main.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/samples/openphone/main.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -36,6 +36,11 @@ #include <ptlib.h> #endif +#ifndef P_AUDIO +#error Cannot compile without PTLib sound channel support! +#endif + + #include <wx/wx.h> #include <wx/dataobj.h> Modified: opal/trunk/samples/simple/main.h =================================================================== --- opal/trunk/samples/simple/main.h 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/samples/simple/main.h 2008-07-28 01:58:31 UTC (rev 20627) @@ -35,6 +35,11 @@ #include <opal/ivr.h> +#ifndef P_AUDIO +#error Cannot compile without PTLib sound channel support! +#endif + + class MyManager; class SIPEndPoint; class H323EndPoint; Modified: opal/trunk/src/codec/g7231mf.cxx =================================================================== --- opal/trunk/src/codec/g7231mf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/g7231mf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,8 +39,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - #define AUDIO_FORMAT(name) \ const OpalAudioFormat & GetOpal##name() \ { \ @@ -53,7 +51,5 @@ AUDIO_FORMAT(G7231A_6k3); AUDIO_FORMAT(G7231A_5k3); -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/g726mf.cxx =================================================================== --- opal/trunk/src/codec/g726mf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/g726mf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,8 +39,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const OpalAudioFormat & GetOpalG726_40K() { static const OpalAudioFormat G726_40K(OPAL_G726_40K, RTP_DataFrame::DynamicBase, "G726-40", 5, 8, 240, 30, 256, 8000); @@ -65,7 +63,5 @@ return G726_16K; } -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/g728mf.cxx =================================================================== --- opal/trunk/src/codec/g728mf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/g728mf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,15 +39,11 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const OpalAudioFormat & GetOpalG728() { static const OpalAudioFormat G728(OPAL_G728, RTP_DataFrame::G728, "G728", 5, 20, 100, 10, 256, 8000); return G728; } -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/g729mf.cxx =================================================================== --- opal/trunk/src/codec/g729mf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/g729mf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,8 +39,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - #define AUDIO_FORMAT(name) \ const OpalAudioFormat & GetOpal##name() \ { \ @@ -53,7 +51,5 @@ AUDIO_FORMAT(G729B); AUDIO_FORMAT(G729AB); -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/gsm0610mf.cxx =================================================================== --- opal/trunk/src/codec/gsm0610mf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/gsm0610mf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,15 +39,11 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const OpalAudioFormat & GetOpalGSM0610() { static const OpalAudioFormat GSM0610(OPAL_GSM0610, RTP_DataFrame::GSM, "GSM", 33, 160, 7, 4, 7, 8000 ); return GSM0610; } -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/gsmamrmf.cxx =================================================================== --- opal/trunk/src/codec/gsmamrmf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/gsmamrmf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,8 +39,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const OpalAudioFormat & GetOpalGSMAMR() { static class OpalGSMAMRFormat : public OpalAudioFormat @@ -88,7 +86,5 @@ return GSMAMR; } -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/iLBCmf.cxx =================================================================== --- opal/trunk/src/codec/iLBCmf.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/iLBCmf.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -39,8 +39,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const OpalAudioFormat & GetOpaliLBC() { static class OpaliLBCFormat : public OpalAudioFormat @@ -74,7 +72,5 @@ return iLBC; } -#endif - // End of File /////////////////////////////////////////////////////////////// Modified: opal/trunk/src/codec/opalpluginmgr.cxx =================================================================== --- opal/trunk/src/codec/opalpluginmgr.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/codec/opalpluginmgr.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -494,8 +494,6 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - OpalPluginAudioFormatInternal::OpalPluginAudioFormatInternal(const PluginCodec_Definition * _encoderCodec, const char * rtpEncodingName, /// rtp encoding name unsigned frameTime, /// Time for frame in RTP units (if applicable) @@ -574,7 +572,6 @@ #endif // OPAL_H323 -#endif // OPAL_AUDIO /////////////////////////////////////////////////////////////////////////////// @@ -699,8 +696,6 @@ H323Capability * (* createFunc)(const PluginCodec_Definition * encoderCodec, const PluginCodec_Definition * decoderCodec, int subType); }; -#if OPAL_AUDIO - static H323CodecPluginCapabilityMapEntry audioMaps[] = { { PluginCodec_H323Codec_nonStandard, H245_AudioCapability::e_nonStandard, &CreateNonStandardAudioCap }, { PluginCodec_H323AudioCodec_gsmFullRate, H245_AudioCapability::e_gsmFullRate, &CreateGSMCap }, @@ -730,7 +725,6 @@ { -1 } }; -#endif // OPAL_AUDIO #if OPAL_VIDEO @@ -787,7 +781,6 @@ // Plugin framed audio codec classes // -#if OPAL_AUDIO OpalPluginFramedAudioTranscoder::OpalPluginFramedAudioTranscoder(PluginCodec_Definition * _codec, PBoolean _isEncoder, const char * rawFormat) : OpalFramedTranscoder( (strcmp(_codec->sourceFormat, "L16") == 0) ? (rawFormat != NULL ? rawFormat : ((_codec->sampleRate == 8000) ? OpalPCM16 : OpalPCM16_16KHZ)) : _codec->sourceFormat, (strcmp(_codec->destFormat, "L16") == 0) ? (rawFormat != NULL ? rawFormat : ((_codec->sampleRate == 8000) ? OpalPCM16 : OpalPCM16_16KHZ)) : _codec->destFormat, @@ -915,7 +908,6 @@ return Transcode(&codedSample, &fromLen, &to, &toLen, &flags) ? to : -1; } -#endif // OPAL_AUDIO #if OPAL_VIDEO @@ -1169,8 +1161,6 @@ #if OPAL_H323 -#if OPAL_AUDIO - ////////////////////////////////////////////////////////////////////////////// // // Class for handling most audio plugin capabilities @@ -1291,10 +1281,9 @@ int scrambled; }; -#endif // OPAL_AUDIO - #endif // OPAL_H323 + ///////////////////////////////////////////////////////////////////////////// OpalPluginCodecManager::OpalPluginCodecManager(PPluginManager * _pluginMgr) @@ -1497,14 +1486,14 @@ defaultSessionID = OpalMediaFormat::DefaultVideoSessionID; break; #endif -#if OPAL_AUDIO + case PluginCodec_MediaTypeAudio: case PluginCodec_MediaTypeAudioStreamed: defaultSessionID = OpalMediaFormat::DefaultAudioSessionID; frameTime = encoderCodec->parm.audio.samplesPerFrame; clockRate = encoderCodec->sampleRate; break; -#endif + #if OPAL_T38_CAPABILITY case PluginCodec_MediaTypeFax: defaultSessionID = OpalMediaFormat::DefaultDataSessionID; @@ -1536,12 +1525,12 @@ mediaFormatInternal = handler->OnCreateVideoFormat(*this, encoderCodec, encoderCodec->sdpFormat, timeStamp); break; #endif -#if OPAL_AUDIO + case PluginCodec_MediaTypeAudio: case PluginCodec_MediaTypeAudioStreamed: mediaFormatInternal = handler->OnCreateAudioFormat(*this, encoderCodec, encoderCodec->sdpFormat, frameTime, clockRate, timeStamp); break; -#endif + #if OPAL_T38_CAPABILITY case PluginCodec_MediaTypeFax: mediaFormatInternal = handler->OnCreateFaxFormat(*this, encoderCodec, encoderCodec->sdpFormat, frameTime, clockRate, timeStamp); @@ -1593,7 +1582,7 @@ handler->RegisterVideoTranscoder(encoderCodec->destFormat, OpalYUV420P, decoderCodec, PFalse); break; #endif -#if OPAL_AUDIO + case PluginCodec_MediaTypeAudio: if (encoderCodec->sampleRate == 8000) { new OpalPluginTranscoderFactory<OpalPluginFramedAudioTranscoder>::Worker(OpalTranscoderKey(OpalPCM16, encoderCodec->destFormat), encoderCodec, PTrue); @@ -1624,7 +1613,7 @@ PTRACE(1, "OpalPlugin\tAudio plugin defines unsupported clock rate " << encoderCodec->sampleRate); } break; -#endif + #if OPAL_T38_CAPABILITY case PluginCodec_MediaTypeFax: new OpalPluginTranscoderFactory<OpalFaxAudioTranscoder>::Worker(OpalTranscoderKey(OpalPCM16, encoderCodec->destFormat), encoderCodec, PTrue); @@ -1656,12 +1645,10 @@ H323CodecPluginCapabilityMapEntry * map = NULL; switch (encoderCodec->flags & PluginCodec_MediaTypeMask) { -#if OPAL_AUDIO case PluginCodec_MediaTypeAudio: case PluginCodec_MediaTypeAudioStreamed: map = audioMaps; break; -#endif // OPAL_AUDIO #if OPAL_VIDEO case PluginCodec_MediaTypeVideo: @@ -1684,12 +1671,10 @@ cap = (*map[i].createFunc)(encoderCodec, decoderCodec, map[i].h323SubType); else { switch (encoderCodec->flags & PluginCodec_MediaTypeMask) { -#if OPAL_AUDIO case PluginCodec_MediaTypeAudio: case PluginCodec_MediaTypeAudioStreamed: cap = new H323AudioPluginCapability(encoderCodec, decoderCodec, map[i].h323SubType); break; -#endif // OPAL_AUDIO #if OPAL_VIDEO case PluginCodec_MediaTypeVideo: @@ -1719,7 +1704,7 @@ { } -#if OPAL_AUDIO + OpalMediaFormatInternal * OpalPluginCodecHandler::OnCreateAudioFormat(OpalPluginCodecManager & /*mgr*/, const PluginCodec_Definition * encoderCodec, const char * rtpEncodingName, @@ -1729,8 +1714,8 @@ { return new OpalPluginAudioFormatInternal(encoderCodec, rtpEncodingName, frameTime, timeUnits, timeStamp); } -#endif + #if OPAL_VIDEO OpalMediaFormatInternal * OpalPluginCodecHandler::OnCreateVideoFormat(OpalPluginCodecManager & /*mgr*/, const PluginCodec_Definition * encoderCodec, @@ -1763,8 +1748,6 @@ #if OPAL_H323 -#if OPAL_AUDIO - H323Capability * CreateNonStandardAudioCap(const PluginCodec_Definition * encoderCodec, const PluginCodec_Definition * decoderCodec, int /*subType*/) @@ -1813,7 +1796,6 @@ return new H323GSMPluginCapability(encoderCodec, decoderCodec, subType, pluginData->comfortNoise, pluginData->scrambled); } -#endif // OPAL_AUDIO #if OPAL_VIDEO @@ -1882,7 +1864,6 @@ { } -#if OPAL_AUDIO ///////////////////////////////////////////////////////////////////////////// @@ -1988,8 +1969,6 @@ ///////////////////////////////////////////////////////////////////////////// -#endif // OPAL_AUDIO - #if OPAL_VIDEO ////////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/h323/h323.cxx =================================================================== --- opal/trunk/src/h323/h323.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/h323/h323.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -3730,9 +3730,7 @@ // Select the first codec that uses the "standard" audio session. switch (fastStartState) { default : //FastStartDisabled : -#if OPAL_AUDIO SelectDefaultLogicalChannel(OpalMediaType::Audio(), OpalMediaFormat::DefaultAudioSessionID); -#endif #if OPAL_VIDEO if (endpoint.CanAutoStartTransmitVideo()) SelectDefaultLogicalChannel(OpalMediaType::Video(), OpalMediaFormat::DefaultVideoSessionID); @@ -3750,9 +3748,7 @@ break; case FastStartInitiate : -#if OPAL_AUDIO SelectFastStartChannels(OpalMediaFormat::DefaultAudioSessionID, PTrue, PTrue); -#endif #if OPAL_VIDEO SelectFastStartChannels(OpalMediaFormat::DefaultVideoSessionID, endpoint.CanAutoStartTransmitVideo(), @@ -3766,10 +3762,8 @@ break; case FastStartResponse : -#if OPAL_AUDIO StartFastStartChannel(OpalMediaFormat::DefaultAudioSessionID, H323Channel::IsTransmitter); StartFastStartChannel(OpalMediaFormat::DefaultAudioSessionID, H323Channel::IsReceiver); -#endif #if OPAL_VIDEO if (endpoint.CanAutoStartTransmitVideo()) StartFastStartChannel(OpalMediaFormat::DefaultVideoSessionID, H323Channel::IsTransmitter); Modified: opal/trunk/src/h323/h323caps.cxx =================================================================== --- opal/trunk/src/h323/h323caps.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/h323/h323caps.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -717,8 +717,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - H323AudioCapability::H323AudioCapability() { } @@ -1045,7 +1043,6 @@ H323NonStandardCapabilityInfo::IsMatch((const H245_NonStandardParameter &)subTypePDU.GetObject()); } -#endif // OPAL_AUDIO ///////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/opal/mediafmt.cxx =================================================================== --- opal/trunk/src/opal/mediafmt.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/mediafmt.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -61,8 +61,6 @@ ///////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - #define AUDIO_FORMAT(name, rtpPayloadType, encodingName, frameSize, frameTime, rxFrames, txFrames, maxFrames, clock) \ const OpalAudioFormat & GetOpal##name() \ { \ @@ -78,7 +76,6 @@ AUDIO_FORMAT(G711_ULAW_64K, PCMU, "PCMU", 8, 8, 240, 30, 256, 8000); AUDIO_FORMAT(G711_ALAW_64K, PCMA, "PCMA", 8, 8, 240, 30, 256, 8000); -#endif const OpalMediaFormat & GetOpalRFC2833() { @@ -1242,8 +1239,6 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - const PString & OpalAudioFormat::RxFramesPerPacketOption() { static PString s = PLUGINCODEC_OPTION_RX_FRAMES_PER_PACKET; return s; } const PString & OpalAudioFormat::TxFramesPerPacketOption() { static PString s = PLUGINCODEC_OPTION_TX_FRAMES_PER_PACKET; return s; } const PString & OpalAudioFormat::MaxFramesPerPacketOption(){ static PString s = "Max Frames Per Packet"; return s; } @@ -1321,7 +1316,6 @@ return true; } -#endif /////////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/opal/mediastrm.cxx =================================================================== --- opal/trunk/src/opal/mediastrm.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/mediastrm.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -874,7 +874,6 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO #if P_AUDIO OpalAudioMediaStream::OpalAudioMediaStream(OpalConnection & conn, @@ -931,7 +930,6 @@ } #endif // P_AUDIO -#endif // OPAL_AUDIO /////////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/opal/mediatype.cxx =================================================================== --- opal/trunk/src/opal/mediatype.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/mediatype.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -47,9 +47,8 @@ int mediaTypeLoader; }; // namespace PWLibStupidLinkerHacks -#if OPAL_AUDIO + OPAL_INSTANTIATE_MEDIATYPE(audio, OpalAudioMediaType); -#endif #if OPAL_VIDEO OPAL_INSTANTIATE_MEDIATYPE(video, OpalVideoMediaType); @@ -193,14 +192,11 @@ /////////////////////////////////////////////////////////////////////////////// -#if OPAL_AUDIO - OpalAudioMediaType::OpalAudioMediaType() : OpalRTPAVPMediaType("audio", "audio", 1) { } -#endif // OPAL_AUDIO /////////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/opal/opal_c.cxx =================================================================== --- opal/trunk/src/opal/opal_c.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/opal_c.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -85,6 +85,8 @@ #define SET_MESSAGE_STRING(msg, member, str) (msg).SetString(&(msg)->member, str) +#if P_AUDIO + class OpalPCSSEndPoint_C : public OpalPCSSEndPoint { public: @@ -97,7 +99,9 @@ OpalManager_C & m_manager; }; +#endif // P_AUDIO + class OpalLocalEndPoint_C : public OpalLocalEndPoint { public: @@ -142,8 +146,10 @@ { public: OpalManager_C(unsigned version) - : pcssEP(NULL) - , localEP(NULL) + : localEP(NULL) +#if P_AUDIO + , pcssEP(NULL) +#endif , m_apiVersion(version) , m_messagesAvailable(0, INT_MAX) { @@ -183,8 +189,10 @@ void OnIndMediaStream(const OpalMediaStream & stream, OpalMediaStates state); + OpalLocalEndPoint_C * localEP; +#if P_AUDIO OpalPCSSEndPoint_C * pcssEP; - OpalLocalEndPoint_C * localEP; +#endif unsigned m_apiVersion; std::queue<OpalMessage *> m_messageQueue; @@ -478,6 +486,8 @@ /////////////////////////////////////// +#if P_AUDIO + OpalPCSSEndPoint_C::OpalPCSSEndPoint_C(OpalManager_C & mgr) : OpalPCSSEndPoint(mgr) , m_manager(mgr) @@ -511,7 +521,9 @@ return true; } +#endif // P_AUDIO + /////////////////////////////////////// #if OPAL_SIP @@ -651,10 +663,12 @@ } #endif +#if P_AUDIO if (pcPos != P_MAX_INDEX) { pcssEP = new OpalPCSSEndPoint_C(*this); AddRouteEntry("pc:.*=" + defProto + ":<da>"); } +#endif if (localPos != P_MAX_INDEX) { localEP = new OpalLocalEndPoint_C(*this); @@ -746,6 +760,7 @@ void OpalManager_C::HandleSetGeneral(const OpalMessage & command, OpalMessageBuffer & response) { +#if P_AUDIO if (pcssEP != NULL) { SET_MESSAGE_STRING(response, m_param.m_general.m_audioRecordDevice, pcssEP->GetSoundChannelRecordDevice()); if (!IsNullString(command.m_param.m_general.m_audioRecordDevice)) @@ -755,6 +770,7 @@ if (!IsNullString(command.m_param.m_general.m_audioPlayerDevice)) pcssEP->SetSoundChannelPlayDevice(command.m_param.m_general.m_audioPlayerDevice); } +#endif // P_AUDIO #if OPAL_VIDEO PVideoDevice::OpenArgs video = GetVideoInputDevice(); @@ -777,7 +793,7 @@ video.deviceName = command.m_param.m_general.m_videoPreviewDevice; SetVideoPreviewDevice(video); } -#endif +#endif // OPAL_VIDEO PStringStream strm; strm << setfill('\n') << GetMediaFormatOrder(); @@ -885,11 +901,13 @@ if (m_apiVersion < 3) return; +#if P_AUDIO if (pcssEP != NULL) { response->m_param.m_general.m_audioBuffers = pcssEP->GetSoundChannelBufferDepth(); if (command.m_param.m_general.m_audioBuffers != 0) pcssEP->SetSoundChannelBufferDepth(command.m_param.m_general.m_audioBuffers); } +#endif if (m_apiVersion < 5) return; @@ -1099,8 +1117,17 @@ } PString partyA = command.m_param.m_callSetUp.m_partyA; - if (partyA.IsEmpty()) - partyA = pcssEP != NULL ? "pc:*" : "pots:*"; + if (partyA.IsEmpty()) { +#if P_AUDIO + if (pcssEP != NULL) + partyA = "pc:*"; + else +#endif + if (localEP != NULL) + partyA = "local:*"; + else + partyA = "pots:*"; + } PString token; if (SetUpCall(partyA, command.m_param.m_callSetUp.m_partyB, token)) { @@ -1120,13 +1147,19 @@ return; } - if (pcssEP == NULL && localEP == NULL) { + if ( +#if P_AUDIO + pcssEP == NULL && +#endif + localEP == NULL) { response.SetError("Can only answer calls to PC."); return; } +#if P_AUDIO if (pcssEP != NULL && pcssEP->AcceptIncomingConnection(command.m_param.m_callToken)) return; +#endif if (localEP != NULL && localEP->AcceptIncomingCall(command.m_param.m_callToken)) return; Modified: opal/trunk/src/opal/pcss.cxx =================================================================== --- opal/trunk/src/opal/pcss.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/pcss.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -37,6 +37,8 @@ #include <opal/buildopts.h> #include <opal/pcss.h> +#if P_AUDIO + #if OPAL_VIDEO #include <ptlib/videoio.h> #include <codec/vidcodec.h> @@ -410,5 +412,7 @@ } } +#endif // P_AUDIO + ///////////////////////////////////////////////////////////////////////////// Modified: opal/trunk/src/opal/rtpconn.cxx =================================================================== --- opal/trunk/src/opal/rtpconn.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/opal/rtpconn.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -526,9 +526,7 @@ } // set old video and audio auto start if not already set -#if OPAL_AUDIO SetOldOptions(1, OpalMediaType::Audio(), true, true); -#endif #if OPAL_VIDEO OpalManager & mgr = conn.GetCall().GetManager(); SetOldOptions(2, OpalMediaType::Video(), mgr.CanAutoStartReceiveVideo(), mgr.CanAutoStartTransmitVideo()); Modified: opal/trunk/src/sip/sdp.cxx =================================================================== --- opal/trunk/src/sip/sdp.cxx 2008-07-26 06:27:01 UTC (rev 20626) +++ opal/trunk/src/sip/sdp.cxx 2008-07-28 01:58:31 UTC (rev 20627) @@ -992,7 +992,7 @@ if (!SDPRTPAVPMediaDescription::PrintOn(str, connectString)) return false; -#if OPAL_AUDIO && defined(HAVE_PTIME) +#ifdef HAVE_PTIME // Fill in the ptime as maximum tx packets of all media formats // and maxptime as minimum rx packets of all media formats unsigned ptime = 0; @@ -1020,14 +1020,14 @@ if (maxptime < UINT_MAX) str << "a=maxptime:" << maxptime << "\r\n"; -#endif // OPAL_AUDIO +#endif // HAVE_PTIME return true; } void SDPAudioMediaDescription::SetAttribute(const PString & attr, const PString & value) { -#if OPAL_AUDIO && defined(HAVE_PTIME) +#ifdef HAVE_PTIME if (attr *= "ptime") { SetPacketTime(OpalAudioFormat::TxFramesPerPacketOption(), value); return; @@ -1037,7 +1037,7 @@ SetPacketTime(OpalAudioFormat::RxFramesPerPacketOption(), value); return; } -#endif +#endif // HAVE_PTIME return SDPRTPAVPMediaDescription::SetAttribute(attr, value); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |