[SCM] idjc/master: Add MP3 support, drop idjc-twolame.patch.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Sat Jul 30 09:43:36 UTC 2011
The following commit has been merged in the master branch:
commit 05eeb3335290c06f4cdafc4bb571ea1b61cfeac7
Author: Alessio Treglia <alessio at debian.org>
Date: Sat Jul 30 11:41:42 2011 +0200
Add MP3 support, drop idjc-twolame.patch.
diff --git a/debian/control b/debian/control
index d4d4cb8..839d24c 100644
--- a/debian/control
+++ b/debian/control
@@ -22,7 +22,7 @@ Build-Depends: debhelper (>= 7.0.50~),
libmad0-dev,
libavcodec-dev,
libavformat-dev,
- libtwolame-dev
+ libmp3lame-dev
Standards-Version: 3.9.2
Homepage: http://idjc.sourceforge.net/
Vcs-Git: git://git.debian.org/git/pkg-multimedia/idjc.git
diff --git a/debian/patches/idjc-twolame.patch b/debian/patches/idjc-twolame.patch
deleted file mode 100644
index b4ffb3a..0000000
--- a/debian/patches/idjc-twolame.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-Origin: Debian, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482509#25
-Author: Peter Green <plugwash at p10link.net>
-Description: Build with twolame to provide MP2 encoding.
-Bug-Debian: http://bugs.debian.org/482509
-Forwarded: no
----
- c/live_mp3_encoder.c | 31 +++++++++++++++++--------------
- c/live_mp3_encoder.h | 4 ++--
- configure | 24 ++++++++++++------------
- configure.ac | 6 +++---
- 4 files changed, 34 insertions(+), 31 deletions(-)
-
---- idjc.orig/c/live_mp3_encoder.c
-+++ idjc/c/live_mp3_encoder.c
-@@ -87,24 +87,26 @@ static void live_mp3_encoder_main(struct
- fprintf(stderr, "live_mp3_encoder_main: malloc failure\n");
- goto bailout;
- }
-- if (!(s->gfp = lame_init()))
-+ if (!(s->gfp = twolame_init()))
- {
- fprintf(stderr, "live_mp3_encoder_main: failed to initialise LAME\n");
- free(s->mp3buf);
- goto bailout;
- }
-- lame_set_num_channels(s->gfp, encoder->n_channels);
-- lame_set_brate(s->gfp, encoder->bitrate);
-- lame_set_in_samplerate(s->gfp, encoder->target_samplerate);
-- lame_set_out_samplerate(s->gfp, encoder->target_samplerate);
-- lame_set_mode(s->gfp, s->lame_mode);
-- lame_set_quality(s->gfp, s->lame_quality);
-- lame_set_free_format(s->gfp, s->lame_freeformat);
-- lame_set_bWriteVbrTag(s->gfp, 0);
-- if (lame_init_params(s->gfp) < 0)
-+ twolame_set_num_channels(s->gfp, encoder->n_channels);
-+ twolame_set_brate(s->gfp, encoder->bitrate);
-+ twolame_set_in_samplerate(s->gfp, encoder->target_samplerate);
-+ twolame_set_out_samplerate(s->gfp, encoder->target_samplerate);
-+ twolame_set_mode(s->gfp, s->lame_mode);
-+ //some settings that lame has but toolame doesn't
-+ //don't look too important
-+ //twolame_set_quality(s->gfp, s->lame_quality);
-+ //twolame_set_free_format(s->gfp, s->lame_freeformat);
-+ //twolame_set_bWriteVbrTag(s->gfp, 0);
-+ if (twolame_init_params(s->gfp) < 0)
- {
- fprintf(stderr, "live_mp3_encoder_main: LAME rejected the parameters given\n");
-- lame_close(s->gfp);
-+ twolame_close(s->gfp);
- free(s->mp3buf);
- goto bailout;
- }
-@@ -125,7 +127,8 @@ static void live_mp3_encoder_main(struct
- if (encoder->flush || !encoder->run_request_f)
- {
- encoder->flush = FALSE;
-- mp3bytes = lame_encode_flush_nogap(s->gfp, s->mp3buf, s->mp3bufsize);
-+ //twolame seems to lack a _flush_nogap, hopefully _flush will do
-+ mp3bytes = twolame_encode_flush(s->gfp, s->mp3buf, s->mp3bufsize);
- fprintf(stderr, "live_mp3_encoder_main: flushing %d bytes\n", mp3bytes);
- live_mp3_write_packet(encoder, s, s->mp3buf, mp3bytes, PF_MP3 | PF_FINAL);
- encoder->encoder_state = ES_STOPPING;
-@@ -143,7 +146,7 @@ static void live_mp3_encoder_main(struct
- *l++ *= 32768.0F;
- *r++ *= 32768.0F;
- }
-- mp3bytes = lame_encode_buffer_float(s->gfp, id->buffer[0], id->buffer[1], id->qty_samples, s->mp3buf, s->mp3bufsize);
-+ mp3bytes = twolame_encode_buffer_float32(s->gfp, id->buffer[0], id->buffer[1], id->qty_samples, s->mp3buf, s->mp3bufsize);
- encoder_ip_data_free(id);
- s->lame_samples += id->qty_samples;
- live_mp3_write_packet(encoder, s, s->mp3buf, mp3bytes, PF_MP3 | s->packetflags);
-@@ -161,7 +164,7 @@ static void live_mp3_encoder_main(struct
- }
- if (encoder->encoder_state == ES_STOPPING)
- {
-- lame_close(s->gfp);
-+ twolame_close(s->gfp);
- free(s->mp3buf);
- if (encoder->run_request_f)
- {
---- idjc.orig/c/live_mp3_encoder.h
-+++ idjc/c/live_mp3_encoder.h
-@@ -22,13 +22,13 @@
- #ifdef DYN_LAME
- #include "lame.h"
- #else
--#include <lame/lame.h>
-+#include <twolame.h>
- #endif /* DYN_LAME */
- #include "sourceclient.h"
-
- struct lme_data
- {
-- lame_global_flags *gfp;
-+ twolame_options *gfp;
- int lame_mode;
- int lame_channels;
- int lame_quality;
---- idjc.orig/configure
-+++ idjc/configure
-@@ -5614,13 +5614,13 @@ fi
-
-
- if test $makelame != "no" ; then
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lame_init in -lmp3lame -lm" >&5
--$as_echo_n "checking for lame_init in -lmp3lame -lm... " >&6; }
--if test "${ac_cv_lib_mp3lame__lm_lame_init+set}" = set; then :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for twolame_init in -ltwolame -lm" >&5
-+$as_echo_n "checking for twolame_init in -ltwolame -lm... " >&6; }
-+if test "${ac_cv_lib_twolame__lm_twolame_init+set}" = set; then :
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lmp3lame -lm $LIBS"
-+LIBS="-ltwolame -lm $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -5630,28 +5630,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
- #ifdef __cplusplus
- extern "C"
- #endif
--char lame_init ();
-+char twolame_init ();
- int
- main ()
- {
--return lame_init ();
-+return twolame_init ();
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_mp3lame__lm_lame_init=yes
-+ ac_cv_lib_twolame__lm_twolame_init=yes
- else
-- ac_cv_lib_mp3lame__lm_lame_init=no
-+ ac_cv_lib_twolame__lm_twolame_init=no
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mp3lame__lm_lame_init" >&5
--$as_echo "$ac_cv_lib_mp3lame__lm_lame_init" >&6; }
--if test "x$ac_cv_lib_mp3lame__lm_lame_init" = x""yes; then :
-- LIBMP3LAME=-lmp3lame
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_twolame__lm_twolame_init" >&5
-+$as_echo "$ac_cv_lib_twolame__lm_twolame_init" >&6; }
-+if test "x$ac_cv_lib_twolame__lm_twolame_init" = x""yes; then :
-+ LIBMP3LAME=-ltwolame
-
- else
-
---- idjc.orig/configure.ac
-+++ idjc/configure.ac
-@@ -148,12 +148,12 @@ AC_ARG_ENABLE(lame,
- AC_HELP_STRING([--disable-lame],[remove capability to stream/record mp3 format]),[makelame=$enableval],[makelame="maybe"])
-
- if test $makelame != "no" ; then
--AC_CHECK_LIB([mp3lame -lm], [lame_init],
-- AC_SUBST(LIBMP3LAME, [-lmp3lame]),
-+AC_CHECK_LIB([twolame -lm], [twolame_init],
-+ AC_SUBST(LIBMP3LAME, [-ltwolame]),
- AC_DEFINE(DYN_LAME, 1, [LAME to be linked dynamically])
- DYNAMIC="1"
- if test $makelame = "yes" ; then
-- AC_MSG_ERROR([libmp3lame not detected but specifically requested in configure options])
-+ AC_MSG_ERROR([libtwolame not detected but specifically requested in configure options])
- fi)
- else
- AC_DEFINE(DYN_LAME, 1, [LAME to be linked dynamically])
diff --git a/debian/patches/series b/debian/patches/series
index 62c8332..4d83d77 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
desktop_file.patch
idjc_script.patch
-idjc-twolame.patch
libav-0.7.patch
bashism-in-configure.patch
--
idjc packaging
More information about the pkg-multimedia-commits
mailing list