Changeset 5123 for pjproject/trunk/pjsip/include/pjsua2/media.hpp
- Timestamp:
- Jul 1, 2015 2:20:12 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r5102 r5123 90 90 struct MediaFormatVideo : public MediaFormat 91 91 { 92 unsigned width; /**< Video width. */93 unsigned height; /**< Video height. 92 unsigned width; /**< Video width. */ 93 unsigned height; /**< Video height. */ 94 94 int fpsNum; /**< Frames per second numerator. */ 95 95 int fpsDenum; /**< Frames per second denumerator. */ 96 96 pj_uint32_t avgBps; /**< Average bitrate. */ 97 97 pj_uint32_t maxBps; /**< Maximum bitrate. */ 98 99 /** 100 * Construct from pjmedia_format. 101 */ 102 void fromPj(const pjmedia_format &format); 103 104 /** 105 * Export to pjmedia_format. 106 */ 107 pjmedia_format toPj() const; 98 108 }; 99 109 … … 1588 1598 }; 1589 1599 1600 /** 1601 * Video device information structure. 1602 */ 1603 struct VideoDevInfo 1604 { 1605 /** 1606 * The device name 1607 */ 1608 string name; 1609 1610 /** 1611 * The underlying driver name 1612 */ 1613 string driver; 1614 1615 /** 1616 * The supported direction of the video device, i.e. whether it supports 1617 * capture only, render only, or both. 1618 */ 1619 pjmedia_dir dir; 1620 1621 /** 1622 * Device capabilities, as bitmask combination of #pjmedia_vid_dev_cap 1623 */ 1624 unsigned caps; 1625 1626 /** 1627 * Array of supported video formats. Some fields in each supported video 1628 * format may be set to zero or of "unknown" value, to indicate that the 1629 * value is unknown or should be ignored. When these value are not set 1630 * to zero, it indicates that the exact format combination is being used. 1631 */ 1632 MediaFormatVector fmt; 1633 1634 /** 1635 * Construct from pjmedia_vid_dev_info. 1636 */ 1637 void fromPj(const pjmedia_vid_dev_info &dev_info); 1638 1639 /** 1640 * Destructor. 1641 */ 1642 ~VideoDevInfo(); 1643 }; 1644 1645 /** Array of video device info */ 1646 typedef std::vector<VideoDevInfo*> VideoDevInfoVector; 1647 1648 /** 1649 * Video device manager. 1650 */ 1651 class VidDevManager { 1652 public: 1653 /** 1654 * Get the number of video devices installed in the system. 1655 * 1656 * @return The number of devices. 1657 */ 1658 unsigned getDevCount(); 1659 1660 /** 1661 * Retrieve the video device info for the specified device index. 1662 * 1663 * @param dev_id The video device id 1664 * 1665 * @return The list of video device info 1666 */ 1667 VideoDevInfo getDevInfo(int dev_id) const throw(Error); 1668 1669 /** 1670 * Enum all video devices installed in the system. 1671 * 1672 * @return The list of video device info 1673 */ 1674 const VideoDevInfoVector &enumDev() throw(Error); 1675 1676 private: 1677 VideoDevInfoVector videoDevList; 1678 1679 void clearVideoDevList(); 1680 1681 /** 1682 * Constructor. 1683 */ 1684 VidDevManager(); 1685 1686 /** 1687 * Destructor. 1688 */ 1689 ~VidDevManager(); 1690 1691 friend class Endpoint; 1692 }; 1693 1694 1590 1695 /************************************************************************* 1591 1696 * Codec management
Note: See TracChangeset
for help on using the changeset viewer.