Code: Alles auswählen
Index: Makefile.am
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/Makefile.am,v
retrieving revision 1.35
diff -u -r1.35 Makefile.am
--- Makefile.am	2 Sep 2007 19:05:51 -0000	1.35
+++ Makefile.am	19 Sep 2007 19:58:53 -0000
@@ -51,6 +51,7 @@
 	@TUXTXT_LIBS@ \
 	@XMLTREE_LIBS@ \
 	@UPNPCLIENT_LIBS@ \
+	-lFLAC \
 	-lresolv \
 	-ljpeg \
 	-lpthread \
Index: driver/audiometadata.h
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/audiometadata.h,v
retrieving revision 1.5
diff -u -r1.5 audiometadata.h
--- driver/audiometadata.h	14 Sep 2004 15:22:21 -0000	1.5
+++ driver/audiometadata.h	19 Sep 2007 19:58:54 -0000
@@ -56,7 +56,8 @@
 		CDR,
 		MP3,
 		OGG,
-		WAV
+		WAV,
+		FLAC
 	};
 	AudioType type;
 	std::string type_info;
Index: driver/audioplay.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/audioplay.cpp,v
retrieving revision 1.16
diff -u -r1.16 audioplay.cpp
--- driver/audioplay.cpp	9 Sep 2006 21:26:35 -0000	1.16
+++ driver/audioplay.cpp	19 Sep 2007 19:58:56 -0000
@@ -29,7 +29,7 @@
 #define DBOX
 
 /****************************************************************************
- * Includes																	*
+  Includes
  ****************************************************************************/
 #ifdef HAVE_CONFIG_H
 #include <config.h>
Index: driver/file.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/file.cpp,v
retrieving revision 1.2
diff -u -r1.2 file.cpp
--- driver/file.cpp	15 Sep 2004 21:02:55 -0000	1.2
+++ driver/file.cpp	19 Sep 2007 19:58:57 -0000
@@ -41,19 +41,19 @@
 /* ATTENTION: the array file_extension_list MUST BE SORTED ASCENDING (cf. sort, man bsearch) - otherwise bsearch will not work correctly! */
 const char * const file_extension_list[] =
 {
-	"bmp"                , "cdr"                , "crw"                , "gif"                , "imu"                ,
+	"bmp"                , "cdr"                , "crw"                , "flac"               , "gif"                , "imu"                ,
 	"jpeg"               , "jpg"                , "m2a"                , "m3u"                , "mp2"                ,
 	"mp3"                , "mpa"                , "ogg"                , "png"                , "sh"                 ,
-	"txt"                , "url"                , "wav"                ,
+	"txt"                , "url"                , "wav"                , 
 };
 /* ATTENTION: the array file_extension_list MUST BE SORTED ASCENDING (cf. sort, man bsearch) - otherwise bsearch will not work correctly! */
 
 const CFile::FileType file_type_list[] =
 {
-	CFile::FILE_PICTURE  , CFile::FILE_CDR      , CFile::FILE_PICTURE  , CFile::FILE_PICTURE  , CFile::STREAM_PICTURE,
+	CFile::FILE_PICTURE  , CFile::FILE_CDR      , CFile::FILE_PICTURE  , CFile::FILE_FLAC     , CFile::FILE_PICTURE  , CFile::STREAM_PICTURE,
 	CFile::FILE_PICTURE  , CFile::FILE_PICTURE  , CFile::FILE_MP3      , CFile::FILE_PLAYLIST , CFile::FILE_MP3      ,
 	CFile::FILE_MP3      , CFile::FILE_MP3      , CFile::FILE_OGG      , CFile::FILE_PICTURE  , CFile::FILE_TEXT     ,
-	CFile::FILE_TEXT     , CFile::STREAM_AUDIO    , CFile::FILE_WAV      ,
+	CFile::FILE_TEXT     , CFile::STREAM_AUDIO  , CFile::FILE_WAV      , 
 };
 
 int mycasecmp(const void * a, const void * b)
Index: driver/file.h
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/file.h,v
retrieving revision 1.3
diff -u -r1.3 file.h
--- driver/file.h	28 Jan 2005 16:15:50 -0000	1.3
+++ driver/file.h	19 Sep 2007 19:58:58 -0000
@@ -58,6 +58,7 @@
 		FILE_MP3,
 		FILE_OGG,
 		FILE_WAV,
+		FILE_FLAC,
 		FILE_PLAYLIST,
 		STREAM_AUDIO,
 		FILE_PICTURE,
Index: driver/audiodec/Makefile.am
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/audiodec/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- driver/audiodec/Makefile.am	16 Sep 2004 10:43:20 -0000	1.6
+++ driver/audiodec/Makefile.am	19 Sep 2007 19:58:58 -0000
@@ -13,5 +13,6 @@
 	mp3dec.cpp \
 	oggdec.cpp \
 	wavdec.cpp \
+	flacdec.cpp \
 	tag.c \
 	crc.c
Index: driver/audiodec/basedec.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/audiodec/basedec.cpp,v
retrieving revision 1.15
diff -u -r1.15 basedec.cpp
--- driver/audiodec/basedec.cpp	24 Jun 2007 11:51:03 -0000	1.15
+++ driver/audiodec/basedec.cpp	19 Sep 2007 19:59:01 -0000
@@ -35,6 +35,7 @@
 #include <mp3dec.h>
 #include <oggdec.h>
 #include <wavdec.h>
+#include <flacdec.h>
 #include <linux/soundcard.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -129,6 +130,12 @@
 													  &in->MetaData, t,
 													  secondsToSkip );
 		}
+		else if( in->FileType == CFile::FILE_FLAC )
+		{
+			Status = CFlacDec::getInstance()->Decoder( fp, OutputFd, state,
+													  &in->MetaData, t,
+													  secondsToSkip );
+		}
 		else
 		{
 			fprintf( stderr, "DecoderBase: Supplied filetype is not " );
@@ -151,7 +158,8 @@
 	bool Status = true;
 
 	if ( in->FileType == CFile::FILE_MP3 || in->FileType == CFile::FILE_OGG ||
-		 in->FileType == CFile::FILE_WAV || in->FileType == CFile::FILE_CDR )
+		 in->FileType == CFile::FILE_WAV || in->FileType == CFile::FILE_CDR ||
+		 in->FileType == CFile::FILE_FLAC )
 	{
 		FILE* fp = fopen( in->Filename.c_str(), "r" );
 		if ( fp == NULL )
@@ -182,6 +190,11 @@
 				Status = CCdrDec::getInstance()->GetMetaData(fp, nice,
 															 &in->MetaData);
 			}
+			else if(in->FileType == CFile::FILE_FLAC)
+			{
+				Status = CFlacDec::getInstance()->GetMetaData(fp, nice,
+															 &in->MetaData);
+			}
 
 			if ( fclose( fp ) == EOF )
 			{
Index: driver/audiodec/mp3dec.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/driver/audiodec/mp3dec.cpp,v
retrieving revision 1.14
diff -u -r1.14 mp3dec.cpp
--- driver/audiodec/mp3dec.cpp	29 Mar 2006 17:02:02 -0000	1.14
+++ driver/audiodec/mp3dec.cpp	19 Sep 2007 19:59:11 -0000
@@ -430,7 +430,7 @@
 		 * the end of the buffer if those bytes forms an incomplete
 		 * frame. Before refilling, the remainign bytes must be moved
 		 * to the begining of the buffer and used for input for the
-q		 * next mad_frame_decode() invocation. (See the comments marked
+		 * next mad_frame_decode() invocation. (See the comments marked
 		 * {1} earlier for more details.)
 		 *
 		 * Recoverable errors are caused by malformed bit-streams, in
Index: gui/audioplayer.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/gui/audioplayer.cpp,v
retrieving revision 1.44
diff -u -r1.44 audioplayer.cpp
--- gui/audioplayer.cpp	24 Jun 2007 11:51:04 -0000	1.44
+++ gui/audioplayer.cpp	19 Sep 2007 19:59:32 -0000
@@ -149,6 +149,7 @@
 	audiofilefilter.addFilter("ogg");
 	audiofilefilter.addFilter("url");
 	audiofilefilter.addFilter("wav");
+	audiofilefilter.addFilter("flac");
 	m_SMSKeyInput.setTimeout(AUDIOPLAYERGUI_SMSKEY_TIMEOUT);
 }
 
@@ -553,7 +554,8 @@
 						if ((files->getType() == CFile::FILE_CDR) ||
 						    (files->getType() == CFile::FILE_OGG) ||
 						    (files->getType() == CFile::FILE_MP3) ||
-						    (files->getType() == CFile::FILE_WAV))
+						    (files->getType() == CFile::FILE_WAV) ||
+						    (files->getType() == CFile::FILE_FLAC))
 						{
 							CAudiofileExt audiofile(files->Name,
 												  files->getType());
@@ -620,9 +622,10 @@
 											playlistItem.Name = filename;											
 											CFile::FileType fileType = playlistItem.getType();
 											if (fileType == CFile::FILE_CDR
-												|| fileType == CFile::FILE_MP3 
+												|| fileType == CFile::FILE_MP3
 												|| fileType == CFile::FILE_OGG
-												|| fileType == CFile::FILE_WAV) 
+												|| fileType == CFile::FILE_WAV
+												|| fileType == CFile::FILE_FLAC) 
 											{
 												CAudiofileExt audioFile(filename,fileType);
 												addToPlaylist(audioFile);
Index: gui/filebrowser.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/gui/filebrowser.cpp,v
retrieving revision 1.114
diff -u -r1.114 filebrowser.cpp
--- gui/filebrowser.cpp	24 May 2007 19:12:33 -0000	1.114
+++ gui/filebrowser.cpp	19 Sep 2007 19:59:44 -0000
@@ -1023,6 +1023,7 @@
 			case CFile::FILE_MP3:
 			case CFile::FILE_OGG:
 			case CFile::FILE_WAV:
+			case CFile::FILE_FLAC:
 				fileicon = "mp3.raw";
 //				color = COL_MENUCONTENT;
 				break;