[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/SoundFfmpeg.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/SoundFfmpeg.cpp |
Date: |
Thu, 19 Jun 2008 23:07:16 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/06/19 23:07:16
Modified files:
. : ChangeLog
server/asobj : SoundFfmpeg.cpp
Log message:
attach aux streamer on loadSound, don't wait for .start() to be called..
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6989&r2=1.6990
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SoundFfmpeg.cpp?cvsroot=gnash&r1=1.27&r2=1.28
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6989
retrieving revision 1.6990
diff -u -b -r1.6989 -r1.6990
--- ChangeLog 19 Jun 2008 21:53:49 -0000 1.6989
+++ ChangeLog 19 Jun 2008 23:07:15 -0000 1.6990
@@ -1,5 +1,10 @@
2008-06-19 Sandro Santilli <address@hidden>
+ * server/asobj/SoundFfmpeg.cpp: attach aux streamer on loadSound,
+ don't wait for .start() to be called..
+
+2008-06-19 Sandro Santilli <address@hidden>
+
* libmedia/ffmpeg/sound_handler_sdl.cpp: fix mute() and unmute().
Have fun with the gtk menu control of it.
Index: server/asobj/SoundFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/SoundFfmpeg.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- server/asobj/SoundFfmpeg.cpp 19 Jun 2008 20:05:59 -0000 1.27
+++ server/asobj/SoundFfmpeg.cpp 19 Jun 2008 23:07:16 -0000 1.28
@@ -57,15 +57,21 @@
{
if ( ! _leftOverData )
{
+ bool parsingComplete =
_mediaParser->parsingCompleted(); // check *before* calling nextAudioFrame
std::auto_ptr<media::EncodedAudioFrame> frame =
_mediaParser->nextAudioFrame();
if ( ! frame.get() )
{
// just wait some more if parsing isn't
complete yet
- if ( ! _mediaParser->parsingCompleted() ) break;
+ if ( ! parsingComplete )
+ {
+ //log_debug("Parsing not complete and
no more audio frames in input, try again later");
+ break;
+ }
// or detach and stop here...
// (should really honour loopings if any)
//if ( remainingLoops.. )
+ //log_debug("Parsing complete and no more audio
frames in input, detaching");
return false; // will detach us
}
@@ -172,6 +178,11 @@
log_error(_("Could not create audio decoder for codec %d"),
audioInfo->codec);
}
+ // start playing ASAP, a call to ::start will just change _startTime
+ //log_debug("Attaching the aux streamer");
+ _soundHandler->attach_aux_streamer(getAudioWrapper, (void*) this);
+ isAttached = true;
+
}
void
@@ -210,9 +221,12 @@
remainingLoops = loops;
}
+ if ( ! isAttached )
+ {
_soundHandler->attach_aux_streamer(getAudioWrapper, (void*)
this);
isAttached = true;
}
+ }
else
{
_soundHandler->play_sound(soundId, loops, offset, 0, NULL);