gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp


From: Markus Gothe
Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp
Date: Fri, 27 Oct 2006 16:12:52 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  06/10/27 16:12:52

Modified files:
        .              : ChangeLog 
        server/asobj   : NetStream.cpp 

Log message:
        Sleep -> sleep. #ifndef __GNUC__ fmod = std::fmod.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1422&r2=1.1423
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.6&r2=1.7

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1422
retrieving revision 1.1423
diff -u -b -r1.1422 -r1.1423
--- ChangeLog   27 Oct 2006 15:45:58 -0000      1.1422
+++ ChangeLog   27 Oct 2006 16:12:52 -0000      1.1423
@@ -2,6 +2,7 @@
 
        * server/asobj/NetStream.{h,cpp}: Uint8 -> uint8_t. #ifdef USE_FFMPEG.
          Fixed typo of StreamProvider.h for case-sensitive-compilers.
+         Sleep -> sleep. #ifndef __GNUC__ fmod = std::fmod.
 
 2006-10-27 Vitaly Alexeev <address@hidden>
 

Index: server/asobj/NetStream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/asobj/NetStream.cpp  27 Oct 2006 15:53:02 -0000      1.6
+++ server/asobj/NetStream.cpp  27 Oct 2006 16:12:52 -0000      1.7
@@ -36,7 +36,7 @@
 //
 //
 
-/* $Id: NetStream.cpp,v 1.6 2006/10/27 15:53:02 nihilus Exp $ */
+/* $Id: NetStream.cpp,v 1.7 2006/10/27 16:12:52 nihilus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,6 +54,10 @@
        #include <Windows.h>    // for sleep()
 #endif
 
+#ifndef __GNUC__
+       #define fmod std::fmod
+#endif
+
 namespace gnash {
 
 
@@ -133,7 +137,7 @@
 void
 NetStream::play(const char* c_url)
 {
-#ifdef USE_FFMPEG
+
 /*     URL url(c_url);
 
        tu_file* in = globals::streamProvider.getStream(url);
@@ -152,7 +156,7 @@
        // This registers all available file formats and codecs 
        // with the library so they will be used automatically when
        // a file with the corresponding format/codec is opened
-
+#ifdef USE_FFMPEG
        if (m_FormatCtx)
        {
                return;
@@ -273,16 +277,14 @@
        }
 
        m_frame_time = (float)m_VCodecCtx->time_base.num / 
(float)m_VCodecCtx->time_base.den;
-
+#endif
 //     m_thread = SDL_CreateThread(NetStream::av_streamer, this);
        pthread_create(&m_thread, NULL, NetStream::av_streamer, this);
-#endif
 }
 
 // decoder thread
 void* NetStream::av_streamer(void* arg)
 {
-#ifdef USE_FFMPEG
        NetStream* ns = static_cast<NetStream*>(arg);
        raw_videodata_t* unqueued_data = NULL;
 
@@ -302,7 +304,7 @@
                if (unqueued_data)
                {
                        //SDL_Delay(25);        
-                       Sleep(25);
+                       sleep(25);
                }
        }
        ns->m_go = false;
@@ -311,13 +313,11 @@
   pthread_testcancel();
 
        return 0;
-#endif
 }
 
 // audio callback is running in sound handler thread
 void NetStream::audio_streamer(uint8_t *stream, int len)
 {
-#ifdef USE_FFMPEG
        while (len > 0 && m_qaudio.size() > 0)
        {
                raw_videodata_t* samples = m_qaudio.front();
@@ -342,12 +342,10 @@
                        samples->m_size -= n;
                }
        }
-#endif
 }
 
 void NetStream::advance(float delta_time)
 {
-#ifdef USE_FFMPEG
        m_time_remainder += delta_time;
        if (m_time_remainder >= m_frame_time)
        {
@@ -361,10 +359,9 @@
                }
                m_time_remainder = fmod(m_time_remainder, m_frame_time);
        }
-#endif
 }
 
-#ifdef USE_FFMPEG
+
 raw_videodata_t* NetStream::read_frame(raw_videodata_t* unqueued_data)
 {
        raw_videodata_t* ret = NULL;
@@ -385,7 +382,7 @@
 
                return ret;
        }
-
+#ifdef USE_FFMPEG
        AVPacket packet;
        if (av_read_frame(m_FormatCtx, &packet) >= 0)
        {
@@ -456,10 +453,10 @@
                }
                av_free_packet(&packet);
        }
-
+#endif
        return ret;
 }
-#endif
+
 
 YUV_video* NetStream::get_video()
 {




reply via email to

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