From 2d0dc666f12b6651fa8aa31abb8c925052b98cd8 Mon Sep 17 00:00:00 2001 From: darkeye Date: Sun, 9 Feb 2003 13:15:57 +0000 Subject: [PATCH] added feature for setting the TITLE comment field for vorbis streams --- darkice/trunk/AUTHORS | 1 + darkice/trunk/ChangeLog | 2 ++ darkice/trunk/man/darkice.1 | 5 +++-- darkice/trunk/src/DarkIce.cpp | 7 +++++-- darkice/trunk/src/VorbisLibEncoder.cpp | 8 +++++++- darkice/trunk/src/VorbisLibEncoder.h | 13 ++++++++----- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/darkice/trunk/AUTHORS b/darkice/trunk/AUTHORS index 07fcc56..5f9760e 100644 --- a/darkice/trunk/AUTHORS +++ b/darkice/trunk/AUTHORS @@ -15,4 +15,5 @@ with contributions by: Nicu Pavel Kai Krakow Atsuhiko Yamanaka + Ricardo Galli diff --git a/darkice/trunk/ChangeLog b/darkice/trunk/ChangeLog index cc9f7da..8068816 100644 --- a/darkice/trunk/ChangeLog +++ b/darkice/trunk/ChangeLog @@ -1,5 +1,7 @@ DarkIce next version: + o added feature for setting the TITLE comment field for vorbis + streams. thanks to Ricardo Galli o bugfix: fixed minor bug in IcecCast2.cpp, which could have lead to a buffer overflow. thanks to Atsuhiko Yamanaka o bugfix: MultiThreadedConnector::sinkThread() was private, now public diff --git a/darkice/trunk/man/darkice.1 b/darkice/trunk/man/darkice.1 index 3bfbcce..8fb0ce5 100644 --- a/darkice/trunk/man/darkice.1 +++ b/darkice/trunk/man/darkice.1 @@ -1,4 +1,4 @@ -.TH darkice 1 "October 20, 2002" "DarkIce" "DarkIce live audio streamer" +.TH darkice 1 "February 9, 2003" "DarkIce" "DarkIce live audio streamer" .SH NAME darkice \- an icecast / shoutcast live audio streamer .SH SYNOPSIS @@ -82,7 +82,8 @@ Developed with contributions by Kristjan G. Bjarnason Nicu Pavel Kai Krakow - + Atsuhiko Yamanaka + Ricardo Galli .SH LINKS Project homepage: diff --git a/darkice/trunk/src/DarkIce.cpp b/darkice/trunk/src/DarkIce.cpp index 6452d2e..a5f0cbf 100644 --- a/darkice/trunk/src/DarkIce.cpp +++ b/darkice/trunk/src/DarkIce.cpp @@ -444,12 +444,12 @@ DarkIce :: configIceCast2 ( const Config & config, " missing in section ", stream); name = cs->get( "name"); - description = cs->get("description"); + description = cs->get( "description"); url = cs->get( "url"); genre = cs->get( "genre"); str = cs->get( "public"); isPublic = str ? (Util::strEq( str, "yes") ? true : false) : false; - str = cs->get("fileAddDate"); + str = cs->get( "fileAddDate"); fileAddDate = str ? (Util::strEq( str, "yes") ? true : false) : false; localDumpName = cs->get( "localDumpFile"); @@ -996,6 +996,9 @@ DarkIce :: run ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.35 2003/02/09 13:15:57 darkeye + added feature for setting the TITLE comment field for vorbis streams + Revision 1.34 2003/02/09 12:57:36 darkeye cosmetic changes to the fileAddDate option diff --git a/darkice/trunk/src/VorbisLibEncoder.cpp b/darkice/trunk/src/VorbisLibEncoder.cpp index c6a26aa..1dd73bb 100644 --- a/darkice/trunk/src/VorbisLibEncoder.cpp +++ b/darkice/trunk/src/VorbisLibEncoder.cpp @@ -62,7 +62,7 @@ static const char fileid[] = "$Id$"; * Initialize the encoder *----------------------------------------------------------------------------*/ void -VorbisLibEncoder :: init ( Sink * sink, +VorbisLibEncoder :: init ( CastSink * sink, unsigned int outMaxBitrate ) throw ( Exception ) { @@ -188,6 +188,9 @@ VorbisLibEncoder :: open ( void ) // create an empty vorbis_comment structure vorbis_comment_init( &vorbisComment); + // Add comment to vorbis headers to show title in players + // stupid cast to (char*) because of stupid vorbis API + vorbis_comment_add_tag( &vorbisComment, "TITLE", (char*) sink->getName()); // create the vorbis stream headers and send them to the underlying sink ogg_packet header; @@ -370,6 +373,9 @@ VorbisLibEncoder :: close ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.17 2003/02/09 13:15:57 darkeye + added feature for setting the TITLE comment field for vorbis streams + Revision 1.16 2002/10/19 13:31:46 darkeye some cleanup with the open() / close() functions diff --git a/darkice/trunk/src/VorbisLibEncoder.h b/darkice/trunk/src/VorbisLibEncoder.h index 517783b..a956f42 100644 --- a/darkice/trunk/src/VorbisLibEncoder.h +++ b/darkice/trunk/src/VorbisLibEncoder.h @@ -51,7 +51,7 @@ #include "Exception.h" #include "Reporter.h" #include "AudioEncoder.h" -#include "Sink.h" +#include "CastSink.h" #include "aflibConverter.h" @@ -107,7 +107,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter /** * The Sink to dump encoded data to */ - Ref sink; + Ref sink; /** * Maximum bitrate of the output in kbits/sec. If 0, don't care. @@ -132,7 +132,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ void - init ( Sink * sink, + init ( CastSink * sink, unsigned int outMaxBitrate ) throw ( Exception ); /** @@ -191,7 +191,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline - VorbisLibEncoder ( Sink * sink, + VorbisLibEncoder ( CastSink * sink, unsigned int inSampleRate, unsigned int inBitsPerSample, unsigned int inChannel, @@ -235,7 +235,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline - VorbisLibEncoder ( Sink * sink, + VorbisLibEncoder ( CastSink * sink, const AudioSource * as, BitrateMode outBitrateMode, unsigned int outBitrate, @@ -444,6 +444,9 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter $Source$ $Log$ + Revision 1.9 2003/02/09 13:15:57 darkeye + added feature for setting the TITLE comment field for vorbis streams + Revision 1.8 2002/08/20 20:07:36 darkeye minor fixes