Ignore:
Timestamp:
Mar 25, 2011 8:13:43 AM (10 years ago)
Author:
bennylp
Message:

libswscale rearrangement (re #1219/ffmpeg codecs): instantiate libswscale converter from the converter manager instead of having to instantiate it manually in all apps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/converter.c

    r3392 r3487  
    2121#include <pj/errno.h> 
    2222 
     23#define THIS_FILE       "converter.c" 
    2324 
    2425struct pjmedia_converter_mgr 
     
    2930static pjmedia_converter_mgr *converter_manager_instance; 
    3031 
     32#if PJMEDIA_HAS_LIBSWSCALE && PJMEDIA_HAS_LIBAVUTIL 
     33PJ_DECL(pj_status_t) 
     34pjmedia_libswscale_converter_init(pjmedia_converter_mgr *mgr); 
     35#endif 
     36 
     37 
    3138PJ_DEF(pj_status_t) pjmedia_converter_mgr_create(pj_pool_t *pool, 
    3239                                                 pjmedia_converter_mgr **p_mgr) 
    3340{ 
    3441    pjmedia_converter_mgr *mgr; 
     42    pj_status_t status; 
    3543 
    3644    mgr = PJ_POOL_ALLOC_T(pool, pjmedia_converter_mgr); 
     
    3947    if (!converter_manager_instance) 
    4048        converter_manager_instance = mgr; 
     49 
     50#if PJMEDIA_HAS_LIBSWSCALE && PJMEDIA_HAS_LIBAVUTIL 
     51    status = pjmedia_libswscale_converter_init(mgr); 
     52    if (status != PJ_SUCCESS) { 
     53        PJ_PERROR(4,(THIS_FILE, status, 
     54                     "Error initializing libswscale converter")); 
     55    } 
     56#endif 
    4157 
    4258    if (p_mgr) 
Note: See TracChangeset for help on using the changeset viewer.