Ignore:
Timestamp:
Jul 12, 2011 3:05:35 AM (13 years ago)
Author:
bennylp
Message:

Initial implementation of re #1284 (Event Framework). Current event has been converted to the new framework. Next to convert is codec event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia-videodev/videodev.h

    r3592 r3617  
    2626#include <pjmedia-videodev/config.h> 
    2727#include <pjmedia-videodev/errno.h> 
     28#include <pjmedia/event.h> 
    2829#include <pjmedia/frame.h> 
    2930#include <pjmedia/format.h> 
     
    170171/** Forward declaration for pjmedia_vid_dev_stream */ 
    171172typedef struct pjmedia_vid_dev_stream pjmedia_vid_dev_stream; 
    172  
    173 typedef enum pjmedia_event_type 
    174 { 
    175     PJMEDIA_EVENT_NONE, 
    176     PJMEDIA_EVENT_FMT_CHANGED, 
    177     PJMEDIA_EVENT_MOUSEBUTTONDOWN, 
    178     PJMEDIA_EVENT_WINDOW_RESIZE, 
    179     PJMEDIA_EVENT_WINDOW_FULLSCREEN, 
    180     PJMEDIA_EVENT_WINDOW_CLOSE, 
    181 } pjmedia_event_type; 
    182  
    183 typedef struct pjmedia_vid_event 
    184 { 
    185     pjmedia_event_type event_type; 
    186     union { 
    187         struct resize_event { 
    188             pjmedia_rect_size new_size; 
    189         } resize; 
    190         struct fmt_changed_event { 
    191             pjmedia_format new_format; 
    192         } fmt_change; 
    193     } event_desc; 
    194 } pjmedia_vid_event; 
    195  
    196173 
    197174typedef struct pjmedia_vid_cb 
     
    235212                             pjmedia_frame *frame); 
    236213 
    237     /** 
    238     * This callback is called by the stream to report the occurence of an 
    239     * event to the application. 
    240     * 
    241     * @param stream        The video stream. 
    242     * @param user_data     User data associated with the stream. 
    243     * @param event         The event. 
    244     * 
    245     * @return              Return PJ_SUCCESS will invoke the video stream's 
    246     *                      default event-handler (if any), otherwise the 
    247     *                      video stream will ignore the particular event. 
    248     */ 
    249     pj_status_t (*on_event_cb)(pjmedia_vid_dev_stream *stream, 
    250                                void *user_data, 
    251                                pjmedia_vid_event *event); 
    252  
    253214} pjmedia_vid_cb; 
    254215 
     
    598559                                            pjmedia_vid_dev_stream *strm); 
    599560 
     561/** 
     562 * Get the event publisher object for the video stream. Caller typically use 
     563 * the returned object to subscribe or unsubscribe events from the video 
     564 * stream. 
     565 * 
     566 * @param strm      The video stream. 
     567 * 
     568 * @return          The event publisher object. 
     569 */ 
     570PJ_DECL(pjmedia_event_publisher*) 
     571pjmedia_vid_dev_stream_get_event_publisher(pjmedia_vid_dev_stream *strm); 
     572 
    600573/* Get/put frame API for passive stream */ 
    601574PJ_DECL(pj_status_t) pjmedia_vid_dev_stream_get_frame( 
Note: See TracChangeset for help on using the changeset viewer.