diff --git a/Makefile b/Makefile index bc13c8a..48a2619 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,8 @@ INSTALL_PROGRAM=$(INSTALL) -m 0555 -s INSTALL_LIB=$(INSTALL) -m 0444 -s INSTALL_DATA=$(INSTALL) -m 0444 +TSTOOLS_VERSION=1.13 +TSTOOLS_LIB_VERSION=1 ifdef CROSS_COMPILE CC = $(CROSS_COMPILE)gcc @@ -98,8 +100,8 @@ else ARCH_FLAGS = -fPIC endif -CFLAGS = $(WARNING_FLAGS) $(OPTIMISE_FLAGS) $(LFS_FLAGS) -I. $(PROFILE_FLAGS) $(ARCH_FLAGS) -LDFLAGS = -g $(PROFILE_FLAGS) $(ARCH_FLAGS) -lm +CFLAGS += $(WARNING_FLAGS) $(OPTIMISE_FLAGS) $(LFS_FLAGS) -I. $(PROFILE_FLAGS) $(ARCH_FLAGS) -DTSTOOLS_VERSION=$(TSTOOLS_VERSION) +LDFLAGS += -g $(PROFILE_FLAGS) $(ARCH_FLAGS) -lm # Target directories OBJDIR = obj @@ -232,7 +234,7 @@ $(STATIC_LIB): $(OBJS) ar rc $(STATIC_LIB) $(OBJS) $(SHARED_LIB): $(OBJS) - $(LD) -shared -o $(SHARED_LIB) $(OBJS) -lc + $(LD) -shared -soname $(SHARED_LIB_NAME).$(TSTOOLS_LIB_VERSION) -o $(SHARED_LIB) $(OBJS) -lc -lm endif # Build all of the utilities with the static library, so that they can @@ -463,6 +465,7 @@ uninstall-man: rm -f $(DESTDIR)$(man1dir)/tsdvbsub$(manext) rm -f $(DESTDIR)$(man1dir)/rtp2264$(manext) +# Shared lib not installed currently .PHONY: install-prog install-prog: all $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) $(BINDIR)/esfilter $(DESTDIR)$(bindir)/esfilter @@ -486,7 +489,6 @@ install-prog: all $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) $(BINDIR)/tsfilter $(DESTDIR)$(bindir)/tsfilter $(INSTALL_PROGRAM) $(BINDIR)/tsdvbsub $(DESTDIR)$(bindir)/tsdvbsub $(INSTALL_PROGRAM) $(BINDIR)/rtp2264 $(DESTDIR)$(bindir)/rtp2264 - $(INSTALL_LIB) $(SHARED_LIB) $(DESTDIR)$(libdir)/$(SHARED_LIB_NAME) .PHONY: uninstall-prog uninstall-prog: @@ -511,7 +513,6 @@ uninstall-prog: rm -f $(DESTDIR)$(bindir)/tsfilter rm -f $(DESTDIR)$(bindir)/tsdvbsub rm -f $(DESTDIR)$(bindir)/rtp2264 - rm -f $(DESTDIR)$(libdir)/$(SHARED_LIB_NAME) .PHONY: install install: install-man install-prog @@ -543,6 +544,18 @@ clean: objclean .PHONY: distclean distclean: clean -rm -rf $(OBJDIR) $(LIBDIR) $(BINDIR) + rm -f debian/files debian/tstools.* + rm -rf debian/tstools + +.PHONY: dist +dist: distclean + ln -snf `pwd` ../tstools-$(TSTOOLS_VERSION) + tar czhf ../tstools-$(TSTOOLS_VERSION).tar.gz ../tstools-$(TSTOOLS_VERSION) + +.PHONY: dist-debian +dist-debian: dist + ln -snf tstools-$(TSTOOLS_VERSION).tar.gz ../tstools_$(TSTOOLS_VERSION).orig.tar.gz + debuild -uc -us TESTDATAFILE = /data/video/CVBt_hp_trail.264 diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..aa45d89 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1 @@ +tstools/ diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..3491943 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,17 @@ +tstools (1.13-1) saucy; urgency=low + + * Update to current *** Fake bug no for lintian *** (Closes: #905304) + + -- John Cox Thu, 29 Oct 2015 15:47:39 +0000 + +tstools (1.11-1ubuntu1) oneiric; urgency=low + + * Fix FTBFS on Ubuntu 11.10 (LP: #832801). + + -- Stephen M. Webb Mon, 12 Sep 2011 15:58:15 -0400 + +tstools (1.11-1) unstable; urgency=low + + * Initial release (Closes: #505304) + + -- Lorenzo Granai Tue, 11 Nov 2008 15:47:39 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ad65cff --- /dev/null +++ b/debian/control @@ -0,0 +1,37 @@ +Source: tstools +Section: utils +Priority: optional +Maintainer: John Cox +Build-Depends: debhelper (>= 9.0.0) +Standards-Version: 3.9.5 +Homepage: https://github.com/kynesim/tstools.git +Vcs-Git: https://github.com/kynesim/tstools.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/tstools.git;a=summary + +Package: tstools +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: set of tools for reporting on and manipulating MPEG data + TStools is a set of cross-platform command line tools for working with MPEG + data. + . + The emphasis is on relatively simple tools which concentrate on MPEG (H.264 + and H.262) data packaged according to H.222 (i.e., TS or PS), with a particular + interest in checking for conformance. + . + Transport Stream (TS) is typically used for distribution of cable and + satellite data. Program Stream (PS) is typically used to store data on DVDs. + . + The tools are focussed on: + * Quick reporting of useful data (tsinfo, stream_type) + * Giving a quick overview of the entities in the stream (esdots, psdots) + * Reporting on TS packets (tsreport) or ES units/frames/fields (esreport) + * Simple manipulation of stream data (es2ts, esfilter, esreverse, esmerge, + ts2es) + * Streaming of data, possibly with introduced errors (tsplay) + +#Package: tstools-doc +#Architecture: all +#Depends: ${shlibs:Depends}, ${misc:Depends} +#Description: documentation for tstools +# The documentation for tstools diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..988f9a7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,17 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: tstools +Source: https://github.com/kynesim/tstools.git + +Files: * +Copyright: 2015, + 2015, Amino Communications Ltd. +License: MPL-1.1 + The contents of this file are subject to the Mozilla Public License Version + 1.1 (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + . + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the + License. diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..83d1e69 --- /dev/null +++ b/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# There must be a better way of doing this... +override_dh_auto_install: + dh_auto_install -- prefix=/usr mandir=/usr/share/man + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/docs/mdoc/es2ts.1 b/docs/mdoc/es2ts.1 index de1e998..32e231d 100644 --- a/docs/mdoc/es2ts.1 +++ b/docs/mdoc/es2ts.1 @@ -118,4 +118,3 @@ Force the program to treat the input as AVS. For the moment, the video input must be H.264 or AVS, and the audio input ADTS, AC-3 ATSC or MPEG layer 2. Also, the audio is assumed to have a constant number of samples per frame. - diff --git a/docs/mdoc/esreverse.1 b/docs/mdoc/esreverse.1 index 495dbc0..6f9451b 100644 --- a/docs/mdoc/esreverse.1 +++ b/docs/mdoc/esreverse.1 @@ -108,4 +108,3 @@ Force the program to treat the input as MPEG-2. .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/m2ts2ts.1 b/docs/mdoc/m2ts2ts.1 index dbb39d5..df9c7e2 100644 --- a/docs/mdoc/m2ts2ts.1 +++ b/docs/mdoc/m2ts2ts.1 @@ -72,4 +72,3 @@ Number of TS packets to buffer for reordering .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/pcapreport.1 b/docs/mdoc/pcapreport.1 index 4c74f64..ac8a2d6 100644 --- a/docs/mdoc/pcapreport.1 +++ b/docs/mdoc/pcapreport.1 @@ -30,7 +30,6 @@ .Op Fl times | Fl t .Op Fl skew-discontinuity-threshold Ar threshold | Fl skew Ar threshold .Ar file - .Sh DESCRIPTION Report and/or extract the Transport Streams in a .pcap. In analyse mode ( .Fl a @@ -149,6 +148,7 @@ a 10sec (max 1024 samples) period. This should be long enough to capture a good baseline but short enough that drift has a negligible effect .It Max Jitter The maximum value of jitter (see above) found in a section +.El .\" The following cnds should be uncommented and .\" used where appropriate. .\" .Sh IMPLEMENTATION NOTES diff --git a/docs/mdoc/ps2ts.1 b/docs/mdoc/ps2ts.1 index b93ced8..f7a5934 100644 --- a/docs/mdoc/ps2ts.1 +++ b/docs/mdoc/ps2ts.1 @@ -190,5 +190,3 @@ Use stream type 0x81 .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - - diff --git a/docs/mdoc/psdots.1 b/docs/mdoc/psdots.1 index 4a43f0a..5adcf9f 100644 --- a/docs/mdoc/psdots.1 +++ b/docs/mdoc/psdots.1 @@ -60,4 +60,3 @@ Maximum number of PS packets to read .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/psreport.1 b/docs/mdoc/psreport.1 index 9470086..1eef5c2 100644 --- a/docs/mdoc/psreport.1 +++ b/docs/mdoc/psreport.1 @@ -70,4 +70,3 @@ other audio in a specialised manner in private_stream_1. .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/rtp2264.1 b/docs/mdoc/rtp2264.1 index 615accb..ab44b4c 100644 --- a/docs/mdoc/rtp2264.1 +++ b/docs/mdoc/rtp2264.1 @@ -49,4 +49,3 @@ then written at the start of the out_file .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/stream_type.1 b/docs/mdoc/stream_type.1 index 42589a3..af566e6 100644 --- a/docs/mdoc/stream_type.1 +++ b/docs/mdoc/stream_type.1 @@ -93,5 +93,3 @@ if some error occurred .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - - diff --git a/docs/mdoc/ts2es.1 b/docs/mdoc/ts2es.1 index 6ecf61a..99535d5 100644 --- a/docs/mdoc/ts2es.1 +++ b/docs/mdoc/ts2es.1 @@ -87,4 +87,3 @@ Does not support .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/ts_packet_insert.1 b/docs/mdoc/ts_packet_insert.1 index e39fd68..a2ccad3 100644 --- a/docs/mdoc/ts_packet_insert.1 +++ b/docs/mdoc/ts_packet_insert.1 @@ -72,4 +72,3 @@ ts_packet_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/tsdvbsub.1 b/docs/mdoc/tsdvbsub.1 index 3ea6d5e..a449a29 100644 --- a/docs/mdoc/tsdvbsub.1 +++ b/docs/mdoc/tsdvbsub.1 @@ -79,4 +79,3 @@ Maximum number of TS packets to read .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/tsfilter.1 b/docs/mdoc/tsfilter.1 index 27e0b67..aaf672d 100644 --- a/docs/mdoc/tsfilter.1 +++ b/docs/mdoc/tsfilter.1 @@ -35,6 +35,7 @@ applying it - the output contains only pids not in the list up to max packets and all packets in the input from then on. +.El .\" The following cnds should be uncommented and .\" used where appropriate. .\" .Sh IMPLEMENTATION NOTES @@ -59,4 +60,3 @@ on. .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/tsinfo.1 b/docs/mdoc/tsinfo.1 index 3249e85..6640820 100644 --- a/docs/mdoc/tsinfo.1 +++ b/docs/mdoc/tsinfo.1 @@ -68,4 +68,3 @@ is expected .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/tsplay.1 b/docs/mdoc/tsplay.1 index 27fc8bd..bc1a917 100644 --- a/docs/mdoc/tsplay.1 +++ b/docs/mdoc/tsplay.1 @@ -86,7 +86,8 @@ Maximum number of TS/PS packets to read. See -details for more information. .It Fl loop Play the input file repeatedly. Can be combined with -Fl max . +.Fl max . +.El .\" The following cnds should be uncommented and .\" used where appropriate. .\" .Sh IMPLEMENTATION NOTES @@ -112,4 +113,3 @@ Fl max . .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/docs/mdoc/tsreport.1 b/docs/mdoc/tsreport.1 index 9c18c98..9666ea2 100644 --- a/docs/mdoc/tsreport.1 +++ b/docs/mdoc/tsreport.1 @@ -134,5 +134,3 @@ PID 0 is allowed (i.e., the PAT) .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - - diff --git a/docs/mdoc/tsserve.1 b/docs/mdoc/tsserve.1 index b18415a..8f91cbf 100644 --- a/docs/mdoc/tsserve.1 +++ b/docs/mdoc/tsserve.1 @@ -121,4 +121,3 @@ For information on using the program in other modes, see .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS - diff --git a/tsfilter.c b/tsfilter.c index 5eb6519..df09e00 100644 --- a/tsfilter.c +++ b/tsfilter.c @@ -46,7 +46,7 @@ /** List of PIDs to filter in */ int *pidList = NULL; -int pidListAlloc = 0, pidListUsed = 0; +unsigned int pidListAlloc = 0, pidListUsed = 0; static void print_usage(void); diff --git a/version.h b/version.h index 4c8561f..3434f90 100644 --- a/version.h +++ b/version.h @@ -31,7 +31,11 @@ #include "printing_fns.h" -const char software_version[] = "1.12"; +#define STRINGIZE1(x) #x +#define STRINGIZE(x) STRINGIZE1(x) +#define TSTOOLS_VERSION_STRING STRINGIZE(TSTOOLS_VERSION) + +const char software_version[] = TSTOOLS_VERSION_STRING; // The following is intended to be output as part of the main help text for // each program. ``program_name`` is thus the name of the program.