32 #ifndef OPAL_OPAL_MEDIAFMT_H
33 #define OPAL_OPAL_MEDIAFMT_H
41 #pragma warning(disable:4663)
51 #include <ptlib/videoio.h>
100 ) { PConstString s(wildcard);
return operator+=(s); }
106 const PString & wildcard
144 const unsigned clockRate,
145 const char * rtpEncodingName = NULL,
146 const char * protocol = NULL,
147 const_iterator start = const_iterator()
167 const PString & wildcard,
168 const_iterator start = const_iterator()
175 )
const {
return FindFormat(rtpPayloadType) != end(); }
183 const PString & wildcard
184 )
const {
return FindFormat(wildcard) != end(); }
205 const PStringArray & mask
224 const PStringArray & order
231 bool mustBeTransportable =
true
236 virtual PINDEX Append(PObject *) {
return P_MAX_INDEX; }
237 virtual PINDEX Insert(
const PObject &, PObject *) {
return P_MAX_INDEX; }
238 virtual PINDEX InsertAt(PINDEX, PObject *) {
return P_MAX_INDEX; }
239 virtual PBoolean SetAt(PINDEX, PObject *) {
return false; }
278 virtual Comparison
Compare(
const PObject & obj)
const;
353 template <
typename T>
390 if (otherOption == NULL)
400 if (otherOption == NULL)
402 if (m_value < otherOption->
m_value)
404 if (m_value > otherOption->
m_value)
412 if (otherOption != NULL)
431 template <
typename T>
442 T minimum = std::numeric_limits<T>::min(),
443 T maximum = std::numeric_limits<T>::max()
445 :
BaseClass(name, readOnly, merge, value)
465 strm.setstate(ios::badbit);
504 operator double()
const {
return m_value; }
505 void operator&=(
double other) {
if (m_value > other) m_value = other; }
524 const char *
const * enumerations,
530 virtual PObject *
Clone()
const;
531 virtual void PrintOn(ostream & strm)
const;
532 virtual void ReadFrom(istream & strm);
563 const PString & value
566 virtual PObject *
Clone()
const;
567 virtual void PrintOn(ostream & strm)
const;
568 virtual void ReadFrom(istream & strm);
575 void SetValue(
const PString & value);
595 const PBYTEArray & value
605 virtual PObject *
Clone()
const;
606 virtual void PrintOn(ostream & strm)
const;
607 virtual void ReadFrom(istream & strm);
613 void SetValue(
const PBYTEArray & value);
614 void SetValue(
const BYTE * data, PINDEX length);
634 const char * fullName,
637 const char * encodingName,
638 PBoolean needsJitter,
648 virtual PObject *
Clone()
const;
649 virtual void PrintOn(ostream & strm)
const;
655 virtual bool GetOptionValue(
const PString & name, PString & value)
const;
656 virtual bool SetOptionValue(
const PString & name,
const PString & value);
661 virtual double GetOptionReal(
const PString & name,
double dflt)
const;
662 virtual bool SetOptionReal(
const PString & name,
double value);
663 virtual PINDEX
GetOptionEnum(
const PString & name, PINDEX dflt)
const;
664 virtual bool SetOptionEnum(
const PString & name, PINDEX value);
665 virtual PString
GetOptionString(
const PString & name,
const PString & dflt)
const;
666 virtual bool SetOptionString(
const PString & name,
const PString & value);
667 virtual bool GetOptionOctets(
const PString & name, PBYTEArray & octets)
const;
668 virtual bool SetOptionOctets(
const PString & name,
const PBYTEArray & octets);
669 virtual bool SetOptionOctets(
const PString & name,
const BYTE * data, PINDEX length);
743 const char * fullName,
746 const char * encodingName,
747 PBoolean needsJitter,
767 const char * rtpEncodingName = NULL,
768 const char * protocol = NULL
785 const char * wildcard
802 const PString & wildcard
816 const char * wildcard
823 const PString & wildcard
828 virtual PObject *
Clone()
const;
832 virtual Comparison
Compare(
const PObject & obj)
const;
838 virtual void PrintOn(ostream & strm)
const;
842 virtual void ReadFrom(istream & strm);
983 const PString & name,
994 const PString & name,
995 const PString & value
1002 const PString & name,
1013 const PString & name,
1021 const PString & name,
1033 const PString & name,
1041 const PString & name,
1052 const PString & name,
1061 const PString & name,
1072 const PString & name,
1080 const PString & name,
1081 const PString & dflt = PString::Empty()
1091 const PString & name,
1092 const PString & value
1099 const PString & name,
1110 const PString & name,
1111 const PBYTEArray & octets
1114 const PString & name,
1145 PBoolean overwrite =
false
1157 const PString & name
1164 const PString & name
1165 )
const {
return dynamic_cast<T *
>(
FindOption(name)); }
1180 strm << setw(-1) << *
m_info;
1188 PVideoDevice::OpenArgs & args
1213 PBoolean SetSize(PINDEX) {
return true; }
1230 const char * fullName,
1232 const char * encodingName,
1241 virtual PObject *
Clone()
const;
1253 const char * fullName,
1255 const char * encodingName,
1260 unsigned maxFrames = 256,
1261 unsigned clockRate = 8000,
1262 time_t timeStamp = 0
1276 const char * fullName,
1278 const char * encodingName,
1279 unsigned maxFrameWidth,
1280 unsigned maxFrameHeight,
1281 unsigned maxFrameRate,
1282 unsigned maxBitRate,
1285 virtual PObject *
Clone()
const;
1298 const char * fullName,
1300 const char * encodingName,
1301 unsigned maxFrameWidth,
1302 unsigned maxFrameHeight,
1303 unsigned maxFrameRate,
1304 unsigned maxBitRate,
1305 time_t timeStamp = 0
1347 #define OPAL_PCM16 "PCM-16"
1348 #define OPAL_PCM16S "PCM-16S"
1349 #define OPAL_PCM16_16KHZ "PCM-16-16kHz"
1350 #define OPAL_PCM16S_16KHZ "PCM-16S-16kHz"
1351 #define OPAL_PCM16_32KHZ "PCM-16-32kHz"
1352 #define OPAL_PCM16S_32KHZ "PCM-16S-32kHz"
1353 #define OPAL_PCM16_48KHZ "PCM-16-48kHz"
1354 #define OPAL_PCM16S_48KHZ "PCM-16S-48kHz"
1355 #define OPAL_L16_MONO_8KHZ "Linear-16-Mono-8kHz"
1356 #define OPAL_L16_STEREO_8KHZ "Linear-16-Stereo-8kHz"
1357 #define OPAL_L16_MONO_16KHZ "Linear-16-Mono-16kHz"
1358 #define OPAL_L16_STEREO_16KHZ "Linear-16-Stereo-16kHz"
1359 #define OPAL_L16_MONO_32KHZ "Linear-16-Mono-32kHz"
1360 #define OPAL_L16_STEREO_32KHZ "Linear-16-Stereo-32kHz"
1361 #define OPAL_L16_MONO_48KHZ "Linear-16-Mono-48kHz"
1362 #define OPAL_L16_STEREO_48KHZ "Linear-16-Stereo-48kHz"
1363 #define OPAL_G711_ULAW_64K "G.711-uLaw-64k"
1364 #define OPAL_G711_ALAW_64K "G.711-ALaw-64k"
1365 #define OPAL_G722 "G.722"
1366 #define OPAL_G7221 "G.722.1"
1367 #define OPAL_G7222 "G.722.2"
1368 #define OPAL_G726_40K "G.726-40K"
1369 #define OPAL_G726_32K "G.726-32K"
1370 #define OPAL_G726_24K "G.726-24K"
1371 #define OPAL_G726_16K "G.726-16K"
1372 #define OPAL_G728 "G.728"
1373 #define OPAL_G729 "G.729"
1374 #define OPAL_G729A "G.729A"
1375 #define OPAL_G729B "G.729B"
1376 #define OPAL_G729AB "G.729A/B"
1377 #define OPAL_G7231 "G.723.1"
1378 #define OPAL_G7231_6k3 OPAL_G7231
1379 #define OPAL_G7231_5k3 "G.723.1(5.3k)"
1380 #define OPAL_G7231A_6k3 "G.723.1A(6.3k)"
1381 #define OPAL_G7231A_5k3 "G.723.1A(5.3k)"
1382 #define OPAL_GSM0610 "GSM-06.10"
1383 #define OPAL_GSMAMR "GSM-AMR"
1384 #define OPAL_iLBC "iLBC"
1385 #define OPAL_H261 "H.261"
1386 #define OPAL_H263 "H.263"
1387 #define OPAL_H264 "H.264"
1388 #define OPAL_H264_MODE0 "H.264-0"
1389 #define OPAL_H264_MODE1 "H.264-1"
1390 #define OPAL_MPEG4 "MPEG4"
1391 #define OPAL_RFC2833 "UserInput/RFC2833"
1392 #define OPAL_CISCONSE "NamedSignalEvent"
1393 #define OPAL_T38 "T.38"
1435 #if OPAL_T38_CAPABILITY
1441 #define OpalPCM16 GetOpalPCM16()
1442 #define OpalPCM16S GetOpalPCM16S()
1443 #define OpalPCM16_16KHZ GetOpalPCM16_16KHZ()
1444 #define OpalPCM16S_16KHZ GetOpalPCM16S_16KHZ()
1445 #define OpalPCM16_32KHZ GetOpalPCM16_32KHZ()
1446 #define OpalPCM16S_32KHZ GetOpalPCM16S_32KHZ()
1447 #define OpalPCM16_48KHZ GetOpalPCM16_48KHZ()
1448 #define OpalPCM16S_48KHZ GetOpalPCM16S_48KHZ()
1449 #define OpalL16_MONO_8KHZ GetOpalL16_MONO_8KHZ()
1450 #define OpalL16_STEREO_8KHZ GetOpalL16_STEREO_8KHZ()
1451 #define OpalL16_MONO_16KHZ GetOpalL16_MONO_16KHZ()
1452 #define OpalL16_STEREO_16KHZ GetOpalL16_STEREO_16KHZ()
1453 #define OpalL16_MONO_32KHZ GetOpalL16_MONO_32KHZ()
1454 #define OpalL16_STEREO_32KHZ GetOpalL16_STEREO_32KHZ()
1455 #define OpalL16_MONO_48KHZ GetOpalL16_MONO_48KHZ()
1456 #define OpalL16_STEREO_48KHZ GetOpalL16_STEREO_48KHZ()
1457 #define OpalG711_ULAW_64K GetOpalG711_ULAW_64K()
1458 #define OpalG711_ALAW_64K GetOpalG711_ALAW_64K()
1459 #define OpalG722 GetOpalG722()
1460 #define OpalG7221 GetOpalG7221()
1461 #define OpalG7222 GetOpalG7222()
1462 #define OpalG726_40K GetOpalG726_40K()
1463 #define OpalG726_32K GetOpalG726_32K()
1464 #define OpalG726_24K GetOpalG726_24K()
1465 #define OpalG726_16K GetOpalG726_16K()
1466 #define OpalG728 GetOpalG728()
1467 #define OpalG729 GetOpalG729()
1468 #define OpalG729A GetOpalG729A()
1469 #define OpalG729B GetOpalG729B()
1470 #define OpalG729AB GetOpalG729AB()
1471 #define OpalG7231_6k3 GetOpalG7231_6k3()
1472 #define OpalG7231_5k3 GetOpalG7231_5k3()
1473 #define OpalG7231A_6k3 GetOpalG7231A_6k3()
1474 #define OpalG7231A_5k3 GetOpalG7231A_5k3()
1475 #define OpalGSM0610 GetOpalGSM0610()
1476 #define OpalGSMAMR GetOpalGSMAMR()
1477 #define OpaliLBC GetOpaliLBC()
1478 #define OpalRFC2833 GetOpalRFC2833()
1479 #define OpalCiscoNSE GetOpalCiscoNSE()
1480 #define OpalT38 GetOpalT38()
1482 #define OpalL16Mono8kHz OpalL16_MONO_8KHZ
1483 #define OpalL16Mono16kHz OpalL16_MONO_16KHZ
1484 #define OpalG711uLaw OpalG711_ULAW_64K
1485 #define OpalG711ALaw OpalG711_ALAW_64K
1487 #define OPAL_T140 "T.140"
1488 #define OpalT140 GetOpalT140()
1492 #define OPAL_MSRP "MSRP"
1493 #define OpalMSRP GetOpalMSRP()
1498 #define OPAL_SIPIM "SIP-IM"
1499 #define OpalSIPIM GetOpalSIPIM()
1505 #pragma warning(default:4663)
1509 #endif // OPAL_OPAL_MEDIAFMT_H