Hello community, here is the log from the commit of package libltc for openSUSE:Factory checked in at 2020-09-23 18:48:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libltc (Old) and /work/SRC/openSUSE:Factory/.libltc.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libltc" Wed Sep 23 18:48:33 2020 rev:4 rq:836323 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libltc/libltc.changes 2018-07-18 22:54:59.422751890 +0200 +++ /work/SRC/openSUSE:Factory/.libltc.new.4249/libltc.changes 2020-09-23 18:49:09.301804566 +0200 @@ -1,0 +2,7 @@ +Mon Sep 14 10:54:24 UTC 2020 - Dirk Mueller <[email protected]> + +- update to 1.3.1: + * Added methods to write and read numbers from user bytes + * Fix compilation for Ardunio/AVR (missing rint) + +------------------------------------------------------------------- Old: ---- libltc-1.3.0.tar.gz New: ---- libltc-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libltc.spec ++++++ --- /var/tmp/diff_new_pack.lwdF1b/_old 2020-09-23 18:49:10.253805441 +0200 +++ /var/tmp/diff_new_pack.lwdF1b/_new 2020-09-23 18:49:10.257805445 +0200 @@ -1,7 +1,7 @@ # # spec file for package libltc # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define sover 11 Name: libltc -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: Linear/longitudinal timecode library License: LGPL-3.0-or-later ++++++ libltc-1.3.0.tar.gz -> libltc-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libltc-1.3.0/ChangeLog new/libltc-1.3.1/ChangeLog --- old/libltc-1.3.0/ChangeLog 2016-12-23 04:46:25.000000000 +0100 +++ new/libltc-1.3.1/ChangeLog 2019-04-04 03:35:01.000000000 +0200 @@ -1,3 +1,7 @@ +2019-04-04 (v1.3.1) Robin Gareus <[email protected]> +* Added methods to write and read numbers from user bytes +* Fix compilation for Ardunio/AVR (missing rint) + 2016-12-23 (v1.3.0) Robin Gareus <[email protected]> * fix potential offset overflow (user provided relative position) * further improve MSVC compatibility (-infinity) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libltc-1.3.0/doc/man/man3/ltc.h.3 new/libltc-1.3.1/doc/man/man3/ltc.h.3 --- old/libltc-1.3.0/doc/man/man3/ltc.h.3 2016-12-23 04:46:33.000000000 +0100 +++ new/libltc-1.3.1/doc/man/man3/ltc.h.3 2019-04-04 03:37:31.000000000 +0200 @@ -1,4 +1,4 @@ -.TH "ltc.h" 3 "Fri Dec 23 2016" "Version 1.3.0" "libltc" \" -*- nroff -*- +.TH "ltc.h" 3 "Thu Apr 4 2019" "Version 1.3.1" "libltc" \" -*- nroff -*- .ad l .nh .SH NAME @@ -125,6 +125,12 @@ .RI "void \fBltc_encoder_get_timecode\fP (\fBLTCEncoder\fP *e, \fBSMPTETimecode\fP *t)" .br .ti -1c +.RI "void \fBltc_encoder_set_user_bits\fP (\fBLTCEncoder\fP *e, unsigned long data)" +.br +.ti -1c +.RI "unsigned long \fBltc_frame_get_user_bits\fP (\fBLTCFrame\fP *f)" +.br +.ti -1c .RI "int \fBltc_encoder_inc_timecode\fP (\fBLTCEncoder\fP *e)" .br .ti -1c @@ -934,6 +940,19 @@ \fBExamples: \fP .in +1c \fBexample_encode\&.c\fP, and \fBltcencode\&.c\fP\&. +.SS "void ltc_encoder_set_user_bits (\fBLTCEncoder\fP * e, unsigned long data)" +Set the user-bits of the frame to the given data\&. +.PP +The data should be a 32-bits unsigned integer\&. It is written LSB first continiously int the eight user fields\&. +.PP +\fBParameters:\fP +.RS 4 +\fIe\fP encoder handle +.br +\fIdata\fP the data to write +.RE +.PP + .SS "int ltc_encoder_set_volume (\fBLTCEncoder\fP * e, double dBFS)" Set the volume of the generated LTC signal .PP @@ -1000,6 +1019,15 @@ .RE .PP +.SS "unsigned long ltc_frame_get_user_bits (\fBLTCFrame\fP * f)" +Get a 32-bits unsigned integer from the user-data bits\&. The data should be written LSB first in the frame +.PP +\fBParameters:\fP +.RS 4 +\fIe\fP encoder handle +.RE +.PP + .SS "int ltc_frame_increment (\fBLTCFrame\fP * frame, int fps, enum \fBLTC_TV_STANDARD\fP standard, int flags)" Increment the timecode by one Frame (1/framerate seconds) and set the Frame's parity bit accordingly (see \fBltc_frame_set_parity\fP) .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libltc-1.3.0/src/config.h new/libltc-1.3.1/src/config.h --- old/libltc-1.3.0/src/config.h 2016-12-23 04:46:33.000000000 +0100 +++ new/libltc-1.3.1/src/config.h 2019-04-04 03:36:54.000000000 +0200 @@ -65,4 +65,4 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.3.0" +#define VERSION "1.3.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libltc-1.3.0/src/ltc.c new/libltc-1.3.1/src/ltc.c --- old/libltc-1.3.0/src/ltc.c 2016-04-30 20:54:13.000000000 +0200 +++ new/libltc-1.3.1/src/ltc.c 2019-04-04 03:29:27.000000000 +0200 @@ -27,7 +27,7 @@ #include "decoder.h" #include "encoder.h" -#if (defined _MSC_VER && _MSC_VER < 1800) +#if (defined _MSC_VER && _MSC_VER < 1800) || (defined __AVR__) static double rint(double v) { // NB. this is identical to round(), not rint(), but the difference is not relevant here return floor(v + 0.5); @@ -268,6 +268,46 @@ ltc_time_to_frame(&e->f, t, e->standard, e->flags); } +void ltc_encoder_set_user_bits(LTCEncoder *e, unsigned long data){ + LTCFrame *f = &(e->f); + f->user1 = data & 0xF; + data >>= 4; + f->user2 = data & 0xF; + data >>= 4; + f->user3 = data & 0xF; + data >>= 4; + f->user4 = data & 0xF; + data >>= 4; + f->user5 = data & 0xF; + data >>= 4; + f->user6 = data & 0xF; + data >>= 4; + f->user7 = data & 0xF; + data >>= 4; + f->user8 = data & 0xF; + data >>= 4; +} + +unsigned long ltc_frame_get_user_bits(LTCFrame *f){ + unsigned long data = 0; + data += f->user8; + data <<= 4; + data += f->user7; + data <<= 4; + data += f->user6; + data <<= 4; + data += f->user5; + data <<= 4; + data += f->user4; + data <<= 4; + data += f->user3; + data <<= 4; + data += f->user2; + data <<= 4; + data += f->user1; + return data; +} + void ltc_encoder_get_frame(LTCEncoder *e, LTCFrame *f) { memcpy(f, &e->f, sizeof(LTCFrame)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libltc-1.3.0/src/ltc.h new/libltc-1.3.1/src/ltc.h --- old/libltc-1.3.0/src/ltc.h 2016-12-23 04:46:01.000000000 +0100 +++ new/libltc-1.3.1/src/ltc.h 2019-04-04 03:33:34.000000000 +0200 @@ -63,17 +63,17 @@ #ifndef DOXYGEN_IGNORE /* libltc version */ -#define LIBLTC_VERSION "1.3.0" +#define LIBLTC_VERSION "1.3.1" #define LIBLTC_VERSION_MAJOR 1 #define LIBLTC_VERSION_MINOR 3 -#define LIBLTC_VERSION_MICRO 0 +#define LIBLTC_VERSION_MICRO 1 /* interface revision number * http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html */ -#define LIBLTC_CUR 11 -#define LIBLTC_REV 5 -#define LIBLTC_AGE 0 +#define LIBLTC_CUR 12 +#define LIBLTC_REV 0 +#define LIBLTC_AGE 1 #endif /* end DOXYGEN_IGNORE */ /** @@ -540,6 +540,26 @@ void ltc_encoder_get_timecode(LTCEncoder *e, SMPTETimecode *t); /** +* Set the user-bits of the frame to the given data. +* +* The data should be a 32-bits unsigned integer. +* It is written LSB first continiously int the eight user fields. +* +* @param e encoder handle +* @param data the data to write +*/ +void ltc_encoder_set_user_bits(LTCEncoder *e, unsigned long data); + +/** +* Get a 32-bits unsigned integer from the user-data bits. +* The data should be written LSB first in the frame +* +* @param e encoder handle +*/ + +unsigned long ltc_frame_get_user_bits(LTCFrame *f); + +/** * Move the encoder to the next timecode frame. * uses \ref ltc_frame_increment() internally. */
