diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-05-28 14:51:21 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-05-28 14:51:21 +0000 |
commit | 954805cf0f35e7c1ac6c10392ed777f6cf1848a8 (patch) | |
tree | 277ca6738ee567d13921054132d61ef8b8ce1dee /pjmedia/include | |
parent | 4762f7d1cb7e8523e94f897ebb8ddda244fcd9be (diff) |
Added set_pos() to WAV player
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@480 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/wav_port.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/pjmedia/include/pjmedia/wav_port.h b/pjmedia/include/pjmedia/wav_port.h index 5f6a015a..894db811 100644 --- a/pjmedia/include/pjmedia/wav_port.h +++ b/pjmedia/include/pjmedia/wav_port.h @@ -57,13 +57,29 @@ PJ_DECL(pj_status_t) pjmedia_wav_player_port_create( pj_pool_t *pool, /** + * Set the play position of WAV player. + * + * @param port The file player port. + * @param samples Sample position (zero as start of file). + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_wav_player_port_set_pos( pjmedia_port *port, + pj_uint32_t samples ); + + +/** * Create a media port to record streams to a WAV file. Note that the port * must be closed properly (with #pjmedia_port_destroy()) so that the WAV * header can be filled with correct values (such as the file length). * * @param pool Pool to create memory buffers for this port. * @param filename File name. - * @param flags Port creation flags. + * @param clock_rate The sampling rate. + * @param channel_count Number of channels. + * @param samples_per_frame Number of samples per frame. + * @param bits_per_sampe Number of bits per sample (eg 16). + * @param flags Port creation flags (must be 0 at present). * @param buf_size Buffer size to be allocated. If the value is zero or * negative, the port will use default buffer size (which * is about 4KB). @@ -72,16 +88,16 @@ PJ_DECL(pj_status_t) pjmedia_wav_player_port_create( pj_pool_t *pool, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create( pj_pool_t *pool, - const char *filename, - unsigned sampling_rate, - unsigned channel_count, - unsigned samples_per_frame, - unsigned bits_per_sample, - unsigned flags, - pj_ssize_t buff_size, - void *user_data, - pjmedia_port **p_port ); +PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create(pj_pool_t *pool, + const char *filename, + unsigned clock_rate, + unsigned channel_count, + unsigned samples_per_frame, + unsigned bits_per_sample, + unsigned flags, + pj_ssize_t buff_size, + void *user_data, + pjmedia_port **p_port ); |