32 #ifndef OPAL_OPAL_MEDIAFMT_H
33 #define OPAL_OPAL_MEDIAFMT_H
43 #include <ptlib/bitwise_enum.h>
46 #include <ptlib/videoio.h>
91 void SetH225(H225_BandWidth & bw)
const;
136 const char * wildcard
137 ) { PConstString w(wildcard);
return operator+=(w); }
143 const PString & wildcard
192 const unsigned clockRate = 0,
193 const char * rtpEncodingName = NULL,
194 const char * protocol = NULL,
195 const_iterator start = const_iterator()
215 const PString & wildcard,
216 const_iterator start = const_iterator()
223 )
const {
return FindFormat(rtpPayloadType) != end(); }
231 const PString & wildcard
232 )
const {
return FindFormat(wildcard) != end(); }
238 bool mustBeTransportable =
true
261 const PStringArray & order
283 const PStringArray & mask
292 virtual PINDEX Append(PObject *) {
return P_MAX_INDEX; }
293 virtual PINDEX Insert(
const PObject &, PObject *) {
return P_MAX_INDEX; }
332 virtual Comparison
Compare(
const PObject & obj)
const;
367 void SetFMTP(
const char * name,
const char * dflt)
372 #define OPAL_SET_MEDIA_OPTION_FMTP(opt, name, dflt) (opt)->SetFMTP(name, dflt)
374 #define OPAL_SET_MEDIA_OPTION_FMTP(opt, name, dflt)
382 const char * dflt = NULL
408 #define OPAL_SET_MEDIA_OPTION_H245(opt, ...) (opt)->SetH245Generic(OpalMediaOption::H245GenericInfo(__VA_ARGS__))
410 #define OPAL_SET_MEDIA_OPTION_H245(opt, ...)
429 template <
typename T>
466 if (otherOption == NULL)
476 if (otherOption == NULL)
478 if (m_value < otherOption->
m_value)
480 if (m_value > otherOption->
m_value)
488 if (otherOption != NULL)
507 template <
typename T>
518 T minimum = std::numeric_limits<T>::min(),
519 T maximum = std::numeric_limits<T>::max()
521 :
BaseClass(name, readOnly, merge, value)
541 strm.setstate(ios::badbit);
580 operator double()
const {
return m_value; }
581 void operator&=(
double other) {
if (m_value > other) m_value = other; }
600 const char *
const * enumerations,
606 virtual PObject *
Clone()
const;
607 virtual void PrintOn(ostream & strm)
const;
608 virtual void ReadFrom(istream & strm);
639 const PString & value
642 virtual PObject *
Clone()
const;
643 virtual void PrintOn(ostream & strm)
const;
644 virtual void ReadFrom(istream & strm);
651 void SetValue(
const PString & value);
671 const PBYTEArray & value
681 virtual PObject *
Clone()
const;
682 virtual void PrintOn(ostream & strm)
const;
683 virtual void ReadFrom(istream & strm);
689 void SetValue(
const PBYTEArray & value);
690 void SetValue(
const BYTE * data, PINDEX length);
710 const char * fullName,
713 const char * encodingName,
724 virtual PObject *
Clone()
const;
725 virtual void PrintOn(ostream & strm)
const;
731 virtual bool GetOptionValue(
const PString & name, PString & value)
const;
732 virtual bool SetOptionValue(
const PString & name,
const PString & value);
737 virtual double GetOptionReal(
const PString & name,
double dflt)
const;
738 virtual bool SetOptionReal(
const PString & name,
double value);
739 virtual PINDEX
GetOptionEnum(
const PString & name, PINDEX dflt)
const;
740 virtual bool SetOptionEnum(
const PString & name, PINDEX value);
741 virtual PString
GetOptionString(
const PString & name,
const PString & dflt)
const;
742 virtual bool SetOptionString(
const PString & name,
const PString & value);
743 virtual bool GetOptionOctets(
const PString & name, PBYTEArray & octets)
const;
744 virtual bool SetOptionOctets(
const PString & name,
const PBYTEArray & octets);
745 virtual bool SetOptionOctets(
const PString & name,
const BYTE * data, PINDEX length);
759 PTRACE_PARAM(
const char * operation,)
824 const char * fullName,
827 const char * encodingName,
828 PBoolean needsJitter,
848 const char * rtpEncodingName = NULL,
849 const char * protocol = NULL
866 const char * wildcard
883 const PString & wildcard
897 const char * wildcard
904 const PString & wildcard
909 virtual PObject *
Clone()
const;
913 virtual Comparison
Compare(
const PObject & obj)
const;
919 virtual void PrintOn(ostream & strm)
const;
923 virtual void ReadFrom(istream & strm);
1068 const PString & name,
1079 const PString & name,
1080 const PString & value
1087 const PString & name,
1098 const PString & name,
1106 const PString & name,
1118 const PString & name,
1126 const PString & name,
1137 const PString & name,
1148 template <
typename Enum>
1150 const PString & name,
1163 template <
typename Enum>
1165 const PString & name,
1173 const PString & name,
1174 const PString & dflt = PString::Empty()
1184 const PString & name,
1185 const PString & value
1192 const PString & name,
1203 const PString & name,
1204 const PBYTEArray & octets
1207 const PString & name,
1238 PBoolean overwrite =
false
1250 const PString & name
1257 const PString & name
1258 )
const {
return dynamic_cast<T *
>(
FindOption(name)); }
1273 strm << setw(-1) << *
m_info;
1281 PVideoDevice::OpenArgs & args
1309 PBoolean SetSize(PINDEX) {
return true; }
1326 const char * fullName,
1328 const char * encodingName,
1335 time_t timeStamp = 0
1337 virtual PObject *
Clone()
const;
1349 const char * fullName,
1351 const char * encodingName,
1356 unsigned maxFrames = 256,
1357 unsigned clockRate = 8000,
1358 time_t timeStamp = 0
1372 const char * fullName,
1374 const char * encodingName,
1375 unsigned maxFrameWidth,
1376 unsigned maxFrameHeight,
1377 unsigned maxFrameRate,
1378 unsigned maxBitRate,
1379 time_t timeStamp = 0
1381 virtual PObject *
Clone()
const;
1394 const char * fullName,
1396 const char * encodingName,
1397 unsigned maxFrameWidth,
1398 unsigned maxFrameHeight,
1399 unsigned maxFrameRate,
1400 unsigned maxBitRate,
1401 time_t timeStamp = 0
1434 __inline
static unsigned ContentRoleBit(ContentRole contentRole) {
return contentRole != eNoRole ? (1<<(contentRole-1)) : 0; }
1450 "",
"pli",
"fir",
"tmmbr",
"tstr",
"vcbm"
1508 #endif // OPAL_VIDEO
1512 #if OPAL_T38_CAPABILITY
1518 #define OpalPCM16 GetOpalPCM16()
1519 #define OpalPCM16S GetOpalPCM16S()
1520 #define OpalPCM16_16KHZ GetOpalPCM16_16KHZ()
1521 #define OpalPCM16S_16KHZ GetOpalPCM16S_16KHZ()
1522 #define OpalPCM16_32KHZ GetOpalPCM16_32KHZ()
1523 #define OpalPCM16S_32KHZ GetOpalPCM16S_32KHZ()
1524 #define OpalPCM16_48KHZ GetOpalPCM16_48KHZ()
1525 #define OpalPCM16S_48KHZ GetOpalPCM16S_48KHZ()
1526 #define OpalL16_MONO_8KHZ GetOpalL16_MONO_8KHZ()
1527 #define OpalL16_STEREO_8KHZ GetOpalL16_STEREO_8KHZ()
1528 #define OpalL16_MONO_16KHZ GetOpalL16_MONO_16KHZ()
1529 #define OpalL16_STEREO_16KHZ GetOpalL16_STEREO_16KHZ()
1530 #define OpalL16_MONO_32KHZ GetOpalL16_MONO_32KHZ()
1531 #define OpalL16_STEREO_32KHZ GetOpalL16_STEREO_32KHZ()
1532 #define OpalL16_MONO_48KHZ GetOpalL16_MONO_48KHZ()
1533 #define OpalL16_STEREO_48KHZ GetOpalL16_STEREO_48KHZ()
1534 #define OpalG711_ULAW_64K GetOpalG711_ULAW_64K()
1535 #define OpalG711_ALAW_64K GetOpalG711_ALAW_64K()
1536 #define OpalG722 GetOpalG722()
1537 #define OpalG7221 OpalG7221_32K
1538 #define OpalG7221_24K GetOpalG7221_24K()
1539 #define OpalG7221_32K GetOpalG7221_32K()
1540 #define OpalG7221_48K GetOpalG7221_48K()
1541 #define OpalG7222 GetOpalG7222()
1542 #define OpalG726_40K GetOpalG726_40K()
1543 #define OpalG726_32K GetOpalG726_32K()
1544 #define OpalG726_24K GetOpalG726_24K()
1545 #define OpalG726_16K GetOpalG726_16K()
1546 #define OpalG728 GetOpalG728()
1547 #define OpalG729 GetOpalG729()
1548 #define OpalG729A GetOpalG729A()
1549 #define OpalG729B GetOpalG729B()
1550 #define OpalG729AB GetOpalG729AB()
1551 #define OpalG7231_6k3 GetOpalG7231_6k3()
1552 #define OpalG7231_5k3 GetOpalG7231_5k3()
1553 #define OpalG7231A_6k3 GetOpalG7231A_6k3()
1554 #define OpalG7231A_5k3 GetOpalG7231A_5k3()
1555 #define OpalGSM0610 GetOpalGSM0610()
1556 #define OpalGSMAMR GetOpalGSMAMR()
1557 #define OpaliLBC GetOpaliLBC()
1558 #define OpalRFC2833 GetOpalRFC2833()
1559 #define OpalCiscoNSE GetOpalCiscoNSE()
1560 #define OpalT38 GetOpalT38()
1563 #define OpalH261 GetOpalH261()
1564 #define OpalH263 GetOpalH263()
1565 #define OpalH263plus GetOpalH263plus()
1566 #define OpalH264 GetOpalH264_MODE1()
1567 #define OpalH264_MODE0 GetOpalH264_MODE0()
1568 #define OpalH264_MODE1 GetOpalH264_MODE1()
1569 #define OpalMPEG4 GetOpalMPEG4()
1572 #define OpalL16Mono8kHz OpalL16_MONO_8KHZ
1573 #define OpalL16Mono16kHz OpalL16_MONO_16KHZ
1574 #define OpalG711uLaw OpalG711_ULAW_64K
1575 #define OpalG711ALaw OpalG711_ALAW_64K
1578 #endif // OPAL_OPAL_MEDIAFMT_H