Changeset 5028 for pjproject/trunk


Ignore:
Timestamp:
Mar 26, 2015 5:40:51 AM (10 years ago)
Author:
ming
Message:

Fixed #1790: Remove unsupported capabilities and some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/android_opengl.c

    r5016 r5028  
    3939 * To disable this feature, put 0. 
    4040 */ 
    41 #define STOP_IF_ERROR_RENDERING 5 
    42  
    43 extern JavaVM *pj_jni_jvm; 
     41#define STOP_IF_ERROR_RENDERING 8 
    4442 
    4543typedef struct andgl_fmt_info 
     
    139137int pjmedia_vid_dev_opengl_imp_get_cap(void) 
    140138{ 
    141     return PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW | 
    142            PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE; 
     139    return PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW; 
    143140} 
    144141 
     
    299296    strm->ts_inc = PJMEDIA_SPF2(param->clock_rate, &vfd->fps, 1); 
    300297     
    301     /* If OUTPUT_RESIZE flag is not used, set display size to default */ 
    302     if (!(param->flags & PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE)) { 
    303         pj_bzero(&strm->param.disp_size, sizeof(strm->param.disp_size)); 
    304     } 
    305  
    306298    /* Set video format */ 
    307299    status = andgl_stream_set_cap(&strm->base, PJMEDIA_VID_DEV_CAP_FORMAT, 
     
    326318    } 
    327319 
    328     /* Apply the remaining settings */ 
    329 /*    if (param->flags & PJMEDIA_VID_DEV_CAP_ORIENTATION) { 
    330         andgl_stream_set_cap(&strm->base, PJMEDIA_VID_DEV_CAP_ORIENTATION, 
    331                              &param->orient); 
    332     } 
    333 */ 
    334320    PJ_LOG(4, (THIS_FILE, "Android OpenGL ES renderer successfully created")); 
    335321                     
     
    444430        } 
    445431 
    446         PJ_LOG(4, (THIS_FILE, "Re-initializing OpenGL with window %p: %s", 
    447                               strm->window, 
     432        PJ_LOG(4, (THIS_FILE, "Re-initializing OpenGL with native window" 
     433                              " %p: %s", strm->window, 
    448434                              (status == PJ_SUCCESS? "success": "failed"))); 
    449435         
    450436        return status; 
    451     } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE) { 
    452         pj_memcpy(&strm->param.disp_size, pval, sizeof(strm->param.disp_size)); 
    453         return PJ_SUCCESS; 
    454     } else if (cap == PJMEDIA_VID_DEV_CAP_ORIENTATION) { 
    455         pj_memcpy(&strm->param.orient, pval, sizeof(strm->param.orient)); 
    456         if (strm->param.orient == PJMEDIA_ORIENT_UNKNOWN) 
    457             return PJ_SUCCESS; 
    458         return PJ_SUCCESS; 
    459437    } 
    460438     
Note: See TracChangeset for help on using the changeset viewer.