diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-07 21:30:04 +0100 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-07 21:30:04 +0100 |
commit | 5b7bb10e612704862dd72fa337f29bd48d34cac5 (patch) | |
tree | 393fcaa08f29ab238e7b5b0634b9a3b146aeb88d /src | |
parent | 618120a71690ea84ec05e4ae1473a2df6f78dd99 (diff) |
test: added testcase for call with video
Diffstat (limited to 'src')
-rw-r--r-- | src/call.c | 2 | ||||
-rw-r--r-- | src/video.c | 18 |
2 files changed, 16 insertions, 4 deletions
@@ -589,6 +589,8 @@ int call_alloc(struct call **callp, const struct config *cfg, struct list *lst, && (list_head(account_vidcodecl(call->acc)) != NULL) && (NULL != vidsrc_find(NULL) || NULL != vidisp_find(NULL)); + debug("call: use_video=%d\n", use_video); + /* Video stream */ if (use_video) { err = video_alloc(&call->video, cfg, diff --git a/src/video.c b/src/video.c index 2f61d77..c13b6e9 100644 --- a/src/video.c +++ b/src/video.c @@ -943,10 +943,15 @@ int video_start(struct video *v, const char *peer) stream_set_srate(v->strm, SRATE, SRATE); - err = set_vidisp(&v->vrx); - if (err) { - warning("video: could not set vidisp '%s': %m\n", - v->vrx.device, err); + if (vidisp_find(NULL)) { + err = set_vidisp(&v->vrx); + if (err) { + warning("video: could not set vidisp '%s': %m\n", + v->vrx.device, err); + } + } + else { + info("video: no video display\n"); } size.w = v->cfg.width; @@ -1075,6 +1080,11 @@ int video_encoder_set(struct video *v, struct vidcodec *vc, vtx = &v->vtx; + if (!vc->encupdh) { + info("video: vidcodec '%s' has no encoder\n", vc->name); + return ENOENT; + } + if (vc != vtx->vc) { struct videnc_param prm; |