diff options
author | Jonas Smedegaard <dr@jones.dk> | 2018-04-30 12:56:52 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2018-04-30 12:56:52 +0200 |
commit | f24295049f4d58e72b05dacc943d4387fd66cbcb (patch) | |
tree | 985816714d70de11b68fab44231110cdc162300d /modules/vidbridge/src.c | |
parent | b7869a262cbca2241c70549af9c877529706c15f (diff) | |
parent | a7fd4a25c8a1e0f292d4922f9261e1756e444a28 (diff) |
New upstream version 0.5.9
Diffstat (limited to 'modules/vidbridge/src.c')
-rw-r--r-- | modules/vidbridge/src.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/vidbridge/src.c b/modules/vidbridge/src.c index 5e7d08a..2ead7cc 100644 --- a/modules/vidbridge/src.c +++ b/modules/vidbridge/src.c @@ -30,11 +30,10 @@ int vidbridge_src_alloc(struct vidsrc_st **stp, const struct vidsrc *vs, struct vidsrc_st *st; int err; (void)ctx; - (void)prm; (void)fmt; (void)errorh; - if (!stp || !size || !frameh) + if (!stp || !prm || !size || !frameh) return EINVAL; st = mem_zalloc(sizeof(*st), destructor); @@ -44,6 +43,7 @@ int vidbridge_src_alloc(struct vidsrc_st **stp, const struct vidsrc *vs, st->vs = vs; st->frameh = frameh; st->arg = arg; + st->fps = prm->fps; err = str_dup(&st->device, dev); if (err) @@ -82,12 +82,15 @@ struct vidsrc_st *vidbridge_src_find(const char *device) } -void vidbridge_src_input(const struct vidsrc_st *st, +void vidbridge_src_input(struct vidsrc_st *st, const struct vidframe *frame) { if (!st || !frame) return; + /* XXX: Read from vidisp input */ + st->timestamp += VIDEO_TIMEBASE / st->fps; + if (st->frameh) - st->frameh((struct vidframe *)frame, st->arg); + st->frameh((struct vidframe *)frame, st->timestamp, st->arg); } |