~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjmedia/src/pjmedia-videodev/ffmpeg_dev.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: ffmpeg_dev.c 3893 2011-12-01 10:49:07Z ming $ */
2
 
/*
3
 
 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 */
19
 
 
20
 
/* Video device with ffmpeg backend, currently only capture devices are
21
 
 * implemented.
22
 
 *
23
 
 * Issues:
24
 
 * - no device enumeration (ffmpeg limitation), so this uses "host API" enum
25
 
 *   instead
26
 
 * - need stricter filter on "host API" enum, currently audio capture devs are
27
 
 *   still listed.
28
 
 * - no format enumeration, currently hardcoded to PJMEDIA_FORMAT_RGB24 only
29
 
 * - tested on Vista only (vfw backend) with virtual cam
30
 
 * - vfw backend produce bottom up pictures
31
 
 * - using VS IDE, this cannot run under debugger!
32
 
 */
33
 
 
34
 
#include <pjmedia-videodev/videodev_imp.h>
35
 
#include <pj/assert.h>
36
 
#include <pj/log.h>
37
 
#include <pj/os.h>
38
 
#include <pj/unicode.h>
39
 
 
40
 
 
41
 
#if defined(PJMEDIA_VIDEO_DEV_HAS_FFMPEG) && PJMEDIA_VIDEO_DEV_HAS_FFMPEG != 0
42
 
 
43
 
 
44
 
#define THIS_FILE               "ffmpeg.c"
45
 
 
46
 
#include "../pjmedia/ffmpeg_util.h"
47
 
#include <libavdevice/avdevice.h>
48
 
#include <libavformat/avformat.h>
49
 
 
50
 
#define MAX_DEV_CNT     8
51
 
 
52
 
typedef struct ffmpeg_dev_info
53
 
{
54
 
    pjmedia_vid_dev_info         base;
55
 
    AVInputFormat               *host_api;
56
 
    const char                  *def_devname;
57
 
} ffmpeg_dev_info;
58
 
 
59
 
 
60
 
typedef struct ffmpeg_factory
61
 
{
62
 
    pjmedia_vid_dev_factory      base;
63
 
    pj_pool_factory             *pf;
64
 
    pj_pool_t                   *pool;
65
 
    pj_pool_t                   *dev_pool;
66
 
    unsigned                     dev_count;
67
 
    ffmpeg_dev_info              dev_info[MAX_DEV_CNT];
68
 
} ffmpeg_factory;
69
 
 
70
 
 
71
 
typedef struct ffmpeg_stream
72
 
{
73
 
    pjmedia_vid_dev_stream       base;
74
 
    ffmpeg_factory              *factory;
75
 
    pj_pool_t                   *pool;
76
 
    pjmedia_vid_dev_param        param;
77
 
    AVFormatContext             *ff_fmt_ctx;
78
 
} ffmpeg_stream;
79
 
 
80
 
 
81
 
/* Prototypes */
82
 
static pj_status_t ffmpeg_factory_init(pjmedia_vid_dev_factory *f);
83
 
static pj_status_t ffmpeg_factory_destroy(pjmedia_vid_dev_factory *f);
84
 
static pj_status_t ffmpeg_factory_refresh(pjmedia_vid_dev_factory *f);
85
 
static unsigned    ffmpeg_factory_get_dev_count(pjmedia_vid_dev_factory *f);
86
 
static pj_status_t ffmpeg_factory_get_dev_info(pjmedia_vid_dev_factory *f,
87
 
                                               unsigned index,
88
 
                                               pjmedia_vid_dev_info *info);
89
 
static pj_status_t ffmpeg_factory_default_param(pj_pool_t *pool,
90
 
                                                pjmedia_vid_dev_factory *f,
91
 
                                                unsigned index,
92
 
                                                pjmedia_vid_dev_param *param);
93
 
static pj_status_t ffmpeg_factory_create_stream(
94
 
                                        pjmedia_vid_dev_factory *f,
95
 
                                        pjmedia_vid_dev_param *param,
96
 
                                        const pjmedia_vid_dev_cb *cb,
97
 
                                        void *user_data,
98
 
                                        pjmedia_vid_dev_stream **p_vid_strm);
99
 
 
100
 
static pj_status_t ffmpeg_stream_get_param(pjmedia_vid_dev_stream *strm,
101
 
                                           pjmedia_vid_dev_param *param);
102
 
static pj_status_t ffmpeg_stream_get_cap(pjmedia_vid_dev_stream *strm,
103
 
                                         pjmedia_vid_dev_cap cap,
104
 
                                         void *value);
105
 
static pj_status_t ffmpeg_stream_set_cap(pjmedia_vid_dev_stream *strm,
106
 
                                         pjmedia_vid_dev_cap cap,
107
 
                                         const void *value);
108
 
static pj_status_t ffmpeg_stream_start(pjmedia_vid_dev_stream *strm);
109
 
static pj_status_t ffmpeg_stream_get_frame(pjmedia_vid_dev_stream *s,
110
 
                                           pjmedia_frame *frame);
111
 
static pj_status_t ffmpeg_stream_stop(pjmedia_vid_dev_stream *strm);
112
 
static pj_status_t ffmpeg_stream_destroy(pjmedia_vid_dev_stream *strm);
113
 
 
114
 
/* Operations */
115
 
static pjmedia_vid_dev_factory_op factory_op =
116
 
{
117
 
    &ffmpeg_factory_init,
118
 
    &ffmpeg_factory_destroy,
119
 
    &ffmpeg_factory_get_dev_count,
120
 
    &ffmpeg_factory_get_dev_info,
121
 
    &ffmpeg_factory_default_param,
122
 
    &ffmpeg_factory_create_stream,
123
 
    &ffmpeg_factory_refresh
124
 
};
125
 
 
126
 
static pjmedia_vid_dev_stream_op stream_op =
127
 
{
128
 
    &ffmpeg_stream_get_param,
129
 
    &ffmpeg_stream_get_cap,
130
 
    &ffmpeg_stream_set_cap,
131
 
    &ffmpeg_stream_start,
132
 
    &ffmpeg_stream_get_frame,
133
 
    NULL,
134
 
    &ffmpeg_stream_stop,
135
 
    &ffmpeg_stream_destroy
136
 
};
137
 
 
138
 
 
139
 
static void print_ffmpeg_err(int err)
140
 
{
141
 
    char errbuf[512];
142
 
    if (av_strerror(err, errbuf, sizeof(errbuf)) >= 0)
143
 
        PJ_LOG(1, (THIS_FILE, "ffmpeg err %d: %s", err, errbuf));
144
 
 
145
 
}
146
 
 
147
 
static void print_ffmpeg_log(void* ptr, int level, const char* fmt, va_list vl)
148
 
{
149
 
    PJ_UNUSED_ARG(ptr);
150
 
    PJ_UNUSED_ARG(level);
151
 
    vfprintf(stdout, fmt, vl);
152
 
}
153
 
 
154
 
 
155
 
static pj_status_t ffmpeg_capture_open(AVFormatContext **ctx,
156
 
                                       AVInputFormat *ifmt,
157
 
                                       const char *dev_name,
158
 
                                       const pjmedia_vid_dev_param *param)
159
 
{
160
 
    AVFormatParameters fp;
161
 
    pjmedia_video_format_detail *vfd;
162
 
    int err;
163
 
 
164
 
    PJ_ASSERT_RETURN(ctx && ifmt && dev_name && param, PJ_EINVAL);
165
 
    PJ_ASSERT_RETURN(param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO,
166
 
                     PJ_EINVAL);
167
 
 
168
 
    vfd = pjmedia_format_get_video_format_detail(&param->fmt, PJ_TRUE);
169
 
 
170
 
    /* Init ffmpeg format context */
171
 
    *ctx = avformat_alloc_context();
172
 
 
173
 
    /* Init ffmpeg format param */
174
 
    pj_bzero(&fp, sizeof(fp));
175
 
    fp.prealloced_context = 1;
176
 
    fp.width = vfd->size.w;
177
 
    fp.height = vfd->size.h;
178
 
    fp.pix_fmt = PIX_FMT_BGR24;
179
 
    fp.time_base.num = vfd->fps.denum;
180
 
    fp.time_base.den = vfd->fps.num;
181
 
 
182
 
    /* Open capture stream */
183
 
    err = av_open_input_stream(ctx, NULL, dev_name, ifmt, &fp);
184
 
    if (err < 0) {
185
 
        *ctx = NULL; /* ffmpeg freed its states on failure, do we must too */
186
 
        print_ffmpeg_err(err);
187
 
        return PJ_EUNKNOWN;
188
 
    }
189
 
 
190
 
    return PJ_SUCCESS;
191
 
}
192
 
 
193
 
static void ffmpeg_capture_close(AVFormatContext *ctx)
194
 
{
195
 
    if (ctx)
196
 
        av_close_input_stream(ctx);
197
 
}
198
 
 
199
 
 
200
 
/****************************************************************************
201
 
 * Factory operations
202
 
 */
203
 
/*
204
 
 * Init ffmpeg_ video driver.
205
 
 */
206
 
pjmedia_vid_dev_factory* pjmedia_ffmpeg_factory(pj_pool_factory *pf)
207
 
{
208
 
    ffmpeg_factory *f;
209
 
    pj_pool_t *pool;
210
 
 
211
 
    pool = pj_pool_create(pf, "ffmpeg_cap_dev", 1000, 1000, NULL);
212
 
    f = PJ_POOL_ZALLOC_T(pool, ffmpeg_factory);
213
 
 
214
 
    f->pool = pool;
215
 
    f->pf = pf;
216
 
    f->base.op = &factory_op;
217
 
 
218
 
    avdevice_register_all();
219
 
 
220
 
    return &f->base;
221
 
}
222
 
 
223
 
 
224
 
/* API: init factory */
225
 
static pj_status_t ffmpeg_factory_init(pjmedia_vid_dev_factory *f)
226
 
{
227
 
    return ffmpeg_factory_refresh(f);
228
 
}
229
 
 
230
 
/* API: destroy factory */
231
 
static pj_status_t ffmpeg_factory_destroy(pjmedia_vid_dev_factory *f)
232
 
{
233
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
234
 
    pj_pool_t *pool = ff->pool;
235
 
 
236
 
    ff->dev_count = 0;
237
 
    ff->pool = NULL;
238
 
    if (ff->dev_pool)
239
 
        pj_pool_release(ff->dev_pool);
240
 
    if (pool)
241
 
        pj_pool_release(pool);
242
 
 
243
 
    return PJ_SUCCESS;
244
 
}
245
 
 
246
 
/* API: refresh the list of devices */
247
 
static pj_status_t ffmpeg_factory_refresh(pjmedia_vid_dev_factory *f)
248
 
{
249
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
250
 
    AVInputFormat *p;
251
 
    ffmpeg_dev_info *info;
252
 
 
253
 
    av_log_set_callback(&print_ffmpeg_log);
254
 
    av_log_set_level(AV_LOG_DEBUG);
255
 
 
256
 
    if (ff->dev_pool) {
257
 
        pj_pool_release(ff->dev_pool);
258
 
        ff->dev_pool = NULL;
259
 
    }
260
 
 
261
 
    /* TODO: this should enumerate devices, now it enumerates host APIs */
262
 
    ff->dev_count = 0;
263
 
    ff->dev_pool = pj_pool_create(ff->pf, "ffmpeg_cap_dev", 500, 500, NULL);
264
 
 
265
 
    p = av_iformat_next(NULL);
266
 
    while (p) {
267
 
        if (p->flags & AVFMT_NOFILE) {
268
 
            unsigned i;
269
 
 
270
 
            info = &ff->dev_info[ff->dev_count++];
271
 
            pj_bzero(info, sizeof(*info));
272
 
            pj_ansi_strncpy(info->base.name, "default",
273
 
                            sizeof(info->base.name));
274
 
            pj_ansi_snprintf(info->base.driver, sizeof(info->base.driver),
275
 
                             "%s (ffmpeg)", p->name);
276
 
            info->base.dir = PJMEDIA_DIR_CAPTURE;
277
 
            info->base.has_callback = PJ_FALSE;
278
 
 
279
 
            info->host_api = p;
280
 
 
281
 
#if defined(PJ_WIN32) && PJ_WIN32!=0
282
 
            info->def_devname = "0";
283
 
#elif defined(PJ_LINUX) && PJ_LINUX!=0
284
 
            info->def_devname = "/dev/video0";
285
 
#endif
286
 
 
287
 
            /* Set supported formats, currently hardcoded to RGB24 only */
288
 
            info->base.caps = PJMEDIA_VID_DEV_CAP_FORMAT;
289
 
            info->base.fmt_cnt = 1;
290
 
            for (i = 0; i < info->base.fmt_cnt; ++i) {
291
 
                pjmedia_format *fmt = &info->base.fmt[i];
292
 
 
293
 
                fmt->id = PJMEDIA_FORMAT_RGB24;
294
 
                fmt->type = PJMEDIA_TYPE_VIDEO;
295
 
                fmt->detail_type = PJMEDIA_FORMAT_DETAIL_NONE;
296
 
            }
297
 
        }
298
 
        p = av_iformat_next(p);
299
 
    }
300
 
 
301
 
    return PJ_SUCCESS;
302
 
}
303
 
 
304
 
/* API: get number of devices */
305
 
static unsigned ffmpeg_factory_get_dev_count(pjmedia_vid_dev_factory *f)
306
 
{
307
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
308
 
    return ff->dev_count;
309
 
}
310
 
 
311
 
/* API: get device info */
312
 
static pj_status_t ffmpeg_factory_get_dev_info(pjmedia_vid_dev_factory *f,
313
 
                                               unsigned index,
314
 
                                               pjmedia_vid_dev_info *info)
315
 
{
316
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
317
 
 
318
 
    PJ_ASSERT_RETURN(index < ff->dev_count, PJMEDIA_EVID_INVDEV);
319
 
 
320
 
    pj_memcpy(info, &ff->dev_info[index].base, sizeof(*info));
321
 
 
322
 
    return PJ_SUCCESS;
323
 
}
324
 
 
325
 
/* API: create default device parameter */
326
 
static pj_status_t ffmpeg_factory_default_param(pj_pool_t *pool,
327
 
                                                pjmedia_vid_dev_factory *f,
328
 
                                                unsigned index,
329
 
                                                pjmedia_vid_dev_param *param)
330
 
{
331
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
332
 
    ffmpeg_dev_info *info;
333
 
 
334
 
    PJ_ASSERT_RETURN(index < ff->dev_count, PJMEDIA_EVID_INVDEV);
335
 
 
336
 
    PJ_UNUSED_ARG(pool);
337
 
 
338
 
    info = &ff->dev_info[index];
339
 
 
340
 
    pj_bzero(param, sizeof(*param));
341
 
    param->dir = PJMEDIA_DIR_CAPTURE;
342
 
    param->cap_id = index;
343
 
    param->rend_id = PJMEDIA_VID_INVALID_DEV;
344
 
    param->clock_rate = 0;
345
 
 
346
 
    /* Set the device capabilities here */
347
 
    param->flags = PJMEDIA_VID_DEV_CAP_FORMAT;
348
 
    param->clock_rate = 90000;
349
 
    pjmedia_format_init_video(&param->fmt, 0, 320, 240, 25, 1);
350
 
    param->fmt.id = info->base.fmt[0].id;
351
 
 
352
 
    return PJ_SUCCESS;
353
 
}
354
 
 
355
 
 
356
 
 
357
 
/* API: create stream */
358
 
static pj_status_t ffmpeg_factory_create_stream(
359
 
                                        pjmedia_vid_dev_factory *f,
360
 
                                        pjmedia_vid_dev_param *param,
361
 
                                        const pjmedia_vid_dev_cb *cb,
362
 
                                        void *user_data,
363
 
                                        pjmedia_vid_dev_stream **p_vid_strm)
364
 
{
365
 
    ffmpeg_factory *ff = (ffmpeg_factory*)f;
366
 
    pj_pool_t *pool;
367
 
    ffmpeg_stream *strm;
368
 
 
369
 
    PJ_ASSERT_RETURN(f && param && p_vid_strm, PJ_EINVAL);
370
 
    PJ_ASSERT_RETURN(param->dir == PJMEDIA_DIR_CAPTURE, PJ_EINVAL);
371
 
    PJ_ASSERT_RETURN((unsigned)param->cap_id < ff->dev_count, PJ_EINVAL);
372
 
    PJ_ASSERT_RETURN(param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO,
373
 
                     PJ_EINVAL);
374
 
 
375
 
    PJ_UNUSED_ARG(cb);
376
 
    PJ_UNUSED_ARG(user_data);
377
 
 
378
 
    /* Create and Initialize stream descriptor */
379
 
    pool = pj_pool_create(ff->pf, "ffmpeg-dev", 1000, 1000, NULL);
380
 
    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
381
 
 
382
 
    strm = PJ_POOL_ZALLOC_T(pool, struct ffmpeg_stream);
383
 
    strm->factory = (ffmpeg_factory*)f;
384
 
    strm->pool = pool;
385
 
    pj_memcpy(&strm->param, param, sizeof(*param));
386
 
 
387
 
    /* Done */
388
 
    strm->base.op = &stream_op;
389
 
    *p_vid_strm = &strm->base;
390
 
 
391
 
    return PJ_SUCCESS;
392
 
}
393
 
 
394
 
/* API: Get stream info. */
395
 
static pj_status_t ffmpeg_stream_get_param(pjmedia_vid_dev_stream *s,
396
 
                                           pjmedia_vid_dev_param *pi)
397
 
{
398
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
399
 
 
400
 
    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
401
 
 
402
 
    pj_memcpy(pi, &strm->param, sizeof(*pi));
403
 
 
404
 
    return PJ_SUCCESS;
405
 
}
406
 
 
407
 
/* API: get capability */
408
 
static pj_status_t ffmpeg_stream_get_cap(pjmedia_vid_dev_stream *s,
409
 
                                         pjmedia_vid_dev_cap cap,
410
 
                                         void *pval)
411
 
{
412
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
413
 
 
414
 
    PJ_UNUSED_ARG(strm);
415
 
    PJ_UNUSED_ARG(cap);
416
 
    PJ_UNUSED_ARG(pval);
417
 
 
418
 
    return PJMEDIA_EVID_INVCAP;
419
 
}
420
 
 
421
 
/* API: set capability */
422
 
static pj_status_t ffmpeg_stream_set_cap(pjmedia_vid_dev_stream *s,
423
 
                                         pjmedia_vid_dev_cap cap,
424
 
                                         const void *pval)
425
 
{
426
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
427
 
 
428
 
    PJ_UNUSED_ARG(strm);
429
 
    PJ_UNUSED_ARG(cap);
430
 
    PJ_UNUSED_ARG(pval);
431
 
 
432
 
    return PJMEDIA_EVID_INVCAP;
433
 
}
434
 
 
435
 
 
436
 
/* API: Start stream. */
437
 
static pj_status_t ffmpeg_stream_start(pjmedia_vid_dev_stream *s)
438
 
{
439
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
440
 
    ffmpeg_dev_info *info;
441
 
    pj_status_t status;
442
 
 
443
 
    info = &strm->factory->dev_info[strm->param.cap_id];
444
 
 
445
 
    PJ_LOG(4, (THIS_FILE, "Starting ffmpeg capture stream"));
446
 
 
447
 
    status = ffmpeg_capture_open(&strm->ff_fmt_ctx, info->host_api,
448
 
                                 info->def_devname, &strm->param);
449
 
    if (status != PJ_SUCCESS) {
450
 
        /* must set ffmpeg states to NULL on any failure */
451
 
        strm->ff_fmt_ctx = NULL;
452
 
    }
453
 
 
454
 
    return status;
455
 
}
456
 
 
457
 
 
458
 
/* API: Get frame from stream */
459
 
static pj_status_t ffmpeg_stream_get_frame(pjmedia_vid_dev_stream *s,
460
 
                                           pjmedia_frame *frame)
461
 
{
462
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
463
 
    AVPacket p;
464
 
    int err;
465
 
 
466
 
    err = av_read_frame(strm->ff_fmt_ctx, &p);
467
 
    if (err < 0) {
468
 
        print_ffmpeg_err(err);
469
 
        return PJ_EUNKNOWN;
470
 
    }
471
 
 
472
 
    pj_bzero(frame, sizeof(*frame));
473
 
    frame->type = PJMEDIA_FRAME_TYPE_VIDEO;
474
 
    frame->buf = p.data;
475
 
    frame->size = p.size;
476
 
 
477
 
    return PJ_SUCCESS;
478
 
}
479
 
 
480
 
 
481
 
/* API: Stop stream. */
482
 
static pj_status_t ffmpeg_stream_stop(pjmedia_vid_dev_stream *s)
483
 
{
484
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
485
 
 
486
 
    PJ_LOG(4, (THIS_FILE, "Stopping ffmpeg capture stream"));
487
 
 
488
 
    ffmpeg_capture_close(strm->ff_fmt_ctx);
489
 
    strm->ff_fmt_ctx = NULL;
490
 
 
491
 
    return PJ_SUCCESS;
492
 
}
493
 
 
494
 
 
495
 
/* API: Destroy stream. */
496
 
static pj_status_t ffmpeg_stream_destroy(pjmedia_vid_dev_stream *s)
497
 
{
498
 
    ffmpeg_stream *strm = (ffmpeg_stream*)s;
499
 
 
500
 
    PJ_ASSERT_RETURN(strm != NULL, PJ_EINVAL);
501
 
 
502
 
    ffmpeg_stream_stop(s);
503
 
 
504
 
    pj_pool_release(strm->pool);
505
 
 
506
 
    return PJ_SUCCESS;
507
 
}
508
 
 
509
 
#ifdef _MSC_VER
510
 
#   pragma comment( lib, "avdevice.lib")
511
 
#   pragma comment( lib, "avformat.lib")
512
 
#   pragma comment( lib, "avutil.lib")
513
 
#endif
514
 
 
515
 
 
516
 
#endif  /* PJMEDIA_VIDEO_DEV_HAS_FFMPEG */