summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-videodev/sdl_dev.c
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2011-12-01 10:49:07 +0000
committerLiong Sauw Ming <ming@teluu.com>2011-12-01 10:49:07 +0000
commitc04000a192a00f047ea6d04e131e42f0b72bc11b (patch)
treea3f1a4ba2cd467087640c5cb2bd9509570c5acff /pjmedia/src/pjmedia-videodev/sdl_dev.c
parent5a41db1f3ba90b676e9485a15841e5fec656ed58 (diff)
Closed #1420: Add support for event manager
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3893 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-videodev/sdl_dev.c')
-rw-r--r--pjmedia/src/pjmedia-videodev/sdl_dev.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/pjmedia/src/pjmedia-videodev/sdl_dev.c b/pjmedia/src/pjmedia-videodev/sdl_dev.c
index 465e37b5..109b22bd 100644
--- a/pjmedia/src/pjmedia-videodev/sdl_dev.c
+++ b/pjmedia/src/pjmedia-videodev/sdl_dev.c
@@ -308,7 +308,7 @@ static struct sdl_stream* find_stream(struct sdl_factory *sf,
if (strm)
pjmedia_event_init(pevent, PJMEDIA_EVENT_NONE, &strm->last_ts,
- &strm->base.epub);
+ strm);
return strm;
}
@@ -354,7 +354,7 @@ static pj_status_t handle_event(void *data)
if (strm && pevent.type != PJMEDIA_EVENT_NONE) {
pj_status_t status;
- pjmedia_event_publish(&strm->base.epub, &pevent);
+ pjmedia_event_publish(NULL, strm, &pevent, 0);
switch (pevent.type) {
case PJMEDIA_EVENT_WND_RESIZED:
@@ -375,9 +375,8 @@ static pj_status_t handle_event(void *data)
sdl_stream_stop(&strm->base);
sdl_destroy_all(strm);
pjmedia_event_init(&pevent, PJMEDIA_EVENT_WND_CLOSED,
- &strm->last_ts,
- &strm->base.epub);
- pjmedia_event_publish(&strm->base.epub, &pevent);
+ &strm->last_ts, strm);
+ pjmedia_event_publish(NULL, strm, &pevent, 0);
/*
* Note: don't access the stream after this point, it
@@ -916,7 +915,6 @@ static pj_status_t sdl_factory_create_stream(
strm->sf = sf;
pj_memcpy(&strm->vid_cb, cb, sizeof(*cb));
strm->user_data = user_data;
- pjmedia_event_publisher_init(&strm->base.epub, PJMEDIA_SIG_VID_DEV_SDL);
/* Create render stream here */
if (param->dir & PJMEDIA_DIR_RENDER) {