Changeset 3675


Ignore:
Timestamp:
Jul 22, 2011 4:49:36 AM (13 years ago)
Author:
nanang
Message:

Re #1332: Added type definition of video window handle.

Location:
pjproject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia-videodev/videodev.h

    r3664 r3675  
    4545 */ 
    4646typedef pj_int32_t pjmedia_vid_dev_index; 
     47 
     48/** 
     49 * Enumeration of window handle type. 
     50 */ 
     51typedef enum pjmedia_vid_dev_hwnd_type 
     52{ 
     53    /** 
     54     * Type none. 
     55     */ 
     56    PJMEDIA_VID_DEV_HWND_TYPE_NONE, 
     57 
     58    /** 
     59     * Native window handle on Windows. 
     60     */ 
     61    PJMEDIA_VID_DEV_HWND_TYPE_WINDOWS 
     62 
     63} pjmedia_vid_dev_hwnd_type; 
     64 
     65/** 
     66 * Type for window handle. 
     67 */ 
     68typedef struct pjmedia_vid_dev_hwnd 
     69{ 
     70    /** 
     71     * The window handle type. 
     72     */ 
     73    pjmedia_vid_dev_hwnd_type type; 
     74 
     75    /** 
     76     * The window handle. 
     77     */ 
     78    union 
     79    { 
     80        void        *ptr;       /**< Pointer value      */ 
     81        int          fd;        /**< Descriptor value   */ 
     82    } hwnd; 
     83 
     84} pjmedia_vid_dev_hwnd; 
    4785 
    4886/** 
     
    268306     * the flags. 
    269307     */ 
    270     void *window; 
     308    pjmedia_vid_dev_hwnd window; 
    271309 
    272310    /** 
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c

    r3667 r3675  
    511511        if (strm->param.flags & PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW) { 
    512512            /* Use the window supplied by the application. */ 
    513             strm->window = SDL_CreateWindowFrom(strm->param.window); 
     513            strm->window = SDL_CreateWindowFrom(strm->param.window.hwnd.ptr); 
    514514        } else { 
    515515            /* Create the window where we will draw. */ 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r3664 r3675  
    54575457{ 
    54585458    /** 
     5459     * Native window handle. 
     5460     */ 
     5461    pjmedia_vid_dev_hwnd hwnd; 
     5462 
     5463    /** 
    54595464     * Window show status. The window is hidden if false. 
    54605465     */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r3664 r3675  
    950950    } 
    951951 
     952    wi->hwnd = vparam.window; 
    952953    wi->show = !vparam.window_hide; 
    953954    wi->pos  = vparam.window_pos; 
Note: See TracChangeset for help on using the changeset viewer.