Ignore:
Timestamp:
Jun 9, 2011 4:05:44 AM (10 years ago)
Author:
ming
Message:

Closed #1275: Change pjmedia_vid_subsys_xx() to pjmedia_vid_dev_subsys_xx()

File:
1 edited

Legend:

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

    r3489 r3579  
    105105}; 
    106106 
    107 /* The video subsystem */ 
     107/* The video device subsystem */ 
    108108static struct vid_subsys 
    109109{ 
     
    309309} 
    310310 
    311 /* API: Initialize the video subsystem. */ 
    312 PJ_DEF(pj_status_t) pjmedia_vid_subsys_init(pj_pool_factory *pf) 
     311/* API: Initialize the video device subsystem. */ 
     312PJ_DEF(pj_status_t) pjmedia_vid_dev_subsys_init(pj_pool_factory *pf) 
    313313{ 
    314314    unsigned i; 
     
    367367} 
    368368 
    369 /* API: register an video device factory to the video subsystem. */ 
     369/* API: register a video device factory to the video device subsystem. */ 
    370370PJ_DEF(pj_status_t) 
    371371pjmedia_vid_register_factory(pjmedia_vid_dev_factory_create_func_ptr adf) 
     
    387387} 
    388388 
    389 /* API: unregister an video device factory from the video subsystem. */ 
     389/* API: unregister a video device factory from the video device subsystem. */ 
    390390PJ_DEF(pj_status_t) 
    391391pjmedia_vid_unregister_factory(pjmedia_vid_dev_factory_create_func_ptr adf) 
     
    414414} 
    415415 
    416 /* API: get the pool factory registered to the video subsystem. */ 
    417 PJ_DEF(pj_pool_factory*) pjmedia_vid_subsys_get_pool_factory(void) 
     416/* API: get the pool factory registered to the video device subsystem. */ 
     417PJ_DEF(pj_pool_factory*) pjmedia_vid_dev_subsys_get_pool_factory(void) 
    418418{ 
    419419    return vid_subsys.pf; 
    420420} 
    421421 
    422 /* API: Shutdown the video subsystem. */ 
    423 PJ_DEF(pj_status_t) pjmedia_vid_subsys_shutdown(void) 
     422/* API: Shutdown the video device subsystem. */ 
     423PJ_DEF(pj_status_t) pjmedia_vid_dev_subsys_shutdown(void) 
    424424{ 
    425425    unsigned i; 
     
    433433    --vid_subsys.init_count; 
    434434 
    435     for (i=0; i<vid_subsys.drv_cnt; ++i) { 
    436         deinit_driver(i); 
    437     } 
    438  
    439     vid_subsys.pf = NULL; 
     435    if (vid_subsys.init_count == 0) { 
     436        for (i=0; i<vid_subsys.drv_cnt; ++i) { 
     437            deinit_driver(i); 
     438        } 
     439 
     440        vid_subsys.pf = NULL; 
     441    } 
    440442    return PJ_SUCCESS; 
    441443} 
Note: See TracChangeset for help on using the changeset viewer.