Ignore:
Timestamp:
Apr 10, 2014 10:01:07 AM (8 years ago)
Author:
bennylp
Message:

Re #1758: Initial implementation of OpenH264 wrapper. Supports:

  • library detection via autoconf
  • CBP
  • packetization modes: 0, 1
  • key frame request and indication
  • obey remote's fmtp

Also added video codec test in samples (similar to the one in pjmedia test though).
And there are some fixes here and there too (e.g. in vid_codec_util.c).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/test/vid_codec_test.c

    r4537 r4815  
    1818 */ 
    1919#include "test.h" 
    20 #include <pjmedia-codec/ffmpeg_vid_codecs.h> 
     20#include <pjmedia-codec.h> 
    2121#include <pjmedia-videodev/videodev.h> 
    2222#include <pjmedia/vid_codec.h> 
     
    298298        codec_param.packing = packing; 
    299299 
     300        /* Don't apply SDP fmtp */ 
     301        codec_param.ignore_fmtp = PJ_TRUE; 
     302 
    300303        /* Open codec */ 
    301304        status = pjmedia_vid_codec_mgr_alloc_codec(NULL, codec_info, 
     
    454457        return -10; 
    455458 
     459#if PJMEDIA_HAS_VIDEO && PJMEDIA_HAS_OPENH264_CODEC 
     460    status = pjmedia_codec_openh264_vid_init(NULL, mem); 
     461    if (status != PJ_SUCCESS) { 
     462        return -22; 
     463    } 
     464#endif 
     465 
    456466#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    457467    status = pjmedia_codec_ffmpeg_vid_init(NULL, mem); 
     
    464474        goto on_return; 
    465475 
     476#if PJMEDIA_HAS_FFMPEG_VID_CODEC 
    466477    rc = encode_decode_test(pool, "h263-1998", PJMEDIA_VID_PACKING_WHOLE); 
    467478    if (rc != 0) 
     
    471482    if (rc != 0) 
    472483        goto on_return; 
     484#endif 
     485 
     486#if PJMEDIA_HAS_FFMPEG_VID_CODEC || PJMEDIA_HAS_OPENH264_CODEC 
     487    rc = encode_decode_test(pool, "h264", PJMEDIA_VID_PACKING_WHOLE); 
     488    if (rc != 0) 
     489        goto on_return; 
     490 
     491    rc = encode_decode_test(pool, "h264", PJMEDIA_VID_PACKING_PACKETS); 
     492    if (rc != 0) 
     493        goto on_return; 
     494#endif 
     495 
    473496 
    474497on_return: 
     
    476499    pjmedia_codec_ffmpeg_vid_deinit(); 
    477500#endif 
     501#if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 
     502    pjmedia_codec_openh264_vid_deinit(); 
     503#endif 
    478504    pjmedia_vid_dev_subsys_shutdown(); 
    479505    pj_pool_release(pool); 
Note: See TracChangeset for help on using the changeset viewer.