Ignore:
Timestamp:
Mar 14, 2014 4:09:50 AM (10 years ago)
Author:
bennylp
Message:

Closed #1748: enhancements to WAV player API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/wav_port.h

    r3553 r4793  
    5050    PJMEDIA_FILE_NO_LOOP = 1 
    5151}; 
     52 
     53 
     54/** 
     55 * Additional information about the WAV player. 
     56 */ 
     57typedef struct pjmedia_wav_player_info 
     58{ 
     59    /** 
     60     * Format ID of the payload. 
     61     */ 
     62    pjmedia_format_id   fmt_id; 
     63 
     64    /** 
     65     * The number of bits per sample of the file payload. For example, 
     66     * the value is 16 for PCM WAV and 8 for Alaw/Ulas WAV files. 
     67     */ 
     68    unsigned            payload_bits_per_sample; 
     69 
     70    /** 
     71     * The WAV payload size in bytes. 
     72     */ 
     73    pj_uint32_t         size_bytes; 
     74 
     75    /** 
     76     * The WAV payload size in samples. 
     77     */ 
     78    pj_uint32_t         size_samples; 
     79 
     80} pjmedia_wav_player_info; 
    5281 
    5382 
     
    77106                                                     pjmedia_port **p_port ); 
    78107 
     108/** 
     109 * Get additional info about the file player. 
     110 * 
     111 * @param port          The file port. 
     112 * @param i             The info. 
     113 * 
     114 * @return              PJ_SUCCESS on success or the appropriate error code. 
     115 */ 
     116PJ_DECL(pj_status_t) pjmedia_wav_player_get_info(pjmedia_port *port, 
     117                                                 pjmedia_wav_player_info *i); 
    79118 
    80119/** 
     
    83122 * @param port          The file player port. 
    84123 * 
    85  * @return              The length of the data, in bytes. Upon error it will 
    86  *                      return negative value. 
     124 * @return              The length of the data, in bytes. On error, the 
     125 *                      error code is given as negative value. 
    87126 */ 
    88127PJ_DECL(pj_ssize_t) pjmedia_wav_player_get_len(pjmedia_port *port); 
     
    103142 
    104143/** 
    105  * Get the file play position of WAV player. 
    106  * 
    107  * @param port          The file player port. 
    108  * 
    109  * @return              PJ_SUCCESS on success. 
     144 * Get the file play position of WAV player, in bytes. 
     145 * 
     146 * @param port          The file player port. 
     147 * 
     148 * @return              The current play position, in bytes. On error, the 
     149 *                      error code is given as negative value. 
    110150 */ 
    111151PJ_DECL(pj_ssize_t) pjmedia_wav_player_port_get_pos( pjmedia_port *port ); 
Note: See TracChangeset for help on using the changeset viewer.