Changeset 5972 for pjproject/trunk/pjsip/include/pjsua2/media.hpp
- Timestamp:
- Apr 23, 2019 10:49:56 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r5969 r5972 149 149 /** 150 150 * Array of listeners (in other words, ports where this port is 151 * transmitting to .151 * transmitting to). 152 152 */ 153 153 IntVector listeners; … … 196 196 }; 197 197 198 /** 199 * Parameters for AudioMedia::startTransmit2() method. 200 */ 198 201 struct AudioMediaTransmitParam 199 202 { … … 348 351 349 352 /** 350 * Default Constructor. Normally application will not create AudioMedia 351 * object directly, but it may instantiate an AudioMedia derived class. 353 * Default Constructor. 354 * 355 * Normally application will not create AudioMedia object directly, 356 * but it instantiates an AudioMedia derived class. This is set as public 357 * because some STL vector implementations require it. 352 358 */ 353 359 AudioMedia(); … … 401 407 pj_caching_pool mediaCachingPool; 402 408 pj_pool_t *mediaPool; 403 404 friend class Endpoint;405 409 }; 406 410 … … 1547 1551 }; 1548 1552 1553 1554 /** 1555 * This structure descibes information about a particular media port that 1556 * has been registered into the conference bridge. 1557 */ 1558 struct VidConfPortInfo 1559 { 1560 /** 1561 * Conference port number. 1562 */ 1563 int portId; 1564 1565 /** 1566 * Port name. 1567 */ 1568 string name; 1569 1570 /** 1571 * Media audio format information 1572 */ 1573 MediaFormatVideo format; 1574 1575 /** 1576 * Array of listeners (in other words, ports where this port is 1577 * transmitting to). 1578 */ 1579 IntVector listeners; 1580 1581 /** 1582 * Array of listeners (in other words, ports where this port is 1583 * listening to). 1584 */ 1585 IntVector transmitters; 1586 1587 public: 1588 /** 1589 * Construct from pjsua_conf_port_info. 1590 */ 1591 void fromPj(const pjsua_vid_conf_port_info &port_info); 1592 }; 1593 1594 /** 1595 * Parameters for VideoMedia::startTransmit() method. 1596 */ 1597 struct VideoMediaTransmitParam 1598 { 1599 }; 1600 1601 /** 1602 * Video Media. 1603 */ 1604 class VideoMedia : public Media 1605 { 1606 public: 1607 /** 1608 * Get information about the specified conference port. 1609 */ 1610 VidConfPortInfo getPortInfo() const throw(Error); 1611 1612 /** 1613 * Get port Id. 1614 */ 1615 int getPortId() const; 1616 1617 /** 1618 * Get information from specific port id. 1619 */ 1620 static VidConfPortInfo getPortInfoFromId(int port_id) throw(Error); 1621 1622 /** 1623 * Establish unidirectional media flow to sink. This media port 1624 * will act as a source, and it may transmit to multiple destinations/sink. 1625 * And if multiple sources are transmitting to the same sink, the media 1626 * will be mixed together. Source and sink may refer to the same Media, 1627 * effectively looping the media. 1628 * 1629 * If bidirectional media flow is desired, application needs to call 1630 * this method twice, with the second one called from the opposite source 1631 * media. 1632 * 1633 * @param sink The destination Media. 1634 * @param param The parameter. 1635 */ 1636 void startTransmit(const VideoMedia &sink, 1637 const VideoMediaTransmitParam ¶m) const 1638 throw(Error); 1639 1640 /** 1641 * Stop media flow to destination/sink port. 1642 * 1643 * @param sink The destination media. 1644 * 1645 */ 1646 void stopTransmit(const VideoMedia &sink) const throw(Error); 1647 1648 /** 1649 * Default Constructor. 1650 * 1651 * Normally application will not create VideoMedia object directly, 1652 * but it instantiates a VideoMedia derived class. This is set as public 1653 * because some STL vector implementations require it. 1654 */ 1655 VideoMedia(); 1656 1657 /** 1658 * Virtual Destructor 1659 */ 1660 virtual ~VideoMedia(); 1661 1662 protected: 1663 /** 1664 * Conference port Id. 1665 */ 1666 int id; 1667 1668 protected: 1669 /** 1670 * This method needs to be called by descendants of this class to register 1671 * the media port created to the conference bridge and Endpoint's 1672 * media list. 1673 * 1674 * param port The media port to be registered to the conference bridge. 1675 * param pool The memory pool. 1676 */ 1677 void registerMediaPort(MediaPort port, pj_pool_t *pool) throw(Error); 1678 1679 /** 1680 * This method needs to be called by descendants of this class to remove 1681 * the media port from the conference bridge and Endpoint's media list. 1682 * Descendant should only call this method if it has registered the media 1683 * with the previous call to registerMediaPort(). 1684 */ 1685 void unregisterMediaPort(); 1686 }; 1687 1688 /** Array of Video Media */ 1689 typedef std::vector<VideoMedia> VideoMediaVector; 1690 1691 1549 1692 /** 1550 1693 * Window handle. … … 1628 1771 */ 1629 1772 VideoWindowInfo getInfo() const throw(Error); 1773 1774 /** 1775 * Get video media or conference bridge port of the renderer of 1776 * this video window. 1777 * 1778 * @return Video media of this renderer window. 1779 */ 1780 VideoMedia getVideoMedia() throw(Error); 1630 1781 1631 1782 /** … … 1781 1932 */ 1782 1933 VideoWindow getVideoWindow(); 1934 1935 /** 1936 * Get video media or conference bridge port of the video capture device. 1937 * 1938 * @return Video media of the video capture device. 1939 */ 1940 VideoMedia getVideoMedia() throw(Error); 1783 1941 1784 1942 private:
Note: See TracChangeset
for help on using the changeset viewer.