Ignore:
Timestamp:
Feb 24, 2011 7:47:55 AM (13 years ago)
Author:
nanang
Message:

Re #1182:

  • Added video stream interface in vid_stream.h, the video stream will be able to handle different video formats in encoding and decoding direction.
  • Renamed video device stream class identifiers from 'pjmedia_vid_stream*' to 'pjmedia_vid_dev_stream*' as 'pjmedia_vid_stream' is used by video stream interface.
  • Added ffmpeg video capability to be able to parse SDP format param for H263 and also decide video format for encoding direction based on remote preference and local format-capability setting.
  • Added some new APIs in jitter buffer for handling video stream: pjmedia_jbuf_put_frame3(), pjmedia_jbuf_get_frame3(), pjmedia_jbuf_peek_frame(), and pjmedia_jbuf_remove_frame().
  • Moved pjmedia_stream_info_from_sdp() from session to stream
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/videodev.c

    r3395 r3420  
    425425    unsigned i; 
    426426 
    427     /* Allow shutdown() to be called multiple times as long as there is matching 
    428      * number of init(). 
     427    /* Allow shutdown() to be called multiple times as long as there is 
     428     * matching number of init(). 
    429429     */ 
    430430    if (vid_subsys.init_count == 0) { 
     
    547547 
    548548    for (drv_idx=0; drv_idx<vid_subsys.drv_cnt; ++drv_idx) { 
    549         if (!pj_ansi_stricmp(drv_name, vid_subsys.drv[drv_idx].name)) { 
     549        if (!pj_ansi_stricmp(drv_name, vid_subsys.drv[drv_idx].name)) 
     550        { 
    550551            f = vid_subsys.drv[drv_idx].f; 
    551552            break; 
     
    556557        return PJ_ENOTFOUND; 
    557558 
    558     for (dev_idx=0; dev_idx<vid_subsys.drv[drv_idx].dev_cnt; ++dev_idx) { 
     559    for (dev_idx=0; dev_idx<vid_subsys.drv[drv_idx].dev_cnt; ++dev_idx) 
     560    { 
    559561        pjmedia_vid_dev_info info; 
    560562        pj_status_t status; 
     
    607609 
    608610/* API: Open video stream object using the specified parameters. */ 
    609 PJ_DEF(pj_status_t) pjmedia_vid_stream_create(const pjmedia_vid_param *prm, 
    610                                               const pjmedia_vid_cb *cb, 
    611                                               void *user_data, 
    612                                               pjmedia_vid_stream **p_vid_strm) 
     611PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_create( 
     612                                        const pjmedia_vid_param *prm, 
     613                                        const pjmedia_vid_cb *cb, 
     614                                        void *user_data, 
     615                                        pjmedia_vid_dev_stream **p_vid_strm) 
    613616{ 
    614617    pjmedia_vid_dev_factory *cap_f=NULL, *rend_f=NULL, *f=NULL; 
     
    675678 
    676679/* API: Get the running parameters for the specified video stream. */ 
    677 PJ_DEF(pj_status_t) pjmedia_vid_stream_get_param(pjmedia_vid_stream *strm, 
    678                                                  pjmedia_vid_param *param) 
     680PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_get_param( 
     681                                            pjmedia_vid_dev_stream *strm, 
     682                                            pjmedia_vid_param *param) 
    679683{ 
    680684    pj_status_t status; 
     
    695699 
    696700/* API: Get the value of a specific capability of the video stream. */ 
    697 PJ_DEF(pj_status_t) pjmedia_vid_stream_get_cap(pjmedia_vid_stream *strm, 
    698                                                pjmedia_vid_dev_cap cap, 
    699                                                void *value) 
     701PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_get_cap( 
     702                                            pjmedia_vid_dev_stream *strm, 
     703                                            pjmedia_vid_dev_cap cap, 
     704                                            void *value) 
    700705{ 
    701706    return strm->op->get_cap(strm, cap, value); 
     
    703708 
    704709/* API: Set the value of a specific capability of the video stream. */ 
    705 PJ_DEF(pj_status_t) pjmedia_vid_stream_set_cap(pjmedia_vid_stream *strm, 
    706                                                pjmedia_vid_dev_cap cap, 
    707                                                const void *value) 
     710PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_set_cap( 
     711                                            pjmedia_vid_dev_stream *strm, 
     712                                            pjmedia_vid_dev_cap cap, 
     713                                            const void *value) 
    708714{ 
    709715    return strm->op->set_cap(strm, cap, value); 
     
    711717 
    712718/* API: Start the stream. */ 
    713 PJ_DEF(pj_status_t) pjmedia_vid_stream_start(pjmedia_vid_stream *strm) 
     719PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_start(pjmedia_vid_dev_stream *strm) 
    714720{ 
    715721    return strm->op->start(strm); 
    716722} 
    717723 
    718 PJ_DEF(pj_status_t) pjmedia_vid_stream_get_frame(pjmedia_vid_stream *strm, 
    719                                                  pjmedia_frame *frame) 
     724PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_get_frame( 
     725                                            pjmedia_vid_dev_stream *strm, 
     726                                            pjmedia_frame *frame) 
    720727{ 
    721728    pj_assert(strm->op->get_frame); 
     
    723730} 
    724731 
    725 PJ_DEF(pj_status_t) pjmedia_vid_stream_put_frame(pjmedia_vid_stream *strm, 
    726                                                  const pjmedia_frame *frame) 
     732PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_put_frame( 
     733                                            pjmedia_vid_dev_stream *strm, 
     734                                            const pjmedia_frame *frame) 
    727735{ 
    728736    pj_assert(strm->op->put_frame); 
     
    731739 
    732740/* API: Stop the stream. */ 
    733 PJ_DEF(pj_status_t) pjmedia_vid_stream_stop(pjmedia_vid_stream *strm) 
     741PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_stop(pjmedia_vid_dev_stream *strm) 
    734742{ 
    735743    return strm->op->stop(strm); 
     
    737745 
    738746/* API: Destroy the stream. */ 
    739 PJ_DEF(pj_status_t) pjmedia_vid_stream_destroy(pjmedia_vid_stream *strm) 
     747PJ_DEF(pj_status_t) pjmedia_vid_dev_stream_destroy( 
     748                                                pjmedia_vid_dev_stream *strm) 
    740749{ 
    741750    return strm->op->destroy(strm); 
Note: See TracChangeset for help on using the changeset viewer.