Changeset 518 for pjproject/trunk/pjmedia/include/pjmedia/resample.h
- Timestamp:
- Jun 18, 2006 2:02:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/resample.h
r358 r518 23 23 24 24 /** 25 * @file re ample.h25 * @file resample.h 26 26 * @brief Sample rate converter. 27 27 */ … … 29 29 #include <pjmedia/port.h> 30 30 31 /** 32 * @defgroup PJMEDIA_RESAMPLE Resampling Algorithm 33 * @ingroup PJMEDIA_FRAME_OP 34 * @brief Functions to alter frame's clock rate. 35 * @{ 36 * This section describes the base resampling functions. In addition to this, 37 * application can use the @ref PJMEDIA_RESAMPLE_PORT which provides 38 * media port abstraction for the base resampling algorithm. 39 */ 31 40 32 41 PJ_BEGIN_DECL … … 99 108 100 109 /** 110 * @} 111 */ 112 113 /** 114 * @defgroup PJMEDIA_RESAMPLE_PORT Resample Port 115 * @ingroup PJMEDIA_PORT 116 * @brief Media port interface to change media stream's sampling rate. 117 * @{ 118 * This section describes media port abstractoin for @ref PJMEDIA_RESAMPLE. 119 */ 120 121 122 /** 123 * Option flags that can be specified when creating resample port. 124 */ 125 enum pjmedia_resample_port_options 126 { 127 /** 128 * Do not use high quality resampling algorithm, but use linear 129 * algorithm instead. 130 */ 131 PJMEDIA_RESAMPLE_USE_LINEAR = 1, 132 133 /** 134 * Use small filter workspace when high quality resampling is 135 * used. 136 */ 137 PJMEDIA_RESAMPLE_USE_SMALL_FILTER = 2, 138 139 /** 140 * Do not destroy downstream port when resample port is destroyed. 141 */ 142 PJMEDIA_RESAMPLE_DONT_DESTROY_DN = 4, 143 }; 144 145 146 147 /** 101 148 * Create a resample port. This creates a bidirectional resample session, 102 149 * which will resample frames when the port's get_frame() and put_frame() … … 104 151 * 105 152 * When the resample port's get_frame() is called, this port will get 106 * a frame from the downstream port and resample the frame to the upstream107 * port'sclock rate before returning it to the caller.153 * a frame from the downstream port and resample the frame to the target 154 * clock rate before returning it to the caller. 108 155 * 109 156 * When the resample port's put_frame() is called, this port will resample 110 * the frame to the downstream 's portclock rate before giving the frame157 * the frame to the downstream port's clock rate before giving the frame 111 158 * to the downstream port. 112 159 * 113 160 * @param pool Pool to allocate the structure and buffers. 114 * @param high_quality If true, then high quality conversion will be 115 * used, at the expense of more CPU and memory, 116 * because temporary buffer needs to be created. 117 * @param large_filter If true, large filter size will be used. 118 * @param downstream_rate The sampling rate of the downstream port. 119 * @param upstream_rate The sampling rate of the upstream port. 120 * @param channel_count The number of channels. This argument is only 121 * used for the port information. It does not 122 * change the behavior of the resample port. 123 * @param samples_per_frame Number of samples per frame from the downstream 124 * port. 161 * @param dn_port The downstream port, which clock rate is to 162 * be converted to the target clock rate. 163 * @param clock_rate Target clock rate. 164 * @param options Flags from #pjmedia_resample_port_options. 165 * When this flag is zero, the default behavior 166 * is to use high quality resampling with 167 * large filter, and to destroy downstream port 168 * when resample port is destroyed. 125 169 * @param p_port Pointer to receive the resample port instance. 126 170 * … … 128 172 */ 129 173 PJ_DECL(pj_status_t) pjmedia_resample_port_create( pj_pool_t *pool, 130 pj_bool_t high_quality, 131 pj_bool_t large_filter, 132 unsigned downstream_rate, 133 unsigned upstream_rate, 134 unsigned channel_count, 135 unsigned samples_per_frame, 174 pjmedia_port *dn_port, 175 unsigned clock_rate, 176 unsigned options, 136 177 pjmedia_port **p_port ); 137 178 … … 139 180 PJ_END_DECL 140 181 182 /** 183 * @} 184 */ 185 186 141 187 #endif /* __PJMEDIA_RESAMPLE_H__ */ 142 188
Note: See TracChangeset
for help on using the changeset viewer.