Skip to content

Commit

Permalink
major re-factoring -- Squashed commit of the following:
Browse files Browse the repository at this point in the history
 * continue version/rev numbering after libltcsmpte
 * started README and Changelog
 * remember sample-posinfo with sample-offset
 * test'n'check
 * whitespace at EOL
 * reworked encoder LPF maths
 * update documentation
 * fix speed and phase tracking
 * remove internal biphase/bit buffers - optimize 1 sample / run
 * LTC-frame variable names
 * refactor API
 * install static lib
 * removed unused local [m4] dir
 * tenative debian packaging
 * cleanup build-system, doc, testcode,..
  • Loading branch information
x42 committed Aug 15, 2012
1 parent 3b26fe0 commit 7e49ef3
Show file tree
Hide file tree
Showing 37 changed files with 3,997 additions and 740 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gitignore export-ignore
.gitattributes export-ignore
debian export-ignore
build-deb.sh export-ignore
release.sh export-ignore
autogen.sh export-ignore
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
cscope.*
tags

configure
INSTALL
stamp-*

Makefile
Makefile.in
config.*
.deps
.libs
*.o
*.lo
*.la

*.swp
tests/ltcdecode
tests/ltcencode
doc/html/

atconfig
depcomp
compile
aclocal.m4
libtool
missing
ltmain.sh
install-sh

autom4te.cache/

ltc.pc
Doxyfile
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2012-Aug-15 Robin Gareus <[email protected]>
refactored libltcsmpte.sf.net into libltc
1,792 changes: 1,792 additions & 0 deletions Doxyfile.in

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ACLOCAL_AMFLAGS= -I m4
SUBDIRS = @subdirs@
EXTRA_DIST=ltc.pc.in Doxyfile.in testdata/smpte.raw COPYING

Expand All @@ -9,6 +8,6 @@ CLEANFILES = stamp-doxygen stamp-doc

dox: stamp-doxygen

stamp-doxygen: src/ltcsmpte/ltc.h doc/mainpage.dox Doxyfile
stamp-doxygen: src/ltc.h doc/mainpage.dox Doxyfile
$(DOXYGEN) Doxyfile
touch stamp-doxygen
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
libLTC
------

Linear (or Longitudinal) Timecode (LTC) is an encoding of SMPTE timecode data
as a Manchester-Biphase encoded audio signal.
The audio signal is commonly recorded on a VTR track or other storage media.

libltc provides functionality to encode and decode LTC audio from/to
SMPTE timecode, including SMPTE date support.
3 changes: 3 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

aclocal && autoheader && libtoolize --copy -f && autoconf && automake --gnu --add-missing --copy -f && ./configure $@
38 changes: 38 additions & 0 deletions build-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

PACKAGE=libltc
DEBRELEASE=$(head -n1 debian/changelog | cut -d ' ' -f 2 | sed 's/[()]*//g')

TMPDIR=/tmp/$PACKAGE-${DEBRELEASE}
rm -rf ${TMPDIR}

GITBRANCH=${GITBRANCH:-master}

echo "debian -export-ignore" >> .git/info/attributes

git-buildpackage \
--git-upstream-branch=$GITBRANCH --git-debian-branch=$GITBRANCH \
--git-upstream-tree=branch \
--git-export-dir=${TMPDIR} --git-cleaner=/bin/true \
--git-force-create \
-rfakeroot $@

ERROR=$?

ed -s .git/info/attributes > /dev/null << EOF
/debian -export-ignore
d
wq
EOF

if test $ERROR != 0; then
exit $ERROR
fi

lintian -i --pedantic ${TMPDIR}/${PACKAGE}_${DEBRELEASE}_*.changes \
| tee /tmp/${PACKAGE}.issues

echo
ls ${TMPDIR}/${PACKAGE}_${DEBRELEASE}_*.changes
echo
echo dput rg42 ${TMPDIR}/${PACKAGE}_${DEBRELEASE}_*.changes
69 changes: 15 additions & 54 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_INIT([libltc], [-], [[email protected]], [], [http://ltcsmpte.sourceforge.net/

AC_PATH_PROG(SED, sed, "", $PATH:/bin:/usr/bin:/usr/local/bin)
if test -z "$SED"; then
AC_MSG_WARN([sed was not found])
AC_MSG_ERROR([sed was not found -- sed is requied to extract version information])
fi

AC_MSG_CHECKING([libltc version])
Expand All @@ -19,17 +19,13 @@ VERSION_AGE=`$SED -ne 's/^#define LIBLTC_AGE\s*\([0-9]*\)/\1/p' ${srcdir}/src/lt
VERSION_INFO=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}

AC_CONFIG_SRCDIR([src/ltc.c])
dnl AC_CONFIG_TESTDIR([tests])
AC_CONFIG_TESTDIR([tests])
AC_CANONICAL_TARGET([])
AC_COPYRIGHT([Copyright (C) Robin Gareus 2007-2012])

AM_INIT_AUTOMAKE(libltc,$VERSION)
AM_CONFIG_HEADER(src/config.h)

AC_SUBST(VERSION)
AC_SUBST(VERSION_INFO)
ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)

AC_CANONICAL_HOST

AC_PROG_INSTALL
Expand All @@ -40,75 +36,42 @@ AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AM_PROG_CC_C_O
AC_LIBTOOL_WIN32_DLL
AC_CONFIG_MACRO_DIR([m4])

dnl *** misc complier/linker flags ***
LIBSMPTE_CFLAGS="-Wall"
LIBSMPTE_LDFLAGS="-export-symbols-regex '^(SMPTE).*'"
LIBLTC_CFLAGS="-Wall"
LIBLTC_LDFLAGS="-export-symbols-regex '^(ltc_).*'"

AC_MSG_CHECKING([if -Wl,--as-needed works])
LFDLAGS_save=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_TRY_LINK([], [],
[
AC_MSG_RESULT([yes])
LIBSMPTE_LDFLAGS="$LIBSMPTE_LDFLAGS -Wl,--as-needed"
LIBLTC_LDFLAGS="$LIBLTC_LDFLAGS -Wl,--as-needed"
],
[AC_MSG_RESULT([no])])
LDFLAGS=$LDFLAGS_save

AC_SUBST(LIBLTC_CFLAGS)
AC_SUBST(LIBLTC_LDFLAGS)

dnl *** configuration options ***
AC_ARG_ENABLE(enable_date, AC_HELP_STRING([--enable-date], [Compile with SMPTE date support (http://www.barney-wol.net/time/timecode.html)]))

AH_TEMPLATE([ENABLE_DATE], [Define as 1 to enabled SMPTE date support])

if test "x${enable_date}" == "xyes"; then
AC_DEFINE(ENABLE_DATE)
else
enable_date=no
fi
dnl *** check for dependencies ***
AC_CHECK_HEADERS(stdio.h stdlib.h string.h unistd.h sys/types.h stdint.h)

AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h stdint.h sys/times.h)

AC_HEADER_MAJOR
AC_FUNC_ALLOCA
AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
AC_FUNC_CLOSEDIR_VOID

dnl *** doxygen ***
dnl *** check for doxygen ***
AC_ARG_VAR(DOXYGEN, Doxygen)
AC_PATH_PROG(DOXYGEN, doxygen, no)

if test "$DOXYGEN" != "no"; then
DOXMAKE='run "make dox" to generate API html reference: doc/html/index.html'
fi

dnl *** graphviz ***
dnl (needed for Doxyfile.in)
AC_ARG_VAR(DOT, The 'dot' program from graphviz)
AC_PATH_PROG(DOT, dot, no)
if test "$DOT" != "no"; then
HAVEDOT=YES
DOTPATH=$( dirname "$DOT" )
else
HAVEDOT=NO
fi
AC_SUBST(HAVEDOT)
AC_SUBST(DOTPATH)
AC_SUBST(GMP_LIBS)
subdirs="src doc tests"


dnl subdirs="src doc tests"
subdirs="src"
AC_SUBST(subdirs)
AC_SUBST(VERSION)
AC_SUBST(VERSION_INFO)
AC_SUBST(LIBLTC_CFLAGS)
AC_SUBST(LIBLTC_LDFLAGS)

dnl AC_OUTPUT(Makefile src/Makefile doc/Makefile tests/Makefile libltc.lsm ltc.pc Doxyfile)
AC_OUTPUT(Makefile src/Makefile ltc.pc)
AC_OUTPUT(Makefile src/Makefile doc/Makefile tests/Makefile ltc.pc Doxyfile)

AC_MSG_NOTICE([
Expand All @@ -121,8 +84,6 @@ AC_MSG_NOTICE([
doxygen: $DOXYGEN
installation prefix: $prefix
SMPTE date support : ${enable_date}
type "make" followed my "make install" as root.
run "make check" to perform selftests.
$DOXMAKE
Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
libltc (0.5.0-1) unstable; urgency=low

* Initial release. (Closes: #NNNNNN).

-- Robin Gareus <[email protected]> Tue, 14 Aug 2012 11:47:35 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
57 changes: 57 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Source: libltc
Section: libs
Priority: optional
Maintainer: Robin Gareus <[email protected]>
Build-Depends:
automake,
autotools-dev,
debhelper (>= 9),
dh-autoreconf,
libtool
Build-Depends-Indep:
doxygen
Standards-Version: 3.9.3
Homepage: https://github.com/x42/libltc
Vcs-Git: git://github.com/x42/libltc.git

Package: libltc-dev
Section: libdevel
Architecture: any
Depends:
libltc2(= ${binary:Version}),
${misc:Depends}
Multi-Arch: same
Description: Development files for libltc
Linear (or Longitudinal) Timecode (LTC) is an encoding of SMPTE timecode data
as a Manchester-Biphase encoded audio signal. The audio signal is commonly
recorded on a VTR track or other storage media.
libltc provides functionality to both encode and decode LTC from/to SMPTE.
.
This package contains files needed for application development.

Package: libltc-doc
Section: doc
Architecture: all
Depends:
${misc:Depends}
Description: Documentation for libltc
Linear (or Longitudinal) Timecode (LTC) is an encoding of SMPTE timecode data
as a Manchester-Biphase encoded audio signal. The audio signal is commonly
recorded on a VTR track or other storage media.
libltc provides functionality to both encode and decode LTC from/to SMPTE.
.
This package contains the API reference (as manpages) for the development of
applications.

Package: libltc2
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends:
${misc:Depends},
${shlibs:Depends}
Multi-Arch: same
Description: linear timecode and framerate conversion library
Linear (or Longitudinal) Timecode (LTC) is an encoding of SMPTE timecode data
as a Manchester-Biphase encoded audio signal. The audio signal is commonly
recorded on a VTR track or other storage media.
libltc provides functionality to both encode and decode LTC from/to SMPTE.
34 changes: 34 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libltc
Upstream-Contact:
Robin Gareus <[email protected]>
Source: git://github.com/x42/libltc.git

Files: *
Copyright:
2006-2012 Robin Gareus <[email protected]>
License: LGPL-3+

Files: src/
Copyright:
2003 Maarten de Boer
2006-2012 Robin Gareus <[email protected]>
2008-2010 Jan Weiß
License: LGPL-3+

License: LGPL-3+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
X-Comment: On Debian systems, the complete text of the GNU Lesser
General Public License can be found in `/usr/share/common-licenses/LGPL-3'.
4 changes: 4 additions & 0 deletions debian/libltc-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/include/*
usr/lib/*/lib*.so
usr/lib/*/lib*.a
usr/lib/*/pkgconfig/*
1 change: 1 addition & 0 deletions debian/libltc-doc.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/man/man3/*.3
1 change: 1 addition & 0 deletions debian/libltc2.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/*/lib*.so.*
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@ --with autoreconf
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
10 changes: 10 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean-local:
rm -f html/*.*
rm -f man/man3/mainpage.dox.3
rm -f man/man3/home_rgareus_data_coding_libltc_src_.3

# install the man pages
man_MANS=man/man3/ltc.h.3

#include them in dist.
EXTRA_DIST=man/man3/ltc.h.3
Binary file added doc/libltc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e49ef3

Please sign in to comment.