--- poc-streamer-0.4.2.orig/misc.h +++ poc-streamer-0.4.2/misc.h @@ -11,5 +11,6 @@ int unix_write(int fd, unsigned char *buf, size_t size); int unix_read(int fd, unsigned char *buf, size_t size); +void format_time(unsigned long time, char *str, unsigned int len); #endif /* MISC_H__ */ --- poc-streamer-0.4.2.orig/man/man1/mp3cut.1 +++ poc-streamer-0.4.2/man/man1/mp3cut.1 @@ -69,7 +69,7 @@ from input.mp3 and write the output to output.mp3. .IP "mp3cut -t 00:01-00:02 input1.mp3 -t -15:23 input2.mp3 -t 9:87+500- input3.mp3" -Append the segments from input1.mp3, input2.mpt and input3.mp3 and +Append the segments from input1.mp3, input2.mp3 and input3.mp3 and write the output to input1.output.mp3. .SH AUTHORS --- poc-streamer-0.4.2.orig/mp3length.c +++ poc-streamer-0.4.2/mp3length.c @@ -9,23 +9,12 @@ #include "file.h" #include "mp3.h" #include "aq.h" +#include "misc.h" static void usage(void) { fprintf(stderr, "Usage: mp3length mp3file\n"); } -static void format_time(unsigned long time, char *str, unsigned int len) { - unsigned long ms = time % 1000; - time /= 1000; - unsigned long secs = time % 60; - time /= 60; - unsigned long minutes = time; - time /= 60; - unsigned long hours = time; - - snprintf(str, len, "%.2lu:%.2lu:%.2lu+%.3lu", hours, minutes, secs, ms); -} - int main(int argc, char *argv[]) { int retval = EXIT_SUCCESS; --- poc-streamer-0.4.2.orig/Makefile +++ poc-streamer-0.4.2/Makefile @@ -7,14 +7,14 @@ CFLAGS += -Wall -O2 # Uncomment these flags to add id3 support to mp3cue and mp3cut -#CFLAGS += -DWITH_ID3TAG -#LDFLAGS += -lid3tag +CFLAGS += -DWITH_ID3TAG +LDFLAGS += -lid3tag # On MacOSX using fink #CFLAGS += -I/sw/include #LDFLAGS += -L/sw/lib # Uncomment this flag to add ipv6 support to poc -#CFLAGS+=-DWITH_IPV6 +CFLAGS+=-DWITH_IPV6 # Uncomment these flags to add SSL support to poc #CFLAGS+=-DWITH_OPENSSL --- poc-streamer-0.4.2.orig/mp3cue-main.c +++ poc-streamer-0.4.2/mp3cue-main.c @@ -19,6 +19,7 @@ #include "mp3cue.h" #include "mp3.h" #include "id3.h" +#include "misc.h" /*M MP3 Cue structure that will get filled by the parser. @@ -32,18 +33,6 @@ printf("-c cuefile: cut according to cue file\n"); } -static void format_time(unsigned long time, char *str, unsigned int len) { - unsigned long ms = time % 1000; - time /= 1000; - unsigned long secs = time % 60; - time /= 60; - unsigned long minutes = time; - time /= 60; - unsigned long hours = time; - - snprintf(str, len, "%.2lu:%.2lu:%.2lu+%.3lu", hours, minutes, secs, ms); -} - int mp3cue_write_id3(file_t *outfile, mp3cue_file_t *cuefile, mp3cue_track_t *track) { return id3_write_tag(outfile, --- poc-streamer-0.4.2.orig/mp3cut.c +++ poc-streamer-0.4.2/mp3cut.c @@ -10,6 +10,7 @@ #include "file.h" #include "mp3.h" #include "id3.h" +#include "misc.h" #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -99,18 +100,6 @@ return 0; } -static void format_time(unsigned long time, char *str, unsigned int len) { - unsigned long ms = time % 1000; - time /= 1000; - unsigned long secs = time % 60; - time /= 60; - unsigned long minutes = time; - time /= 60; - unsigned long hours = time; - - snprintf(str, len, "%.2lu:%.2lu:%.2lu+%.3lu", hours, minutes, secs, ms); -} - typedef struct mp3cut_s { char filename[256]; unsigned long from, to; --- poc-streamer-0.4.2.orig/mp3-read.c +++ poc-streamer-0.4.2/mp3-read.c @@ -779,6 +779,9 @@ goto resync; } + if (frame->frame_size > MP3_RAW_SIZE) + goto resync; + if (file_read(mp3, frame->raw + 4, frame->frame_size - 4) <= 0) return EEOF; --- poc-streamer-0.4.2.orig/fec-pkt.h +++ poc-streamer-0.4.2/fec-pkt.h @@ -62,6 +62,6 @@ ssize_t fec_pkt_send(fec_pkt_t *pkt, int fd); ssize_t fec_pkt_sendto(fec_pkt_t *pkt, int fd, struct sockaddr *to, socklen_t tolen); -ssize_t fec_pkt_read(fec_pkt_t *pkt, int fd); +int fec_pkt_read(fec_pkt_t *pkt, int fd); #endif /* FEC_PKT_H__ */ --- poc-streamer-0.4.2.orig/misc.c +++ poc-streamer-0.4.2/misc.c @@ -58,5 +58,15 @@ return len; } +void format_time(unsigned long time, char *str, unsigned int len) { + unsigned long ms = time % 1000; + time /= 1000; + unsigned long secs = time % 60; + time /= 60; + unsigned long minutes = time % 60; + time /= 60; + unsigned long hours = time; + + snprintf(str, len, "%.2lu:%.2lu:%.2lu+%.3lu", hours, minutes, secs, ms); +} - --- poc-streamer-0.4.2.orig/debian/dirs +++ poc-streamer-0.4.2/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- poc-streamer-0.4.2.orig/debian/rules +++ poc-streamer-0.4.2/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. +# +# This version is for a multibinary package. It also allows you to build any +# of the binary packages independantly, via binary- targets. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/poc-streamer. + $(MAKE) DESTDIR=$(CURDIR)/debian/poc-streamer PREFIX=/usr install + +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installcatalogs +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installman +# dh_installcron +# dh_installinfo +# dh_undocumented + dh_strip + dh_link + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture independant packages using the common target. +binary-indep: build install +# (Uncomment this next line if you have such packages.) +# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +# Any other binary targets build just one binary package at a time. +binary-%: build install + make -f debian/rules binary-common DH_OPTIONS=-p$* + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary-common binary install --- poc-streamer-0.4.2.orig/debian/control +++ poc-streamer-0.4.2/debian/control @@ -0,0 +1,22 @@ +Source: poc-streamer +Section: sound +Priority: optional +Maintainer: Mike Gerber +Build-Depends: debhelper (>= 4.0.0), libid3tag0-dev, flex, bison +Standards-Version: 3.6.1 + +Package: poc-streamer +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: An MP3/Ogg multicast/HTTP streamer and MP3 cutting tool + poc is a suite of MP3 tools and MP3 streaming programs. It can stream + MP3s over HTTP, RTP multicast (RFC 2250 and RFC 3119) and a special + multicast protocol to enable the use of Forward Error Correction to + protect the MP3 stream against packet loss. It can also stream OGGs + over HTTP. + In addition to the streaming programs, poc contains two MP3 tools: + mp3cue and mp3cut. mp3cue can cut a big MP3 file according to a + tracklisting contained in a .cue file. mp3cut can split and + concatenate MP3 files according to time slices given on the command + line. mp3cut cuts MP3 files on ADU (autonomous data units) frames + to ensure best quality. --- poc-streamer-0.4.2.orig/debian/changelog +++ poc-streamer-0.4.2/debian/changelog @@ -0,0 +1,26 @@ +poc-streamer (0.4.2-3) unstable; urgency=low + + * Remove Joachim Breitner from "Uploaders", as he requested + * Apply patches from upstream's svn repository: + * Fix problems with MP3s with faulty frame sizes (possible buffer overflow) + * Fix time formatting + * Fix typo in manpage + + -- Mike Gerber Fri, 29 Apr 2005 21:59:54 +0200 + +poc-streamer (0.4.2-2) unstable; urgency=low + + * Add flex and build-dependencies to fix FTBFS bugs + * Fix FTBFS on 64-bit platforms: as ssize_t is not an int there, + fec-pkt.c failed to build due to incompatible types + + -- Mike Gerber Fri, 29 Apr 2005 02:38:53 +0200 + +poc-streamer (0.4.2-1) unstable; urgency=low + + * Initial upload (Closes: #296448) + * Rename source-package from poc to poc-streamer to avoid a conflict + with objc-poc which was formerly known as poc + + -- Mike Gerber Mon, 18 Apr 2005 18:34:43 +0200 + --- poc-streamer-0.4.2.orig/debian/watch +++ poc-streamer-0.4.2/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://bl0rg.net/software/poc/poc-(.*).tar.gz --- poc-streamer-0.4.2.orig/debian/copyright +++ poc-streamer-0.4.2/debian/copyright @@ -0,0 +1,19 @@ +This package was debianized by Mike Gerber on +Sun, 13 Feb 2005 21:51:39 +0100. + +It was downloaded from http://bl0rg.net/software/poc/ + +Upstream Authors: Manuel Odendahl + Florian Wesch + +Copyright: + + Copyright (c) 2005, Manuel Odendahl, Florian Wesch + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: ... + +On Debian systems the complete text of the BSD License can be found +in `/usr/share/common-licenses/BSD'. --- poc-streamer-0.4.2.orig/debian/compat +++ poc-streamer-0.4.2/debian/compat @@ -0,0 +1 @@ +4 --- poc-streamer-0.4.2.orig/debian/docs +++ poc-streamer-0.4.2/debian/docs @@ -0,0 +1,2 @@ +README +TODO