亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? port.h

?? 基于sip協(xié)議的網(wǎng)絡(luò)電話(huà)源碼
?? H
字號(hào):
/* $Id: port.h 974 2007-02-19 01:13:53Z bennylp $ *//*  * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  */#ifndef __PJMEDIA_PORT_H__#define __PJMEDIA_PORT_H__/** * @file port.h * @brief Port interface declaration */#include <pjmedia/types.h>#include <pj/os.h>/**  @defgroup PJMEDIA_PORT_CONCEPT Media Ports Framework  @ingroup PJMEDIA  @brief Extensible framework for media terminations    @section media_port_intro Media Port Concepts    @subsection The Media Port  A media port (represented with pjmedia_port "class") provides a generic  and extensible framework for implementing media terminations. A media  port interface basically has the following properties:  - media port information (pjmedia_port_info) to describe the  media port properties (sampling rate, number of channels, etc.),  - pointer to function to acquire frames from the port (<tt>get_frame()  </tt> interface), which will be called by #pjmedia_port_get_frame()  public API, and  - pointer to function to store frames to the port (<tt>put_frame()</tt>  interface) which will be called by #pjmedia_port_put_frame() public  API.    Media ports are passive "objects". Applications (or other PJMEDIA   components) must actively calls #pjmedia_port_get_frame() or   #pjmedia_port_put_frame() from/to the media port in order to retrieve/  store media frames.    Some media ports (such as @ref PJMEDIA_CONF and @ref PJMEDIA_RESAMPLE_PORT)  may be interconnected with each other, while some  others represent the ultimate source/sink termination for the media.   @subsection port_clock_ex1 Example: Manual Resampling  For example, suppose application wants to convert the sampling rate  of one WAV file to another. In this case, application would create and  arrange media ports connection as follows:    \image html sample-manual-resampling.jpg  Application would setup the media ports using the following pseudo-  code:  \code        pjmedia_port *player, *resample, *writer;      pj_status_t status;        // Create the file player port.      status = pjmedia_wav_player_port_create(pool,   					      "Input.WAV",	    // file name  					      20,		    // ptime.  					      PJMEDIA_FILE_NO_LOOP, // flags  					      0,		    // buffer size  					      NULL,		    // user data.  					      &player );      PJ_ASSERT_RETURN(status==PJ_SUCCESS, PJ_SUCCESS);        // Create the resample port with specifying the target sampling rate,       // and with the file port as the source. This will effectively      // connect the resample port with the player port.      status = pjmedia_resample_port_create( pool, player, 8000,   					     0, &resample);      PJ_ASSERT_RETURN(status==PJ_SUCCESS, PJ_SUCCESS);        // Create the file writer, specifying the resample port's configuration      // as the WAV parameters.      status pjmedia_wav_writer_port_create(pool,   					    "Output.WAV",  // file name.  					    resample->info.clock_rate,  					    resample->info.channel_count,  					    resample->info.samples_per_frame,  					    resample->info.bits_per_sample,  					    0,		// flags  					    0,		// buffer size  					    NULL,	// user data.  					    &writer);    \endcode    After the ports have been set up, application can perform the conversion  process by running this loop:   \code    	pj_int16_t samplebuf[MAX_FRAME];  	  	while (1) {  	    pjmedia_frame frame;  	    pj_status_t status;    	    frame.buf = samplebuf;  	    frame.size = sizeof(samplebuf);    	    // Get the frame from resample port.  	    status = pjmedia_port_get_frame(resample, &frame);  	    if (status != PJ_SUCCESS || frame.type == PJMEDIA_FRAME_TYPE_NONE) {  		// End-of-file, end the conversion.  		break;  	    }    	    // Put the frame to write port.  	    status = pjmedia_port_put_frame(writer, &frame);  	    if (status != PJ_SUCCESS) {  		// Error in writing the file.  		break;  	    }  	}    \endcode   For the sake of completeness, after the resampling process is done,   application would need to destroy the ports:    \code	// Note: by default, destroying resample port will destroy the	//	 the downstream port too.  	pjmedia_port_destroy(resample);  	pjmedia_port_destroy(writer);  \endcode    The above steps are okay for our simple purpose of changing file's sampling  rate. But for other purposes, the process of reading and writing frames  need to be done in timely manner (for example, sending RTP packets to  remote stream). And more over, as the application's scope goes bigger,  the same pattern of manually reading/writing frames comes up more and more often,  thus perhaps it would be better if PJMEDIA provides mechanism to   automate this process.    And indeed PJMEDIA does provide such mechanism, which is described in   @ref PJMEDIA_PORT_CLOCK section.  @subsection media_port_autom Automating Media Flow  PJMEDIA provides few mechanisms to make media flows automatically  among media ports. This concept is described in @ref PJMEDIA_PORT_CLOCK   section. *//** * @defgroup PJMEDIA_PORT_INTERFACE Media Port Interface * @ingroup PJMEDIA_PORT_CONCEPT * @brief Declares the media port interface. *//** * @defgroup PJMEDIA_PORT Ports * @ingroup PJMEDIA_PORT_CONCEPT * @brief Contains various types of media ports/terminations. * @{ * This page lists all types of media ports currently implemented * in PJMEDIA. The media port concept is explained in @ref PJMEDIA_PORT_CONCEPT. * @} *//** @defgroup PJMEDIA_PORT_CLOCK Clock/Timing @ingroup PJMEDIA_PORT_CONCEPT @brief Various types of classes that provide timing. @{ The media clock/timing extends the media port concept that is explained  in @ref PJMEDIA_PORT_CONCEPT. When clock is present in the ports  interconnection, media will flow automatically (and with correct timing too!) from one media port to another.  There are few objects in PJMEDIA that are able to provide clock/timing to media ports interconnection: - @ref PJMED_SND_PORT\n   The sound device makes a good candidate as the clock source, and   PJMEDIA @ref PJMED_SND is designed so that it is able to invoke   operations according to timing driven by the sound hardware clock   (this may sound complicated, but actually it just means that   the sound device abstraction provides callbacks to be called when   it has/wants media frames).\n   See @ref PJMED_SND_PORT for more details. - @ref PJMEDIA_MASTER_PORT\n   The master port uses @ref PJMEDIA_CLOCK as the clock source. By using   @ref PJMEDIA_MASTER_PORT, it is possible to interconnect passive   media ports and let the frames flow automatically in timely manner.\n   Please see @ref PJMEDIA_MASTER_PORT for more details. @} *//** * @addtogroup PJMEDIA_PORT_INTERFACE * @{ * This page contains the media port interface declarations. The media port * concept is explained in @ref PJMEDIA_PORT_CONCEPT. */PJ_BEGIN_DECL/** * Port operation setting. */enum pjmedia_port_op{    /**      * No change to the port TX or RX settings.     */    PJMEDIA_PORT_NO_CHANGE,    /**     * TX or RX is disabled from the port. It means get_frame() or     * put_frame() WILL NOT be called for this port.     */    PJMEDIA_PORT_DISABLE,    /**     * TX or RX is muted, which means that get_frame() or put_frame()     * will still be called, but the audio frame is discarded.     */    PJMEDIA_PORT_MUTE,    /**     * Enable TX and RX to/from this port.     */    PJMEDIA_PORT_ENABLE};/** * @see pjmedia_port_op */typedef enum pjmedia_port_op pjmedia_port_op;/** * Port info. */typedef struct pjmedia_port_info{    pj_str_t	    name;		/**< Port name.			    */    pj_uint32_t	    signature;		/**< Port signature.		    */    pjmedia_type    type;		/**< Media type.		    */    pj_bool_t	    has_info;		/**< Has info?			    */    pj_bool_t	    need_info;		/**< Need info on connect?	    */    unsigned	    pt;			/**< Payload type (can be dynamic). */    pj_str_t	    encoding_name;	/**< Encoding name.		    */    unsigned	    clock_rate;		/**< Sampling rate.		    */    unsigned	    channel_count;	/**< Number of channels.	    */    unsigned	    bits_per_sample;	/**< Bits/sample		    */    unsigned	    samples_per_frame;	/**< No of samples per frame.	    */    unsigned	    bytes_per_frame;	/**< No of samples per frame.	    */} pjmedia_port_info;/**  * Types of media frame.  */typedef enum pjmedia_frame_type{    PJMEDIA_FRAME_TYPE_NONE,	    /**< No frame.		*/    PJMEDIA_FRAME_TYPE_AUDIO	    /**< Normal audio frame.	*/} pjmedia_frame_type;/**  * This structure describes a media frame.  */struct pjmedia_frame{    pjmedia_frame_type	 type;	    /**< Frame type.		    */    void		*buf;	    /**< Pointer to buffer.	    */    pj_size_t		 size;	    /**< Frame size in bytes.	    */    pj_timestamp	 timestamp; /**< Frame timestamp.	    */};/**  * @see pjmedia_frame */typedef struct pjmedia_frame pjmedia_frame;/** * For future graph. */typedef struct pjmedia_graph pjmedia_graph;/** * @see pjmedia_port */typedef struct pjmedia_port pjmedia_port;/** * Port interface. */struct pjmedia_port{    pjmedia_port_info	 info;		    /**< Port information.  */    /** Port data can be used by the port creator to attach arbitrary     *  value to be associated with the port.     */    struct port_data {	void		*pdata;		    /**< Pointer data.	    */	long		 ldata;		    /**< Long data.	    */    } port_data;    /**     * Sink interface.      * This should only be called by #pjmedia_port_put_frame().     */    pj_status_t (*put_frame)(pjmedia_port *this_port, 			     const pjmedia_frame *frame);    /**     * Source interface.      * This should only be called by #pjmedia_port_get_frame().     */    pj_status_t (*get_frame)(pjmedia_port *this_port, 			     pjmedia_frame *frame);    /**     * Called to destroy this port.     */    pj_status_t (*on_destroy)(pjmedia_port *this_port);};/** * This is an auxiliary function to initialize port info for * ports which deal with PCM audio. * * @param info		    The port info to be initialized. * @param name		    Port name. * @param signature	    Port signature. * @param clock_rate	    Port's clock rate. * @param channel_count	    Number of channels. * @param bits_per_sample   Bits per sample. * @param samples_per_frame Number of samples per frame. * * @return		    PJ_SUCCESS on success. */PJ_DECL(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info,					     const pj_str_t *name,					     unsigned signature,					     unsigned clock_rate,					     unsigned channel_count,					     unsigned bits_per_sample,					     unsigned samples_per_frame);/** * Get a frame from the port (and subsequent downstream ports). * * @param port	    The media port. * @param frame	    Frame to store samples. * * @return	    PJ_SUCCESS on success, or the appropriate error code. */PJ_DECL(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port,					     pjmedia_frame *frame );/** * Put a frame to the port (and subsequent downstream ports). * * @param port	    The media port. * @param frame	    Frame to the put to the port. * * @return	    PJ_SUCCESS on success, or the appropriate error code. */PJ_DECL(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port,					     const pjmedia_frame *frame );/** * Destroy port (and subsequent downstream ports) * * @param port	    The media port. * * @return	    PJ_SUCCESS on success, or the appropriate error code. */PJ_DECL(pj_status_t) pjmedia_port_destroy( pjmedia_port *port );PJ_END_DECL/** * @} */#endif	/* __PJMEDIA_PORT_H__ */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利国产精品| 亚洲一本大道在线| 精品国产91乱码一区二区三区 | 成人av免费在线播放| 国内成+人亚洲+欧美+综合在线 | 欧美在线短视频| 欧美中文字幕不卡| 欧美伊人久久久久久久久影院| 欧洲在线/亚洲| 欧美日本一区二区在线观看| 欧美日韩国产首页| 日韩一区二区三区电影在线观看| 宅男噜噜噜66一区二区66| 日韩视频永久免费| 精品国产第一区二区三区观看体验| 精品久久久久香蕉网| 久久久亚洲国产美女国产盗摄 | 国产精品一区免费视频| 国产成人亚洲综合a∨婷婷图片| 国产成人av资源| 99国产精品视频免费观看| 在线观看免费成人| 91麻豆精品国产91久久久久久久久| 欧美一二三四在线| 欧美极品xxx| 亚洲伦理在线精品| 午夜精品久久久久久久久久| 久久精品久久99精品久久| 国产精品亚洲综合一区在线观看| 99久久久国产精品免费蜜臀| 欧美系列日韩一区| 日韩欧美国产电影| 日本一区二区不卡视频| 亚洲国产毛片aaaaa无费看| 日本视频一区二区| 大美女一区二区三区| 欧美日韩在线观看一区二区| 欧美成人福利视频| 亚洲欧美日本在线| 麻豆国产精品视频| 成人激情电影免费在线观看| 欧美日韩精品一二三区| www欧美成人18+| 尤物av一区二区| 国产一区二区三区观看| 在线视频欧美精品| 精品少妇一区二区三区在线视频| 国产精品久久久久久久久免费丝袜 | 精品国产一区久久| 中文字幕在线视频一区| 午夜国产精品一区| 福利91精品一区二区三区| 欧美中文字幕亚洲一区二区va在线 | 国产精品中文有码| 91福利在线播放| 久久影音资源网| 亚洲国产成人精品视频| 福利一区在线观看| 欧美一区国产二区| 亚洲人成网站在线| 国产精品综合av一区二区国产馆| 欧美色中文字幕| 国产精品美女久久久久aⅴ| 日韩av高清在线观看| 99re66热这里只有精品3直播| 91精品国产全国免费观看| 亚洲另类在线一区| 丁香婷婷综合五月| 欧美一区二区日韩一区二区| 亚洲精品视频一区| 成人夜色视频网站在线观看| 日韩欧美国产电影| 亚洲国产成人porn| 99r国产精品| 国产免费成人在线视频| 久久97超碰国产精品超碰| 欧美日韩国产影片| 亚洲最新在线观看| a4yy欧美一区二区三区| 国产日韩一级二级三级| 精品一二三四在线| 91麻豆精品久久久久蜜臀| 一区二区激情小说| 色综合久久88色综合天天| 日本一区二区三区免费乱视频 | 在线电影国产精品| 亚洲综合久久久| 91影院在线观看| 亚洲视频一区二区免费在线观看 | 精品国产123| 日本少妇一区二区| 欧美挠脚心视频网站| 亚洲三级电影网站| a亚洲天堂av| 中文字幕在线视频一区| 成人精品视频网站| 国产精品亲子乱子伦xxxx裸| 国产成人亚洲精品狼色在线| 久久久久久毛片| 国产黄人亚洲片| 欧美国产日韩在线观看| 国产黄色精品视频| 国产欧美精品在线观看| 国产iv一区二区三区| 中文字幕欧美三区| 96av麻豆蜜桃一区二区| 亚洲精品亚洲人成人网在线播放| 色综合中文字幕| 一区二区三区.www| 欧美日韩国产综合久久| 日本aⅴ亚洲精品中文乱码| 欧美一区日本一区韩国一区| 蜜桃一区二区三区在线观看| 精品欧美一区二区三区精品久久 | 韩国精品在线观看| 26uuu亚洲综合色| 国产毛片精品一区| 国产精品美女久久久久久久久久久 | 依依成人精品视频| 欧美午夜精品理论片a级按摩| 亚洲成av人影院| 91精品国产91久久久久久一区二区 | 成人毛片视频在线观看| 亚洲视频在线一区| 欧美日韩国产综合草草| 蜜臀91精品一区二区三区| 337p日本欧洲亚洲大胆色噜噜| 国产精品亚洲第一| 亚洲另类春色国产| 91精品欧美久久久久久动漫| 久草精品在线观看| 中文字幕欧美一| 欧美精品久久99久久在免费线 | 欧美中文字幕一区二区三区| 免费日韩伦理电影| 国产精品免费视频网站| 欧美日韩国产高清一区二区| 久久aⅴ国产欧美74aaa| 国产精品欧美一级免费| 欧美日韩中文字幕一区| 国产一区不卡视频| 悠悠色在线精品| 精品国产凹凸成av人网站| 99精品久久免费看蜜臀剧情介绍| 天堂av在线一区| 久久久青草青青国产亚洲免观| 色域天天综合网| 久久国产尿小便嘘嘘尿| 日韩毛片在线免费观看| 日韩欧美国产成人一区二区| 不卡的av中国片| 日本91福利区| 亚洲人成在线播放网站岛国| 欧美电影免费观看高清完整版| 99精品桃花视频在线观看| 午夜精品久久久久影视| 国产精品国产三级国产普通话99| 欧美肥胖老妇做爰| av高清久久久| 久久成人久久爱| 亚洲国产欧美日韩另类综合 | 一区二区三区欧美视频| 精品国产91久久久久久久妲己 | 欧美videos中文字幕| 在线观看成人免费视频| 国产成人综合亚洲网站| 偷拍与自拍一区| 亚洲女人****多毛耸耸8| 欧美精品一区二区精品网| 欧美亚洲禁片免费| av中文字幕在线不卡| 韩国成人福利片在线播放| 日日摸夜夜添夜夜添精品视频 | 国内欧美视频一区二区| 亚洲一区二区三区自拍| 国产精品麻豆99久久久久久| 精品国产乱码久久久久久夜甘婷婷 | av在线一区二区三区| 久久爱www久久做| 肉色丝袜一区二区| 一区二区三区在线观看动漫| 国产精品看片你懂得| 久久久久久久久久看片| 欧美精品 日韩| 欧美午夜精品久久久久久超碰| 99这里都是精品| 精品国产第一区二区三区观看体验| 欧美视频在线一区二区三区| 99re热这里只有精品免费视频 | 在线成人午夜影院| 在线看国产一区二区| 99国产欧美久久久精品| 粉嫩一区二区三区在线看| 国产一区二三区好的| 精品亚洲免费视频| 久久精品国产澳门| 久久99九九99精品| 久久99精品久久久| 免费成人小视频| 麻豆精品在线观看|