|
HOME
SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port
FAQ
Documentation
Licensing
Download
Development (Trac)
Projects using pjsip
Mailing List
Open Source Links
About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono <bennylp pjsip.org>
|
|
Home --> Documentations --> PJMEDIA Reference
Media capture to fixed size memory buffer.
More...
Functions |
| pj_status_t | pjmedia_mem_capture_create (pj_pool_t *pool, void *buffer, pj_size_t size, unsigned clock_rate, unsigned channel_count, unsigned samples_per_frame, unsigned bits_per_sample, unsigned options, pjmedia_port **p_port) |
| pj_status_t | pjmedia_mem_capture_set_eof_cb (pjmedia_port *port, void *user_data, pj_status_t(*cb)(pjmedia_port *port, void *usr_data)) |
| pj_size_t | pjmedia_mem_capture_get_size (pjmedia_port *port) |
Detailed Description
A memory based capture is used to save media streams to a fixed size buffer. This is useful over File Writer (Recorder) for situation where filesystems are not available in the target system.
Function Documentation
| pj_status_t pjmedia_mem_capture_create |
( |
pj_pool_t * |
pool, |
|
|
void * |
buffer, |
|
|
pj_size_t |
size, |
|
|
unsigned |
clock_rate, |
|
|
unsigned |
channel_count, |
|
|
unsigned |
samples_per_frame, |
|
|
unsigned |
bits_per_sample, |
|
|
unsigned |
options, |
|
|
pjmedia_port ** |
p_port | |
|
) |
| | |
Create media port to capture/record media into a fixed size buffer.
- Parameters:
-
| pool | Pool to allocate memory for the port structure. |
| buffer | The buffer to record the media to, which should be available throughout the life time of the port. |
| size | The maximum size of the buffer, in bytes. |
| clock_rate | Sampling rate. |
| channel_count | Number of channels. |
| samples_per_frame | Number of samples per frame. |
| bits_per_sample | Number of bits per sample. |
| options | Option flags. |
| p_port | Pointer to receive the port instance. |
- Returns:
- PJ_SUCCESS on success, or the appropriate error code.
Register a callback to be called when no space left in the buffer. Note that when a callback is registered, this callback will also be called when application destroys the port and the callback has not been called before.
- Parameters:
-
| port | The memory recorder port. |
| user_data | User data to be specified in the callback |
| cb | Callback to be called. If the callback returns non- PJ_SUCCESS, the recording will stop. In other cases recording will be restarted and the rest of the frame will be stored starting from the beginning of the buffer. Note that if application destroys the capture port in the callback, it must return non-PJ_SUCCESS here. |
- Returns:
- PJ_SUCCESS on success.
Return the current size of the recorded data in the buffer.
- Parameters:
-
| port | The memory recorder port. |
- Returns:
- The size of buffer data..
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|
|