gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2280-gc6da486
Date: Wed, 11 May 2016 13:09:08 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  c6da4863e343fd228e5546ec053b23ff1c3794de (commit)
       via  2a1355b91f9420789ba060a2288257e7dca509e9 (commit)
       via  c5645b56cbec780a5a7e4b910905dfdd4441365f (commit)
       via  51b7023fc0d9f97f0982fe97c76fe6a80d169807 (commit)
      from  484ca4cd2fecb73c3308fd451004f6cc2e976fbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=c6da4863e343fd228e5546ec053b23ff1c3794de


commit c6da4863e343fd228e5546ec053b23ff1c3794de
Author: Sandro Santilli <address@hidden>
Date:   Tue May 10 19:09:18 2016 +0200

    Fix unused variables and parameters when built with --disable-media

diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index 06dec58..bd2cd4b 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -624,6 +624,8 @@ NetStream_as::getDecodedVideoFrame(std::uint32_t ts)
             break; 
         }
     }
+#else // ndef USE_MEDIA
+    UNUSED(ts);
 #endif  // USE_MEDIA
     
     return video;
@@ -1054,6 +1056,8 @@ NetStream_as::pushDecodedAudioFrames(std::uint32_t ts)
 
         _playHead.setAudioConsumed();
     }
+#else // ndef USE_MEDIA
+    UNUSED(ts);
 #endif  // USE_MEDIA
 }
 
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index eddda73..106cd79 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -830,11 +830,9 @@ Sound_as::getPosition() const
 unsigned int
 Sound_as::getAudio(std::int16_t* samples, unsigned int nSamples, bool& atEOF)
 {
+#if defined USE_SOUND && defined USE_MEDIA
     std::uint8_t* stream = reinterpret_cast<std::uint8_t*>(samples);
     int len = nSamples*2;
-
-#ifdef USE_SOUND
-#ifdef USE_MEDIA
     //GNASH_REPORT_FUNCTION;
 
     while (len) {
@@ -906,10 +904,10 @@ Sound_as::getAudio(std::int16_t* samples, unsigned int 
nSamples, bool& atEOF)
 
     atEOF=false;
     return nSamples-(len/2);
-#else   // USE_MEDIA
-    return 0;
-#endif
-#else   // USE_SOUND
+#else   // USE_MEDIA && USE_SOUND
+    UNUSED(samples);
+    UNUSED(nSamples);
+    UNUSED(atEOF);
     return 0;
 #endif
 }

http://git.savannah.gnu.org/cgit//commit/?id=2a1355b91f9420789ba060a2288257e7dca509e9


commit 2a1355b91f9420789ba060a2288257e7dca509e9
Author: Sandro Santilli <address@hidden>
Date:   Tue May 10 19:03:30 2016 +0200

    Fix missing return with --disable-media config

diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index d500ea0..06dec58 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -194,6 +194,8 @@ NetStream_as::bufferLength()
 #ifdef USE_MEDIA
     if (_parser.get() == nullptr) return 0;
     return _parser->getBufferLength();
+#else
+    return 0;
 #endif  // USE_MEDIA
 }
 

http://git.savannah.gnu.org/cgit//commit/?id=c5645b56cbec780a5a7e4b910905dfdd4441365f


commit c5645b56cbec780a5a7e4b910905dfdd4441365f
Author: Nutchanon Wetchasit <address@hidden>
Date:   Tue May 10 19:03:12 2016 +0200

    Make sound_handler avoid calling media handler if user don't have one.
    
    This fixes the crashing part of bug #27952.
    See <https://savannah.gnu.org/bugs/?27952>

diff --git a/libsound/sound_handler.cpp b/libsound/sound_handler.cpp
index 454a03e..744bccc 100644
--- a/libsound/sound_handler.cpp
+++ b/libsound/sound_handler.cpp
@@ -1,6 +1,6 @@
 //
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-//   Free Software Foundation, Inc
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+//   2015, 2016 Free Software Foundation, Inc
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -500,6 +500,10 @@ sound_handler::playStream(int soundId, StreamBlockId 
blockId)
     if (s.isPlaying() || s.empty()) return;
 
     try {
+        if (!_mediaHandler) {
+            throw MediaException("No media handler available");
+        }
+
         std::unique_ptr<InputStream> is(
                 s.createInstance(*_mediaHandler, blockId));
         plugInputStream(std::move(is));
@@ -588,6 +592,10 @@ sound_handler::startSound(int handle, int loops, const 
SoundEnvelopes* env,
     }
 
     try {
+        if (!_mediaHandler) {
+            throw MediaException("No media handler available");
+        }
+
         // Make an InputStream for this sound and plug it into  
         // the set of InputStream channels
         std::unique_ptr<InputStream> sound(

http://git.savannah.gnu.org/cgit//commit/?id=51b7023fc0d9f97f0982fe97c76fe6a80d169807


commit 51b7023fc0d9f97f0982fe97c76fe6a80d169807
Author: Nutchanon Wetchasit <address@hidden>
Date:   Tue May 10 19:02:58 2016 +0200

    Fix build failure when "--disable-media" configure option was used.
    
    This fixes the build failure part of bug #27952.
    See <https://savannah.gnu.org/bugs/?27952>

diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index 99d2a7a..d500ea0 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -1,7 +1,7 @@
 // NetStream.cpp:  ActionScript class for streaming audio/video, for Gnash.
 // 
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-//   Free Software Foundation, Inc
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+//   2016 Free Software Foundation, Inc
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -711,9 +711,10 @@ NetStream_as::decodeNextAudioFrame()
 #endif 
 
     raw->m_ptr = raw->m_data;
-#endif  // USE_MEDIA
-    
     return raw;
+#else   // USE_MEDIA
+    return nullptr;
+#endif
 }
 
 void
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index 4a6d11c..eddda73 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -1,6 +1,7 @@
 // Sound_as.cpp:  ActionScript "Sound" class, for Gnash.
 //
-//   Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+//   Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016
+//   Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -364,6 +365,7 @@ Sound_as::probeAudio()
 
     if (!_mediaParser) return; // nothing to do here w/out a media parser
 
+#ifdef USE_MEDIA
     if ( ! _soundLoaded ) {
 #ifdef GNASH_DEBUG_SOUND_AS
         log_debug("Probing audio for load");
@@ -441,6 +443,7 @@ Sound_as::probeAudio()
             assert(_audioDecoder.get());
         }
     }
+#endif  // USE_MEDIA
 #endif  // USE_SOUND
 }
 
@@ -810,12 +813,14 @@ Sound_as::getPosition() const
         return _soundHandler->tell(soundId);
     }
 
+#ifdef USE_MEDIA
     if (_mediaParser) {
         std::uint64_t ts;
         if ( _mediaParser->nextAudioFrameTimestamp(ts) ) {
             return ts;
         }
     }
+#endif  // USE_MEDIA
 #endif  // USE_SOUND
     
     return 0;
@@ -829,6 +834,7 @@ Sound_as::getAudio(std::int16_t* samples, unsigned int 
nSamples, bool& atEOF)
     int len = nSamples*2;
 
 #ifdef USE_SOUND
+#ifdef USE_MEDIA
     //GNASH_REPORT_FUNCTION;
 
     while (len) {
@@ -900,7 +906,12 @@ Sound_as::getAudio(std::int16_t* samples, unsigned int 
nSamples, bool& atEOF)
 
     atEOF=false;
     return nSamples-(len/2);
-#endif  // USE_SOUND
+#else   // USE_MEDIA
+    return 0;
+#endif
+#else   // USE_SOUND
+    return 0;
+#endif
 }
 
 // audio callback is running in sound handler thread
diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index 7a7642d..8f40fb9 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -1,6 +1,6 @@
 // MediaParser.cpp:  Media file parser, for Gnash.
 //
-//   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+//   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016
 //   Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
@@ -468,42 +468,6 @@ operator<< (std::ostream& os, const videoCodecType& t)
     return os;
 }
 
-std::ostream&
-operator<< (std::ostream& os, const audioCodecType& t)
-{
-    switch (t)
-    {
-        case AUDIO_CODEC_RAW:
-            os << "Raw";
-            break;
-        case AUDIO_CODEC_ADPCM:
-            os << "ADPCM";
-            break;
-        case AUDIO_CODEC_MP3:
-            os << "MP3";
-            break;
-        case AUDIO_CODEC_UNCOMPRESSED:
-            os << "Uncompressed";
-            break;
-        case AUDIO_CODEC_NELLYMOSER_8HZ_MONO:
-            os << "Nellymoser 8Hz mono";
-            break;
-        case AUDIO_CODEC_NELLYMOSER:
-            os << "Nellymoser";
-            break;
-        case AUDIO_CODEC_AAC:
-            os << "Advanced Audio Coding";
-            break;
-        case AUDIO_CODEC_SPEEX:
-            os << "Speex";
-            break;
-        default:
-            os << "unknown/invalid codec " << static_cast<int>(t);
-            break;
-    }
-    return os;
-}
-
 } // end of gnash::media namespace
 } // end of gnash namespace
 
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index e9f28c1..36520f1 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -1,6 +1,6 @@
 // MediaParser.h: Base class for media parsers
 // 
-//   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+//   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
 //   Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
@@ -190,7 +190,41 @@ enum audioCodecType
        //       also add them to the output operator!
 };
 
-DSOEXPORT std::ostream& operator<< (std::ostream& os, const audioCodecType& t);
+inline std::ostream&
+operator<< (std::ostream& os, const audioCodecType& t)
+{
+    switch (t)
+    {
+        case AUDIO_CODEC_RAW:
+            os << "Raw";
+            break;
+        case AUDIO_CODEC_ADPCM:
+            os << "ADPCM";
+            break;
+        case AUDIO_CODEC_MP3:
+            os << "MP3";
+            break;
+        case AUDIO_CODEC_UNCOMPRESSED:
+            os << "Uncompressed";
+            break;
+        case AUDIO_CODEC_NELLYMOSER_8HZ_MONO:
+            os << "Nellymoser 8Hz mono";
+            break;
+        case AUDIO_CODEC_NELLYMOSER:
+            os << "Nellymoser";
+            break;
+        case AUDIO_CODEC_AAC:
+            os << "Advanced Audio Coding";
+            break;
+        case AUDIO_CODEC_SPEEX:
+            os << "Speex";
+            break;
+        default:
+            os << "unknown/invalid codec " << static_cast<int>(t);
+            break;
+    }
+    return os;
+}
 
 /// Information about an audio stream 
 //
diff --git a/libsound/Makefile.am b/libsound/Makefile.am
index a771188..1d0e092 100644
--- a/libsound/Makefile.am
+++ b/libsound/Makefile.am
@@ -1,5 +1,5 @@
 # 
-#   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+#   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2016
 #    Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
@@ -73,8 +73,13 @@ libgnashsound_la_CPPFLAGS = \
        $(SDL_CFLAGS) \
        $(NULL)
 
-libgnashsound_la_LIBADD = \
-       $(top_builddir)/libmedia/libgnashmedia.la \
+if BUILD_LIBMEDIA
+libgnashsound_la_LIBADD = $(top_builddir)/libmedia/libgnashmedia.la
+else
+libgnashsound_la_LIBADD =
+endif
+
+libgnashsound_la_LIBADD += \
        $(top_builddir)/libbase/libgnashbase.la \
        $(BOOST_LIBS) \
        $(SDL_LIBS) \

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/NetStream_as.cpp |   15 +++++++++++----
 libcore/asobj/Sound_as.cpp     |   17 +++++++++++++----
 libmedia/MediaParser.cpp       |   38 +-------------------------------------
 libmedia/MediaParser.h         |   38 ++++++++++++++++++++++++++++++++++++--
 libsound/Makefile.am           |   11 ++++++++---
 libsound/sound_handler.cpp     |   12 ++++++++++--
 6 files changed, 79 insertions(+), 52 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]