Home --> Documentations --> PJMEDIA Reference
Video media port.
More...
◆ pjmedia_vid_port
Opaque data type for video port.
◆ pjmedia_vid_port_param_default()
Initialize the parameter with the default values. Note that this typically would only fill the structure to zeroes unless they have different default values.
- Parameters
-
◆ pjmedia_vid_port_create()
Create a video port with the specified parameter. When video port opens the video stream with different parameter than the requested values in the prm.vidparam argument, it will automatically do the necessary conversion.
- Parameters
-
pool | Pool to allocate memory from. |
prm | The video port parameter. |
p_vp | Pointer to receive the result. |
- Returns
- PJ_SUCCESS if video port has been created successfully, or the appropriate error code.
◆ pjmedia_vid_port_set_cb()
Set the callbacks of the video port's underlying video stream.
- Parameters
-
vid_port | The video port. |
cb | Pointer to structure containing video stream callbacks. |
user_data | Arbitrary user data, which will be given back in the callbacks. |
◆ pjmedia_vid_port_get_stream()
Return the underlying video stream of the video port.
- Parameters
-
- Returns
- The video stream.
◆ pjmedia_vid_port_get_passive_port()
Return the (passive) media port of the video port. This operation is only valid for video ports created with passive interface selected. Retrieving the media port for active video ports may raise an assertion.
- Parameters
-
- Returns
- The media port instance, or NULL.
◆ pjmedia_vid_port_get_clock_src()
Get a clock source from the video port.
- Parameters
-
- Returns
- The clock source.
◆ pjmedia_vid_port_set_clock_src()
Set a clock source for the video port.
- Parameters
-
vid_port | The video port. |
clocksrc | The clock source. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_subscribe_event()
Subscribe media event notifications from the specified media port. Sample use case is that renderer video port needs to monitor stream port events so renderer can adjust its param whenever stream port detects format change.
- Parameters
-
vid_port | The video port. |
port | The media port whose events to be monitored. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_unsubscribe_event()
Unsubscribe media event notifications from the specified media port.
- Parameters
-
vid_port | The video port. |
port | The media port whose events to be unsubscribed. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_connect()
Connect the video port to a downstream (slave) media port. This operation is only valid for video ports created with active interface selected. Connecting a passive video port may raise an assertion.
- Parameters
-
vid_port | The video port. |
port | A downstream media port to be connected to this video port. |
destroy | Specify if the downstream media port should also be destroyed by this video port when the video port is destroyed. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_disconnect()
Disconnect the video port from its downstream (slave) media port, if any. This operation is only valid for video ports created with active interface selected, and assertion may be triggered if this is invoked on a passive video port.
- Parameters
-
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_get_connected_port()
Retrieve the media port currently connected as downstream media port of the specified video port. This operation is only valid for video ports created with active interface selected, and assertion may be triggered if this is invoked on a passive video port.
- Parameters
-
- Returns
- Media port currently connected to the video port, if any.
◆ pjmedia_vid_port_start()
Start the video port.
- Parameters
-
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_is_running()
Query whether the video port has been started.
- Parameters
-
- Returns
- PJ_TRUE if the video port has been started.
◆ pjmedia_vid_port_stop()
Stop the video port.
- Parameters
-
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_vid_port_destroy()
Destroy the video port, along with its video stream. If the video port is an active one, this may also destroy the downstream media port, if the destroy flag is set when the media port is connected.
- Parameters
-
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|