5 | | == Event Types == |
| 5 | {{{ |
| 6 | typedef enum pjmedia_event_type |
| 7 | { |
| 8 | PJMEDIA_EVENT_NONE, |
| 9 | PJMEDIA_EVENT_FMT_CHANGED, |
| 10 | PJMEDIA_EVENT_WND_CLOSING, |
| 11 | PJMEDIA_EVENT_WND_CLOSED, |
| 12 | PJMEDIA_EVENT_WND_RESIZED, |
| 13 | PJMEDIA_EVENT_MOUSE_BTN_DOWN, |
| 14 | PJMEDIA_EVENT_KEY_FRAME_FOUND, |
| 15 | PJMEDIA_EVENT_KEY_FRAME_MISSING, |
| 16 | PJMEDIA_EVENT_USER = 100 |
| 17 | } pjmedia_event_type; |
9 | | All event types carry these information: |
10 | | - source |
11 | | - timestamp |
| 26 | union { |
| 27 | pjmedia_event_fmt_changed_data fmt_changed; |
| 28 | pjmedia_event_wnd_resized_data wnd_resized; |
| 29 | pjmedia_event_wnd_closing_data wnd_closing; |
| 30 | pjmedia_event_wnd_closed_data wnd_closed; |
| 31 | pjmedia_event_mouse_btn_down_data mouse_btn_down; |
| 32 | pjmedia_event_key_frame_found_data key_frm_found; |
| 33 | pjmedia_event_key_frame_missing_data key_frm_missing; |
| 34 | pjmedia_event_user_data user; |
| 35 | void *ptr; |
| 36 | } data; |
| 37 | } pjmedia_event; |
21 | | '''Format change''' |
| 54 | PJ_DECL(void) pjmedia_event_init(pjmedia_event *event, |
| 55 | pjmedia_event_type type, |
| 56 | const pj_timestamp *ts, |
| 57 | const pjmedia_event_publisher *epub); |
| 58 | PJ_DECL(void) pjmedia_event_publisher_init(pjmedia_event_publisher *epub); |
| 59 | PJ_DECL(void) pjmedia_event_subscription_init(pjmedia_event_subscription *esub, |
| 60 | pjmedia_event_cb *cb, |
| 61 | void *user_data); |
| 62 | PJ_DECL(pj_status_t) pjmedia_event_subscribe(pjmedia_event_publisher *epub, |
| 63 | pjmedia_event_subscription *esub); |
| 64 | PJ_DECL(pj_status_t) pjmedia_event_unsubscribe(pjmedia_event_publisher *epub, |
| 65 | pjmedia_event_subscription *esub); |
| 66 | PJ_DECL(pj_status_t) pjmedia_event_publish(pjmedia_event_publisher *epub, |
| 67 | pjmedia_event *event); |
| 68 | PJ_DECL(pj_status_t) pjmedia_event_republish(pjmedia_event_publisher *esrc, |
| 69 | pjmedia_event_publisher *epub, |
| 70 | pjmedia_event_subscription *esub); |
23 | | ||Description: ||notify that video format has changed. This includes change in video size. || |
24 | | ||Producer(s): ||codec|| |
25 | | ||Direction: ||decoding|| |
26 | | ||Parameters:|| new format || |
27 | | |
28 | | '''Missing key frame''' |
29 | | |
30 | | ||Description: ||notify that key frame is needed|| |
31 | | ||Producer(s): ||codec|| |
32 | | ||Direction: ||decoding|| |
33 | | ||Parameters:|| || |
34 | | |
35 | | '''Video window closed''' |
36 | | |
37 | | ||Description: ||notify that video window has been closed|| |
38 | | ||Producer(s): ||renderer|| |
39 | | ||Direction: ||decoding|| |
40 | | ||Parameters:|| || |
41 | | |
42 | | '''Mouse button down''' |
43 | | |
44 | | ||Description: ||notify that mouse button has been pressed|| |
45 | | ||Producer(s): ||renderer window|| |
46 | | ||Direction: ||decoding|| |
47 | | ||Parameters:|| || |
48 | | |
49 | | == Source Types == |
50 | | |
51 | | - codec |
52 | | - video device |
53 | | |
| 72 | }}} |