changeset 2407:378e5732ba38

Слияние
author Ritor1
date Wed, 09 Jul 2014 18:19:54 +0600
parents 6997e2ad913b (current diff) 33659ef7fbac (diff)
children 4bb0b96cec90
files
diffstat 2 files changed, 21 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/MapsLongTimer.h	Sun Jul 06 16:27:17 2014 +0100
+++ b/MapsLongTimer.h	Wed Jul 09 18:19:54 2014 +0600
@@ -20,5 +20,5 @@
   __int16 field_1E;
 };
 #pragma pack(pop)
-extern MapsLongTimer MapsLongTimersList[100];
+extern MapsLongTimer MapsLongTimersList[100]; //array_5B5928
 
--- a/MediaPlayer.cpp	Sun Jul 06 16:27:17 2014 +0100
+++ b/MediaPlayer.cpp	Wed Jul 09 18:19:54 2014 +0600
@@ -23,6 +23,7 @@
 #include "Log.h"
 
 #include "MediaPlayer.h"
+#include "Log.h"
 using namespace Media;
 
 Media::MPlayer *pMediaPlayer;
@@ -36,44 +37,48 @@
 void PlayAudio(const wchar_t * pFilename);
 void LoadMovie(const char *);
  
-class MemoryStream
+class MemoryStream //    
 {
   public:
-    inline MemoryStream(void *data, size_t data_size)
+    inline MemoryStream(void *data, size_t data_size)//inline -    , MemoryStream -  
     {
       this->data_size = data_size;
       this->data = data;
       this->current_pos = 0;
     }
-    inline MemoryStream()
+    inline MemoryStream() //  
     {
       this->data_size = 0;
       this->data = nullptr;
       this->current_pos = 0;
     }
 
-    inline ~MemoryStream()
+    inline ~MemoryStream()//  
     {
+      //Log::Warning(L"Destructor: data delete %u", data);
       if (data)
         delete [] data;
     }
 
-    inline size_t Write(void *buffer, size_t num_bytes)
+    inline size_t Write(void *buffer, size_t num_bytes)//  
     {
       if (!data)
       {
         data_size = 32 + num_bytes;
-        data = new char[data_size];
+        data = new char[data_size];//   data
+        //Log::Warning(L"new data %u", data);
         current_pos = 0;
       }
-      else if (current_pos + num_bytes >= data_size)
+      else if (current_pos + num_bytes >= data_size) //   
       {
         int  new_data_size = data_size + num_bytes + data_size / 8 + 4;
-        auto new_data = new char[new_data_size];
+        auto new_data = new char[new_data_size];// 
+        //Log::Warning(L"new new_data %u", new_data);
 
         memcpy(new_data, data, data_size);
-        delete [] data;
-        
+        //Log::Warning(L"data delete %u", data);
+        delete [] data;//   data
+
         data_size = new_data_size;
         data = new_data;
       }
@@ -82,7 +87,7 @@
       return num_bytes;
     }
 
-    inline size_t Read(void *buffer, size_t num_bytes)
+    inline size_t Read(void *buffer, size_t num_bytes) //  
     {
       size_t read_size = min(num_bytes, data_size - current_pos);
       if (read_size)
@@ -93,11 +98,11 @@
       return read_size;
     }
 
-    inline void Reset()
+    inline void Reset()//
     {
       current_pos = 0;
     }
-    inline void SeekToEnd()
+    inline void SeekToEnd()//  
     {
       current_pos = data_size;
     }
@@ -931,6 +936,7 @@
           if (video.dec_ctx->frame_number >= video.stream->duration - 1 )
             end_current_file = true;
         }
+        // 
         if (av_read_frame(format_ctx, avpacket) < 0) // 
         {
           // probably movie is finished
@@ -947,7 +953,7 @@
           if (DecodeAudioFrame(audio.dec_ctx, avpacket, avframe, &audio_data, &num_audio_samples))
             provider->Stream16(audio_data_in_device, num_audio_samples, audio_data.Ptr());
           //continue;
-        }
+        } //    audio_data
 
 		// Decode video frame
         //