- Timestamp:
- Dec 4, 2013 7:05:35 AM (11 years ago)
- Location:
- pjproject/branches/projects/pjsua2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/build/Makefile
r4631 r4676 64 64 # x x x x x x x x x x x x x x x x x x x x x x x x 65 65 #TARGETS := swig pjsua pjsystest samples 66 TARGETS := swig samples66 TARGETS := swig pjsua pjsystest samples 67 67 68 68 .PHONY: $(TARGETS) -
pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/media.hpp
r4672 r4676 473 473 * created, it is possible that the function returns -1 as device IDs. 474 474 * 475 * @return Device ID of the capture device.475 * @return Device ID of the capture device. 476 476 */ 477 477 int getCaptureDev() const throw(Error); 478 479 /** 480 * Get the AudioMedia of the capture audio device. 481 * 482 * @return Audio media for the capture device. 483 */ 484 AudioMedia &getCaptureDevMedia() throw(Error); 478 485 479 486 /** … … 481 488 * been created, it is possible that the function returns -1 as device IDs. 482 489 * 483 * @return Device ID of the playback device.490 * @return Device ID of the playback device. 484 491 */ 485 492 int getPlaybackDev() const throw(Error); 493 494 /** 495 * Get the AudioMedia of the speaker/playback audio device. 496 * 497 * @return Audio media for the speaker/playback device. 498 */ 499 AudioMedia &getPlaybackDevMedia() throw(Error); 486 500 487 501 /** … … 504 518 * Enum all audio devices installed in the system. 505 519 * 506 * @return The list of audio device info.520 * @return The list of audio device info. 507 521 */ 508 522 const AudioDevInfoVector &enumDev() throw(Error); … … 520 534 * application connect the bridge to it's own sound device/master port. 521 535 * 522 * @return The port interface of the conference bridge,523 * so that application can connect this to it's own524 * sound device or master port.536 * @return The port interface of the conference bridge, 537 * so that application can connect this to it's 538 * own sound device or master port. 525 539 */ 526 540 MediaPort *setNoDev(); … … 555 569 * Get current echo canceller tail length. 556 570 * 557 * @return The EC tail length in milliseconds,558 * If AEC is disabled, the value will be zero.571 * @return The EC tail length in milliseconds, 572 * If AEC is disabled, the value will be zero. 559 573 */ 560 574 unsigned getEcTail() const throw(Error); … … 582 596 * Get the number of sound devices installed in the system. 583 597 * 584 * @return The number of sound devices installed in the system. 598 * @return The number of sound devices installed in the 599 * system. 585 600 * 586 601 */ … … 600 615 * Lookup device index based on the driver and device name. 601 616 * 602 * @param drv_name The driver name. 603 * @param dev_name The device name. 604 * 605 * @return The device ID. If the device is not found, Error will be 606 * thrown. 607 * 617 * @param drv_name The driver name. 618 * @param dev_name The device name. 619 * 620 * @return The device ID. If the device is not found, 621 * Error will be thrown. 608 622 */ 609 623 int lookupDev(const string &drv_name, … … 633 647 * used. 634 648 * 635 * @param format The audio format.636 * @param keep Specify whether the setting is to be kept for637 * future use.649 * @param format The audio format. 650 * @param keep Specify whether the setting is to be kept for 651 * future use. 638 652 * 639 653 */ … … 653 667 * otherwise Error will be thrown. 654 668 * 655 * @return The audio format.669 * @return The audio format. 656 670 * 657 671 */ … … 672 686 * used. 673 687 * 674 * @param latency_msec The input latency. 675 * @param keep Specify whether the setting is to be kept 676 * for future use. 677 * 688 * @param latency_msec The input latency. 689 * @param keep Specify whether the setting is to be kept 690 * for future use. 678 691 */ 679 692 void … … 692 705 * otherwise Error will be thrown. 693 706 * 694 * @return The audio input latency.707 * @return The audio input latency. 695 708 * 696 709 */ … … 731 744 * otherwise Error will be thrown. 732 745 * 733 * @return The audio output latency.746 * @return The audio output latency. 734 747 * 735 748 */ … … 751 764 * used. 752 765 * 753 * @param volume The input volume level, in percent.754 * @param keep Specify whether the setting is to be kept for future755 * use.766 * @param volume The input volume level, in percent. 767 * @param keep Specify whether the setting is to be kept for 768 * future use. 756 769 * 757 770 */ … … 770 783 * flags, otherwise Error will be thrown. * 771 784 772 * @return The audio input volume level, in percent.785 * @return The audio input volume level, in percent. 773 786 * 774 787 */ … … 789 802 * used. 790 803 * 791 * @param volume The output volume level, in percent.792 * @param keep Specify whether the setting is to be kept793 * for future use.804 * @param volume The output volume level, in percent. 805 * @param keep Specify whether the setting is to be kept 806 * for future use. 794 807 * 795 808 */ … … 808 821 * flags, otherwise Error will be thrown. 809 822 * 810 * @return The audio output volume level, in percent.823 * @return The audio output volume level, in percent. 811 824 * 812 825 */ … … 825 838 * flags, otherwise Error will be thrown. 826 839 * 827 * @return The audio input signal level, in percent.840 * @return The audio input signal level, in percent. 828 841 * 829 842 */ … … 842 855 * flags, otherwise Error will be thrown. 843 856 * 844 * @return The audio output signal level, in percent.857 * @return The audio output signal level, in percent. 845 858 * 846 859 */ … … 861 874 * used. 862 875 * 863 * @param route The audio input route.864 * @param keep Specify whether the setting is to be kept865 * for future use.876 * @param route The audio input route. 877 * @param keep Specify whether the setting is to be kept 878 * for future use. 866 879 * 867 880 */ … … 881 894 * flags, otherwise Error will be thrown. 882 895 * 883 * @return The audio input route.896 * @return The audio input route. 884 897 * 885 898 */ … … 900 913 * used. 901 914 * 902 * @param route The audio output route.903 * @param keep Specify whether the setting is to be kept904 * for future use.915 * @param route The audio output route. 916 * @param keep Specify whether the setting is to be kept 917 * for future use. 905 918 * 906 919 */ … … 920 933 * flags, otherwise Error will be thrown. 921 934 * 922 * @return The audio output route.935 * @return The audio output route. 923 936 * 924 937 */ … … 957 970 * capability in AudioDevInfo.caps flags, otherwise Error will be thrown. 958 971 * 959 * @return The audio voice activity detection feature.972 * @return The audio voice activity detection feature. 960 973 * 961 974 */ … … 994 1007 * capability in AudioDevInfo.caps flags, otherwise Error will be thrown. 995 1008 * 996 * @return The audio comfort noise generation feature.1009 * @return The audio comfort noise generation feature. 997 1010 * 998 1011 */ … … 1031 1044 * capability in AudioDevInfo.caps flags, otherwise Error will be thrown. 1032 1045 * 1033 * @return The audio packet loss concealment feature.1046 * @return The audio packet loss concealment feature. 1034 1047 * 1035 1048 */ … … 1038 1051 private: 1039 1052 AudioDevInfoVector audioDevList; 1053 AudioMedia *devMedia; 1040 1054 1041 1055 /** -
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/media.cpp
r4672 r4676 356 356 extFmt.clear(); 357 357 } 358 359 /////////////////////////////////////////////////////////////////////////////// 360 /* 361 * Simple AudioMedia class for sound device. 362 */ 363 class DevAudioMedia : public AudioMedia 364 { 365 public: 366 DevAudioMedia(); 367 }; 368 369 DevAudioMedia::DevAudioMedia() 370 { 371 this->id = 0; 372 registerMediaPort(NULL); 373 } 374 358 375 /////////////////////////////////////////////////////////////////////////////// 359 376 /* Audio device operations. */ 360 377 378 AudDevManager::AudDevManager() 379 { 380 devMedia = new DevAudioMedia; 381 } 382 383 AudDevManager::~AudDevManager() 384 { 385 delete devMedia; 386 clearAudioDevList(); 387 } 388 361 389 int AudDevManager::getCaptureDev() const throw(Error) 362 390 { … … 364 392 } 365 393 394 AudioMedia &AudDevManager::getCaptureDevMedia() throw(Error) 395 { 396 return *devMedia; 397 } 398 366 399 int AudDevManager::getPlaybackDev() const throw(Error) 367 400 { 368 401 return getActiveDev(false); 402 } 403 404 AudioMedia &AudDevManager::getPlaybackDevMedia() throw(Error) 405 { 406 return *devMedia; 369 407 } 370 408 … … 682 720 } 683 721 684 AudDevManager::AudDevManager()685 {686 687 688 }689 690 AudDevManager::~AudDevManager()691 {692 clearAudioDevList();693 }694 695 722 void AudDevManager::clearAudioDevList() 696 723 {
Note: See TracChangeset
for help on using the changeset viewer.