Author: ayoung
Date: Wed Mar 28 06:30:07 2012
New Revision: 9689

URL: http://svn.slimdevices.com/jive?rev=9689&view=rev
Log:
bug 12893: Support OggFLAC 

Add OggFLAC support to Squeezeplay.
Requires libogg-devel as build-time dependency.

Modified:
    7.8/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb
    7.8/trunk/squeezeplay/src/Makefile.linux
    7.8/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/Makefile.in
    7.8/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_flac.c

Modified: 7.8/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- 7.8/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb 
(original)
+++ 7.8/trunk/squeezeos/poky/meta-squeezeos/packages/flac/flac_1.2.1.bb Wed Mar 
28 06:30:07 2012
@@ -2,7 +2,9 @@
 SECTION = "libs"
 LICENSE = "Xiph"
 
-PR = "r7"
+DEPENDS = "libogg"
+
+PR = "r8"
 
 SRC_URI="${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \
         file://bitreader-1.2.1.patch;patch=1 \
@@ -16,7 +18,9 @@
 inherit autotools gettext
 
 CFLAGS_prepend = "-DFLAC__CPU_ARM "
-EXTRA_OECONF = "--disable-ogg --disable-xmms-plugin --enable-static"
+EXTRA_OECONF = "--with-ogg-libraries=${STAGING_LIBDIR} \
+               --with-ogg-includes=${STAGING_INCDIR} \
+               --disable-xmms-plugin --enable-static"
 
 do_stage() {
        autotools_stage_all

Modified: 7.8/trunk/squeezeplay/src/Makefile.linux
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/Makefile.linux?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- 7.8/trunk/squeezeplay/src/Makefile.linux (original)
+++ 7.8/trunk/squeezeplay/src/Makefile.linux Wed Mar 28 06:30:07 2012
@@ -170,7 +170,7 @@
 
 # flac
 flac-1.2.1/Makefile:
-       cd flac-1.2.1; ./configure --disable-ogg --disable-xmms-plugin 
--host=${HOST} --target=${TARGET} --prefix=${PREFIX}
+       cd flac-1.2.1; ./configure --disable-xmms-plugin --host=${HOST} 
--target=${TARGET} --prefix=${PREFIX}
 
 flac: flac-1.2.1/Makefile
        cd flac-1.2.1; make && make install

Modified: 7.8/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/Makefile.in
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/Makefile.in?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- 7.8/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/Makefile.in (original)
+++ 7.8/trunk/squeezeplay/src/flac-1.2.1/src/libFLAC/Makefile.in Wed Mar 28 
06:30:07 2012
@@ -96,7 +96,8 @@
 libFLAC_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am_libFLAC_la_OBJECTS = bitmath.lo bitreader.lo bitwriter.lo cpu.lo \
        crc.lo fixed.lo float.lo format.lo lpc.lo md5.lo memory.lo \
-       metadata_iterators.lo metadata_object.lo stream_decoder.lo
+       metadata_iterators.lo metadata_object.lo stream_decoder.lo \
+       ogg_decoder_aspect.lo ogg_helper.lo ogg_mapping.lo
 libFLAC_la_OBJECTS = $(am_libFLAC_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -331,7 +332,6 @@
 
 @FLaC__HAS_OGG_TRUE@extra_ogg_sources = \
 @FLaC__HAS_OGG_TRUE@   ogg_decoder_aspect.c \
-@FLaC__HAS_OGG_TRUE@   ogg_encoder_aspect.c \
 @FLaC__HAS_OGG_TRUE@   ogg_helper.c \
 @FLaC__HAS_OGG_TRUE@   ogg_mapping.c
 
@@ -352,8 +352,6 @@
        metadata_iterators.c \
        metadata_object.c \
        stream_decoder.c \
-       #stream_encoder.c \
-       #stream_encoder_framing.c \
        window.c \
        $(extra_ogg_sources)
 
@@ -442,6 +440,9 @@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/metadata_iterators.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metadata_object.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream_decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/ogg_decoder_aspect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_helper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_mapping.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c 
-o $@ $<; \

Modified: 7.8/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_flac.c
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_flac.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- 7.8/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_flac.c 
(original)
+++ 7.8/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_flac.c Wed 
Mar 28 06:30:07 2012
@@ -192,18 +192,39 @@
        self->decoder = FLAC__stream_decoder_new();
        // XXXX error handling
 
-       FLAC__stream_decoder_init_stream(
-               self->decoder,
-               decode_flac_read_callback,
-               NULL, /* seek_callback */
-               NULL, /* tell_callback */
-               NULL, /* length_callback */
-               NULL, /* eof_callback */
-               decode_flac_write_callback,
-               decode_flac_metadata_callback,
-               decode_flac_error_callback,
-               self
+       if (params[0] != 'o') {
+
+               FLAC__stream_decoder_init_stream(
+                       self->decoder,
+                       decode_flac_read_callback,
+                       NULL, /* seek_callback */
+                       NULL, /* tell_callback */
+                       NULL, /* length_callback */
+                       NULL, /* eof_callback */
+                       decode_flac_write_callback,
+                       decode_flac_metadata_callback,
+                       decode_flac_error_callback,
+                       self
                );
+
+       } else {
+
+               LOG_DEBUG(log_audio_codec, "oggflac stream - using 
init_ogg_stream()");
+
+               FLAC__stream_decoder_init_ogg_stream(
+                       self->decoder,
+                       decode_flac_read_callback,
+                       NULL, /* seek_callback */
+                       NULL, /* tell_callback */
+                       NULL, /* length_callback */
+                       NULL, /* eof_callback */
+                       decode_flac_write_callback,
+                       decode_flac_metadata_callback,
+                       decode_flac_error_callback,
+                       self
+               );
+       }
+
        // XXXX error handling
 
        /* Assume we aren't changing sample rates until proven wrong */
@@ -233,7 +254,7 @@
 
 struct decode_module decode_flac = {
        'f',
-       "flc",
+       "flc,ogf",
        decode_flac_start,
        decode_flac_stop,
        decode_flac_samples,

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to