Changeset 6085
- Timestamp:
- Oct 4, 2019 4:26:39 AM (5 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/event.h
r6005 r6085 27 27 #include <pjmedia/format.h> 28 28 #include <pjmedia/signatures.h> 29 #include <pjmedia/videodev.h> 29 30 30 31 PJ_BEGIN_DECL … … 97 98 98 99 /** 100 * Video device stopped on error. 101 */ 102 PJMEDIA_EVENT_VID_DEV_ERROR = PJMEDIA_FOURCC('V', 'E', 'R', 'R'), 103 104 /** 99 105 * Transport media error. 100 106 */ … … 159 165 /** The error code */ 160 166 pj_status_t status; 167 161 168 } pjmedia_event_aud_dev_err_data; 169 170 /** 171 * Additional data/parameters for video device error event. 172 */ 173 typedef struct pjmedia_event_vid_dev_err_data 174 { 175 /** The media direction that fails */ 176 pjmedia_dir dir; 177 178 /** The video device ID */ 179 pjmedia_vid_dev_index id; 180 181 /** The error code */ 182 pj_status_t status; 183 184 } pjmedia_event_vid_dev_err_data; 162 185 163 186 /** … … 265 288 /** Audio device error event data */ 266 289 pjmedia_event_aud_dev_err_data aud_dev_err; 290 291 /** Video device error event data */ 292 pjmedia_event_vid_dev_err_data vid_dev_err; 267 293 268 294 /** Storage for user event data */ -
pjproject/trunk/pjmedia/include/pjmedia/videodev.h
r5255 r6085 26 26 #include <pjmedia-videodev/config.h> 27 27 #include <pjmedia-videodev/errno.h> 28 #include <pjmedia/event.h>29 28 #include <pjmedia/frame.h> 30 29 #include <pjmedia/format.h> -
pjproject/trunk/pjmedia/src/pjmedia-videodev/android_opengl.c
r5028 r6085 115 115 static pj_status_t andgl_stream_destroy(pjmedia_vid_dev_stream *strm); 116 116 117 static pj_status_t init_opengl(void * data); 118 static pj_status_t deinit_opengl(void * data); 119 117 120 /* Job queue prototypes */ 118 121 static pj_status_t job_queue_create(pj_pool_t *pool, job_queue **pjq); … … 155 158 { \ 156 159 PJ_LOG(3, (THIS_FILE, "Unable to %s %d", str, eglGetError())); \ 157 return PJMEDIA_EVID_SYSERR; \ 160 status = PJMEDIA_EVID_SYSERR; \ 161 goto on_return; \ 158 162 } 159 163 … … 173 177 EGLint width; 174 178 EGLint height; 179 pj_status_t status; 175 180 176 181 strm->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); … … 220 225 221 226 /* Init GL buffers */ 222 return pjmedia_vid_dev_opengl_init_buffers(strm->gl_buf); 223 } 227 status = pjmedia_vid_dev_opengl_init_buffers(strm->gl_buf); 228 229 on_return: 230 if (status != PJ_SUCCESS) 231 deinit_opengl(strm); 232 233 return status; 234 } 235 236 #undef EGL_ERR 224 237 225 238 static pj_status_t render(void * data) … … 387 400 pjmedia_format *fmt = (pjmedia_format *)pval; 388 401 andgl_fmt_info *ifi; 402 pj_status_t status = PJ_SUCCESS; 389 403 390 404 if (!(ifi = get_andgl_format_info(fmt->id))) … … 407 421 408 422 if (strm->window) 409 job_queue_post_job(strm->jq, init_opengl, strm, 0, NULL);423 job_queue_post_job(strm->jq, init_opengl, strm, 0, &status); 410 424 411 PJ_LOG(4, (THIS_FILE, "Re-initializing OpenGL due to format change")); 412 413 return PJ_SUCCESS; 425 PJ_PERROR(4,(THIS_FILE, status, 426 "Re-initializing OpenGL due to format change")); 427 return status; 428 414 429 } else if (cap == PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) { 415 430 pj_status_t status = PJ_SUCCESS; … … 430 445 } 431 446 432 PJ_LOG(4, (THIS_FILE, "Re-initializing OpenGL with native window" 433 " %p: %s", strm->window, 434 (status == PJ_SUCCESS? "success": "failed"))); 435 447 PJ_PERROR(4,(THIS_FILE, status, 448 "Re-initializing OpenGL with native window %p", 449 strm->window)); 436 450 return status; 437 451 } -
pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c
r5982 r6085 18 18 */ 19 19 #include <pjmedia-videodev/videodev_imp.h> 20 #include <pjmedia/event.h> 20 21 #include <pj/assert.h> 21 22 #include <pj/log.h> -
pjproject/trunk/pjmedia/src/pjmedia/vid_port.c
r6041 r6085 1004 1004 &vp->conv.conv_param.dst); 1005 1005 if (status != PJ_SUCCESS) { 1006 pjmedia_event e; 1007 1006 1008 PJ_PERROR(3,(THIS_FILE, status, 1007 1009 "failure in changing the format of the video device")); … … 1009 1011 status != PJMEDIA_EVID_ERR ? "success" : 1010 1012 "failure")); 1013 1014 pjmedia_event_init(&e, PJMEDIA_EVENT_VID_DEV_ERROR, NULL, vp); 1015 e.data.vid_dev_err.dir = vp->dir; 1016 e.data.vid_dev_err.status = status; 1017 e.data.vid_dev_err.id = (vp->dir==PJMEDIA_DIR_ENCODING? 1018 vid_param.cap_id : vid_param.rend_id); 1019 pjmedia_event_publish(NULL, vp, &e, 1020 PJMEDIA_EVENT_PUBLISH_POST_EVENT); 1021 1011 1022 return status; 1012 1023 } -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r6037 r6085 1550 1550 w->rend_slot, NULL); 1551 1551 } 1552 } 1553 break; 1554 1555 case PJMEDIA_EVENT_VID_DEV_ERROR: 1556 { 1557 PJ_PERROR(3,(THIS_FILE, event->data.vid_dev_err.status, 1558 "Video device id=%d error for call %d", 1559 event->data.vid_dev_err.id, 1560 call->index)); 1552 1561 } 1553 1562 break;
Note: See TracChangeset
for help on using the changeset viewer.