added feature for setting the TITLE comment field for vorbis streams

This commit is contained in:
darkeye 2003-02-09 13:15:57 +00:00
parent 6253785062
commit 2d0dc666f1
6 changed files with 26 additions and 10 deletions

View File

@ -15,4 +15,5 @@ with contributions by:
Nicu Pavel <npavel@ituner.com> Nicu Pavel <npavel@ituner.com>
Kai Krakow <kai@kaishome.de> Kai Krakow <kai@kaishome.de>
Atsuhiko Yamanaka <ymnk@jcraft.com> Atsuhiko Yamanaka <ymnk@jcraft.com>
Ricardo Galli <gallir@uib.es>

View File

@ -1,5 +1,7 @@
DarkIce next version: DarkIce next version:
o added feature for setting the TITLE comment field for vorbis
streams. thanks to Ricardo Galli <gallir@uib.es>
o bugfix: fixed minor bug in IcecCast2.cpp, which could have lead to o bugfix: fixed minor bug in IcecCast2.cpp, which could have lead to
a buffer overflow. thanks to Atsuhiko Yamanaka <ymnk@jcraft.com> a buffer overflow. thanks to Atsuhiko Yamanaka <ymnk@jcraft.com>
o bugfix: MultiThreadedConnector::sinkThread() was private, now public o bugfix: MultiThreadedConnector::sinkThread() was private, now public

View File

@ -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 .SH NAME
darkice \- an icecast / shoutcast live audio streamer darkice \- an icecast / shoutcast live audio streamer
.SH SYNOPSIS .SH SYNOPSIS
@ -82,7 +82,8 @@ Developed with contributions by
Kristjan G. Bjarnason <kgb@gangverk.is> Kristjan G. Bjarnason <kgb@gangverk.is>
Nicu Pavel <npavel@ituner.com> Nicu Pavel <npavel@ituner.com>
Kai Krakow <kai@kaishome.de> Kai Krakow <kai@kaishome.de>
Atsuhiko Yamanaka <ymnk@jcraft.com>
Ricardo Galli <gallir@uib.es>
.SH LINKS .SH LINKS
Project homepage: Project homepage:

View File

@ -444,12 +444,12 @@ DarkIce :: configIceCast2 ( const Config & config,
" missing in section ", " missing in section ",
stream); stream);
name = cs->get( "name"); name = cs->get( "name");
description = cs->get("description"); description = cs->get( "description");
url = cs->get( "url"); url = cs->get( "url");
genre = cs->get( "genre"); genre = cs->get( "genre");
str = cs->get( "public"); str = cs->get( "public");
isPublic = str ? (Util::strEq( str, "yes") ? true : false) : false; 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; fileAddDate = str ? (Util::strEq( str, "yes") ? true : false) : false;
localDumpName = cs->get( "localDumpFile"); localDumpName = cs->get( "localDumpFile");
@ -996,6 +996,9 @@ DarkIce :: run ( void ) throw ( Exception )
$Source$ $Source$
$Log$ $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 Revision 1.34 2003/02/09 12:57:36 darkeye
cosmetic changes to the fileAddDate option cosmetic changes to the fileAddDate option

View File

@ -62,7 +62,7 @@ static const char fileid[] = "$Id$";
* Initialize the encoder * Initialize the encoder
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
void void
VorbisLibEncoder :: init ( Sink * sink, VorbisLibEncoder :: init ( CastSink * sink,
unsigned int outMaxBitrate ) unsigned int outMaxBitrate )
throw ( Exception ) throw ( Exception )
{ {
@ -188,6 +188,9 @@ VorbisLibEncoder :: open ( void )
// create an empty vorbis_comment structure // create an empty vorbis_comment structure
vorbis_comment_init( &vorbisComment); 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 // create the vorbis stream headers and send them to the underlying sink
ogg_packet header; ogg_packet header;
@ -370,6 +373,9 @@ VorbisLibEncoder :: close ( void ) throw ( Exception )
$Source$ $Source$
$Log$ $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 Revision 1.16 2002/10/19 13:31:46 darkeye
some cleanup with the open() / close() functions some cleanup with the open() / close() functions

View File

@ -51,7 +51,7 @@
#include "Exception.h" #include "Exception.h"
#include "Reporter.h" #include "Reporter.h"
#include "AudioEncoder.h" #include "AudioEncoder.h"
#include "Sink.h" #include "CastSink.h"
#include "aflibConverter.h" #include "aflibConverter.h"
@ -107,7 +107,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
/** /**
* The Sink to dump encoded data to * The Sink to dump encoded data to
*/ */
Ref<Sink> sink; Ref<CastSink> sink;
/** /**
* Maximum bitrate of the output in kbits/sec. If 0, don't care. * 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 * @exception Exception
*/ */
void void
init ( Sink * sink, init ( CastSink * sink,
unsigned int outMaxBitrate ) throw ( Exception ); unsigned int outMaxBitrate ) throw ( Exception );
/** /**
@ -191,7 +191,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
* @exception Exception * @exception Exception
*/ */
inline inline
VorbisLibEncoder ( Sink * sink, VorbisLibEncoder ( CastSink * sink,
unsigned int inSampleRate, unsigned int inSampleRate,
unsigned int inBitsPerSample, unsigned int inBitsPerSample,
unsigned int inChannel, unsigned int inChannel,
@ -235,7 +235,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
* @exception Exception * @exception Exception
*/ */
inline inline
VorbisLibEncoder ( Sink * sink, VorbisLibEncoder ( CastSink * sink,
const AudioSource * as, const AudioSource * as,
BitrateMode outBitrateMode, BitrateMode outBitrateMode,
unsigned int outBitrate, unsigned int outBitrate,
@ -444,6 +444,9 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
$Source$ $Source$
$Log$ $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 Revision 1.8 2002/08/20 20:07:36 darkeye
minor fixes minor fixes