Changeset 531 for pjproject/trunk/pjmedia/include/pjmedia/wav_port.h
- Timestamp:
- Jun 20, 2006 3:39:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/wav_port.h
r518 r531 32 32 33 33 /** 34 * @defgroup PJMEDIA_FILE_PLAY File Player34 * @defgroup PJMEDIA_FILE_PLAY WAV File Player 35 35 * @ingroup PJMEDIA_PORT 36 36 * @brief WAV File Player … … 78 78 79 79 /** 80 * Set the play position of WAV player.80 * Set the file play position of WAV player. 81 81 * 82 82 * @param port The file player port. 83 * @param samples Sample position (zero as start of file). 83 * @param offset Playback position in bytes, relative to the start of 84 * the payload. 84 85 * 85 86 * @return PJ_SUCCESS on success. 86 87 */ 87 88 PJ_DECL(pj_status_t) pjmedia_wav_player_port_set_pos( pjmedia_port *port, 88 pj_uint32_t samples ); 89 89 pj_uint32_t offset ); 90 91 92 /** 93 * Get the file play position of WAV player. 94 * 95 * @param port The file player port. 96 * 97 * @return PJ_SUCCESS on success. 98 */ 99 PJ_DECL(pj_ssize_t) pjmedia_wav_player_port_get_pos( pjmedia_port *port ); 100 101 102 /** 103 * Register a callback to be called when the file reading has reached the 104 * end of file. If the file is set to play repeatedly, then the callback 105 * will be called multiple times. Note that only one callback can be 106 * registered for each file port. 107 * 108 * @param port The file player port. 109 * @param user_data User data to be specified in the callback. Note that 110 * this overwrites the user data previously set when 111 * the file port is created. 112 * @param cb Callback to be called. If the callback returns non- 113 * PJ_SUCCESS, the playback will stop. Note that if 114 * application destroys the file port in the callback, 115 * it must return non-PJ_SUCCESS here. 116 * 117 * @return PJ_SUCCESS on success. 118 */ 119 PJ_DECL(pj_status_t) 120 pjmedia_wav_player_set_eof_cb( pjmedia_port *port, 121 void *user_data, 122 pj_status_t (*cb)(pjmedia_port *port, 123 void *usr_data)); 90 124 91 125 /** … … 115 149 * @param bits_per_sample Number of bits per sample (eg 16). 116 150 * @param flags Port creation flags (must be 0 at present). 117 * @param buff_size Buffer size to be allocated. If the value is zero or118 * negative, the port will use default buffer size (which119 * is about 4KB).120 * @param user_data User data to be associated with the file writerport.121 * @param p_port Pointer to receive the file port instance.122 * 123 * @return PJ_SUCCESS on success.151 * @param buff_size Buffer size to be allocated. If the value is 152 * zero or negative, the port will use default buffer 153 * size (which is about 4KB). 154 * @param user_data User data to be associated with the file port. 155 * @param p_port Pointer to receive the file port instance. 156 * 157 * @return PJ_SUCCESS on success. 124 158 */ 125 159 PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create(pj_pool_t *pool, … … 135 169 136 170 171 /** 172 * Get current writing position. Note that this does not necessarily match 173 * the size written to the file, since the WAV writer employs some internal 174 * buffering. Also the value reported here only indicates the payload size 175 * (it does not include the size of the WAV header), 176 * 177 * @param port The file writer port. 178 * 179 * @return Positive value to indicate the position (in bytes), 180 * or negative value containing the error code. 181 */ 182 PJ_DECL(pj_ssize_t) pjmedia_wav_writer_port_get_pos( pjmedia_port *port ); 183 184 185 /** 186 * Register the callback to be called when the file writing has reached 187 * certain size. Application can use this callback, for example, to limit 188 * the size of the output file. 189 * 190 * @param port The file writer port. 191 * @param pos The file position on which the callback will be called. 192 * @param user_data User data to be specified in the callback. Note that 193 * this overwrites the user data previously set when 194 * the file port is created. 195 * @param cb Callback to be called. If the callback returns non- 196 * PJ_SUCCESS, the writing will stop. Note that if 197 * application destroys the port in the callback, it must 198 * return non-PJ_SUCCESS here. 199 * 200 * @return PJ_SUCCESS on success. 201 */ 202 PJ_DECL(pj_status_t) 203 pjmedia_wav_writer_port_set_cb( pjmedia_port *port, 204 pj_size_t pos, 205 void *user_data, 206 pj_status_t (*cb)(pjmedia_port *port, 207 void *usr_data)); 208 137 209 138 210 /**
Note: See TracChangeset
for help on using the changeset viewer.