|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Detailed DescriptionA master port has two media ports connected to it, and by convention thay are called downstream and upstream ports. The media stream flowing to the downstream port is called encoding or send direction, and media stream flowing to the upstream port is called decoding or receive direction (imagine the downstream as stream to remote endpoint, and upstream as local media port; media flowing to remote endpoint (downstream) will need to be encoded before it is transmitted to remote endpoint). A master port internally has an instance of Clock Generator, which provides the essensial timing for the master port. The Clock Generator runs asynchronously, and whenever a clock tick expires, a callback will be called, and the master port performs the following tasks:
Because master port enables media stream to flow automatically, it is said that the master port supplies Clock/Timing to the media ports interconnection. Typedef Documentation
Opaque declaration for master port. Function Documentation
Create a master port.
Start the media flow.
Stop the media flow.
Poll the master port clock and execute the callback when the clock tick has elapsed. This operation is only valid if the master port is created with PJMEDIA_CLOCK_NO_ASYNC flag.
Change the upstream port. Note that application is responsible to destroy current upstream port (the one that is going to be replaced with the new port).
Get the upstream port.
Change the downstream port. Note that application is responsible to destroy current downstream port (the one that is going to be replaced with the new port).
Get the downstream port.
Destroy the master port, and optionally destroy the upstream and downstream ports.
Copyright (C) 2006-2008 Teluu Inc.
| |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||