Changeset 5969 for pjproject/trunk/pjsip/include/pjsua2/media.hpp
- Timestamp:
- Apr 15, 2019 10:52:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r5956 r5969 214 214 215 215 /** 216 * Audio Media. 216 * Audio Media. This is a lite wrapper class for audio conference bridge port, 217 * i.e: this class only maintains one data member, conference slot ID, and 218 * the methods are simply proxies for conference bridge operations. 219 * 220 * Application can create a derived class and use registerMediaPort2()/ 221 * unregisterMediaPort() to register/unregister a media port to/from the 222 * conference bridge. 223 * 224 * The library will not keep a list of AudioMedia instances, so any 225 * AudioMedia (descendant) instances instantiated by application must be 226 * maintained and destroyed by the application itself. 227 * 228 * Note that any PJSUA2 APIs that return AudioMedia instance(s) such as 229 * Endpoint::mediaEnumPorts2() or Call::getAudioMedia() will just return 230 * generated copy. All AudioMedia methods should work normally on this 231 * generated copy instance. 217 232 */ 218 233 class AudioMedia : public Media … … 321 336 322 337 /** 338 * Warning: deprecated and will be removed in future release. 339 * 323 340 * Typecast from base class Media. This is useful for application written 324 341 * in language that does not support downcasting such as Python. … … 331 348 332 349 /** 333 * Virtual Destructor 350 * Default Constructor. Normally application will not create AudioMedia 351 * object directly, but it may instantiate an AudioMedia derived class. 352 */ 353 AudioMedia(); 354 355 /** 356 * Virtual Destructor. 334 357 */ 335 358 virtual ~AudioMedia(); … … 343 366 protected: 344 367 /** 345 * Default Constructor. 346 */ 347 AudioMedia(); 348 349 /** 368 * Warning: deprecated and will be removed in future release, use 369 * registerMediaPort2() instead. 370 * 350 371 * This method needs to be called by descendants of this class to register 351 372 * the media port created to the conference bridge and Endpoint's 352 373 * media list. 353 374 * 354 * param port the media port to be registered to the conference bridge.375 * param port The media port to be registered to the conference bridge. 355 376 * 356 377 */ 357 378 void registerMediaPort(MediaPort port) throw(Error); 379 380 /** 381 * This method needs to be called by descendants of this class to register 382 * the media port created to the conference bridge and Endpoint's 383 * media list. 384 * 385 * param port The media port to be registered to the conference bridge. 386 * param pool The memory pool. 387 * 388 */ 389 void registerMediaPort2(MediaPort port, pj_pool_t *pool) throw(Error); 358 390 359 391 /** … … 366 398 367 399 private: 400 /* Memory pool for deprecated registerMediaPort() */ 368 401 pj_caching_pool mediaCachingPool; 369 402 pj_pool_t *mediaPool; 370 }; 403 404 friend class Endpoint; 405 }; 406 407 /** 408 * Warning: deprecated, use AudioMediaVector2 instead. 409 * 410 * Array of Audio Media. 411 */ 412 typedef std::vector<AudioMedia*> AudioMediaVector; 413 371 414 372 415 /** Array of Audio Media */ 373 typedef std::vector<AudioMedia *> AudioMediaVector;416 typedef std::vector<AudioMedia> AudioMediaVector2; 374 417 375 418 /** … … 465 508 466 509 /** 510 * Warning: deprecated and will be removed in future release. 511 * 467 512 * Typecast from base class AudioMedia. This is useful for application 468 513 * written in language that does not support downcasting such as Python. … … 475 520 476 521 /** 477 * Destructor. 522 * Destructor. This will unregister the player port from the conference 523 * bridge. 478 524 */ 479 525 virtual ~AudioMediaPlayer(); … … 546 592 void createRecorder(const string &file_name, 547 593 unsigned enc_type=0, 548 pj_ssize_tmax_size=0,594 long max_size=0, 549 595 unsigned options=0) throw(Error); 550 596 551 597 /** 598 * Warning: deprecated and will be removed in future release. 599 * 552 600 * Typecast from base class AudioMedia. This is useful for application 553 601 * written in language that does not support downcasting such as Python. … … 560 608 561 609 /** 562 * Destructor. 610 * Destructor. This will unregister the recorder port from the conference 611 * bridge. 563 612 */ 564 613 virtual ~AudioMediaRecorder(); … … 635 684 636 685 /** 637 * Destructor. 686 * Destructor. This will unregister the tone generator port from the 687 * conference bridge. 638 688 */ 639 689 ~ToneGenerator(); 640 690 641 691 /** 642 * Create tone generator .692 * Create tone generator and register the port to the conference bridge. 643 693 */ 644 694 void createToneGenerator(unsigned clock_rate = 16000, … … 776 826 }; 777 827 828 /** 829 * Warning: deprecated, use AudioDevInfoVector2 instead. 830 * 831 * Array of audio device info. 832 */ 833 typedef std::vector<AudioDevInfo*> AudioDevInfoVector; 834 778 835 /** Array of audio device info */ 779 typedef std::vector<AudioDevInfo *> AudioDevInfoVector;836 typedef std::vector<AudioDevInfo> AudioDevInfoVector2; 780 837 781 838 /** … … 836 893 837 894 /** 895 * Warning: deprecated, use enumDev2 instead. This function is not 896 * safe in multithreaded environment. 897 * 898 * Enum all audio devices installed in the system. This function is not 899 * safe in multithreaded environment. 900 * 901 * @return The list of audio device info. 902 */ 903 const AudioDevInfoVector &enumDev() throw(Error); 904 905 /** 838 906 * Enum all audio devices installed in the system. 839 907 * 840 908 * @return The list of audio device info. 841 909 */ 842 const AudioDevInfoVector &enumDev()throw(Error);910 AudioDevInfoVector2 enumDev2() const throw(Error); 843 911 844 912 /** … … 1417 1485 public: 1418 1486 /** 1419 * Constructor 1487 * Constructor. 1420 1488 * 1421 1489 * @param playdev Playback device ID. … … 1425 1493 1426 1494 /** 1427 * Destructor 1495 * Destructor. 1428 1496 */ 1429 1497 virtual ~ExtraAudioDevice(); … … 1432 1500 * Open the audio device using format (e.g.: clock rate, bit per sample, 1433 1501 * samples per frame) matched to the conference bridge's format, except 1434 * the channel count, which will be set to one (mono channel). 1502 * the channel count, which will be set to one (mono channel). This will 1503 * also register the audio device port to conference bridge. 1435 1504 */ 1436 1505 void open(); 1437 1506 1438 1507 /** 1439 * Close the audio device. 1508 * Close the audio device and unregister the audio device port from the 1509 * conference bridge. 1440 1510 */ 1441 1511 void close(); … … 1766 1836 }; 1767 1837 1838 /** 1839 * Warning: deprecated, use VideoDevInfoVector2 instead. 1840 * 1841 * Array of video device info. 1842 */ 1843 typedef std::vector<VideoDevInfo*> VideoDevInfoVector; 1844 1768 1845 /** Array of video device info */ 1769 typedef std::vector<VideoDevInfo *> VideoDevInfoVector;1846 typedef std::vector<VideoDevInfo> VideoDevInfoVector2; 1770 1847 1771 1848 /** … … 1813 1890 1814 1891 /** 1892 * Warning: deprecated, use enumDev2() instead. This function is not 1893 * safe in multithreaded environment. 1894 * 1815 1895 * Enum all video devices installed in the system. 1816 1896 * … … 1818 1898 */ 1819 1899 const VideoDevInfoVector &enumDev() throw(Error); 1900 1901 /** 1902 * Enum all video devices installed in the system. 1903 * 1904 * @return The list of video device info 1905 */ 1906 VideoDevInfoVector2 enumDev2() const throw(Error); 1820 1907 1821 1908 /** … … 2056 2143 }; 2057 2144 2145 /** 2146 * Warning: deprecated, use CodecInfoVector2 instead. 2147 * 2148 * Array of codec info. 2149 */ 2150 typedef std::vector<CodecInfo*> CodecInfoVector; 2151 2058 2152 /** Array of codec info */ 2059 typedef std::vector<CodecInfo *> CodecInfoVector;2153 typedef std::vector<CodecInfo> CodecInfoVector2; 2060 2154 2061 2155 /**
Note: See TracChangeset
for help on using the changeset viewer.