Home --> Documentations --> PJMEDIA Reference
Audio and video converter utilities.
More...
|
pj_status_t | pjmedia_converter_mgr_create (pj_pool_t *pool, pjmedia_converter_mgr **mgr) |
|
pjmedia_converter_mgr * | pjmedia_converter_mgr_instance (void) |
|
void | pjmedia_converter_mgr_set_instance (pjmedia_converter_mgr *mgr) |
|
void | pjmedia_converter_mgr_destroy (pjmedia_converter_mgr *mgr) |
|
pj_status_t | pjmedia_converter_mgr_register_factory (pjmedia_converter_mgr *mgr, pjmedia_converter_factory *f) |
|
pj_status_t | pjmedia_converter_mgr_unregister_factory (pjmedia_converter_mgr *mgr, pjmedia_converter_factory *f, pj_bool_t call_destroy) |
|
pj_status_t | pjmedia_converter_create (pjmedia_converter_mgr *mgr, pj_pool_t *pool, pjmedia_conversion_param *param, pjmedia_converter **p_cv) |
|
pj_status_t | pjmedia_converter_convert (pjmedia_converter *cv, pjmedia_frame *src_frame, pjmedia_frame *dst_frame) |
|
pj_status_t | pjmedia_converter_convert2 (pjmedia_converter *cv, pjmedia_frame *src_frame, const pjmedia_rect_size *src_frame_size, const pjmedia_coord *src_pos, pjmedia_frame *dst_frame, const pjmedia_rect_size *dst_frame_size, const pjmedia_coord *dst_pos, pjmedia_converter_convert_setting *param) |
|
void | pjmedia_converter_destroy (pjmedia_converter *cv) |
|
◆ pjmedia_converter_convert_setting
◆ pjmedia_converter_mgr
Opaque data type for conversion manager. Typically, the conversion manager is a singleton instance, although application may instantiate more than one instances of this if required.
◆ pjmedia_converter_priority_guide
Converter priority guides. Converter priority determines which converter instance to be used if more than one converters are able to perform the requested conversion. Converter implementor can use this value to order the preference based on attributes such as quality or performance. Higher number indicates higher priority.
Enumerator |
---|
PJMEDIA_CONVERTER_PRIORITY_LOWEST | Lowest priority.
|
PJMEDIA_CONVERTER_PRIORITY_NORMAL | Normal priority.
|
PJMEDIA_CONVERTER_PRIORITY_HIGHEST | Highest priority.
|
◆ pjmedia_converter_mgr_create()
Create a new conversion manager instance. This will also set the pointer to the singleton instance if the value is still NULL.
- Parameters
-
pool | Pool to allocate memory from. |
mgr | Pointer to hold the created instance of the conversion manager. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_converter_mgr_instance()
Get the singleton instance of the conversion manager.
- Returns
- The instance.
◆ pjmedia_converter_mgr_set_instance()
Manually assign a specific video manager instance as the singleton instance. Normally this is not needed if only one instance is ever going to be created, as the library automatically assign the singleton instance.
- Parameters
-
mgr | The instance to be used as the singleton instance. Application may specify NULL to clear the singleton singleton instance. |
◆ pjmedia_converter_mgr_destroy()
Destroy a converter manager. If the manager happens to be the singleton instance, the singleton instance will be set to NULL.
- Parameters
-
mgr | The converter manager. Specify NULL to use the singleton instance. |
◆ pjmedia_converter_mgr_register_factory()
Register a converter factory to the converter manager.
- Parameters
-
mgr | The converter manager. Specify NULL to use the singleton instance. |
f | The converter factory to be registered. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_converter_mgr_unregister_factory()
Unregister a previously registered converter factory from the converter manager.
- Parameters
-
mgr | The converter manager. Specify NULL to use the singleton instance. |
f | The converter factory to be unregistered. |
call_destroy | If this is set to non-zero, the destroy_factory() callback of the factory will be called while unregistering the factory from the manager. |
- Returns
- PJ_SUCCESS on success or the appropriate error code.
◆ pjmedia_converter_create()
Create a converter instance to perform the specified format conversion as specified in param.
- Parameters
-
mgr | The converter manager. Specify NULL to use the singleton instance. |
pool | Pool to allocate the memory from. |
param | Conversion parameter. |
p_cv | Pointer to hold the created converter. |
- Returns
- PJ_SUCCESS if a converter has been created successfully or the appropriate error code.
◆ pjmedia_converter_convert()
Convert the buffer in the source frame and save the result in the buffer of the destination frame, according to conversion format that was specified when the converter was created.
- Parameters
-
cv | The converter instance. |
src_frame | The source frame. |
dst_frame | The destination frame. |
- Returns
- PJ_SUCCESS if conversion has been performed successfully.
◆ pjmedia_converter_convert2()
Convert a region in the buffer of the source frame and put the result into a region in the buffer of the destination frame, according to conversion format that was specified when the converter was created.
- Parameters
-
cv | The converter instance. |
src_frame | The source frame. |
src_frame_size | The source frame size. |
src_pos | The source region position. |
dst_frame | The destination frame. |
dst_frame_size | The destination frame size. |
dst_pos | The destination region position. |
param | This is unused for now and must be NULL. |
- Returns
- PJ_SUCCESS if conversion has been performed successfully.
◆ pjmedia_converter_destroy()
Destroy the converter.
- Parameters
-
cv | The converter instance. |
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|