diff options
author | deva <deva> | 2006-08-12 15:00:40 +0000 |
---|---|---|
committer | deva <deva> | 2006-08-12 15:00:40 +0000 |
commit | 49265541974282f3346c9dc7de2365858f9fcb4d (patch) | |
tree | 0861c3b9bdb9d64a7c68674c4f864171a26eed18 /lib/libdv_wrapper.cc | |
parent | a145483e4f59ae76b28657cefd1b1e72fe5e4e2c (diff) |
Added timecode and fixed the sending and receiving of frames through the network.
Diffstat (limited to 'lib/libdv_wrapper.cc')
-rw-r--r-- | lib/libdv_wrapper.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/libdv_wrapper.cc b/lib/libdv_wrapper.cc index a056419..e178ee3 100644 --- a/lib/libdv_wrapper.cc +++ b/lib/libdv_wrapper.cc @@ -142,7 +142,6 @@ Frame *LibDVWrapper::decode(Frame *input, DV::ColorSpace c) break; } - dv_decode_full_frame(decoder, (const uint8_t*)input->vframe, (dv_color_space_t)colorspace, @@ -150,6 +149,29 @@ Frame *LibDVWrapper::decode(Frame *input, DV::ColorSpace c) pitches); Frame *frame = new Frame(buf, size, type, NULL, 0, AF_NONE); + + frame->timecode = getTimeCode(); + return frame; } +TimeCode LibDVWrapper::getTimeCode() +{ + TimeCode timecode; + int timestamp[4]; + + dv_get_timestamp_int(decoder, timestamp); + + timecode.hour = timestamp[0]; + timecode.min = timestamp[1]; + timecode.sec = timestamp[2]; + timecode.frame = timestamp[3]; + /* + fprintf(stderr, "%d %d %d %d\n", + timecode.hour, + timecode.min, + timecode.sec, + timecode.frame); + */ + return timecode; +} |