Mercurial > mm7
changeset 2319:9987f93d7e1f
stuff.h
author | Ritor1 |
---|---|
date | Thu, 20 Mar 2014 18:44:27 +0600 |
parents | 133882370e83 |
children | 847aba0b7f82 |
files | Build/Visual Studio 2012/World of Might and Magic.vcxproj Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters MediaPlayer.cpp OpenALSoundProvider.h |
diffstat | 4 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj Thu Mar 20 17:38:29 2014 +0600 +++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj Thu Mar 20 18:44:27 2014 +0600 @@ -184,6 +184,7 @@ <ClCompile Include="..\..\Log.cpp" /> <ClCompile Include="..\..\LuaVM.cpp" /> <ClCompile Include="..\..\MapInfo.cpp" /> + <ClCompile Include="..\..\MediaPlayer.cpp" /> <ClCompile Include="..\..\mm7text_ru.cpp" /> <ClCompile Include="..\..\mm7_2.cpp" /> <ClCompile Include="..\..\mm7_3.cpp" /> @@ -425,6 +426,7 @@ <ClInclude Include="..\..\Log.h" /> <ClInclude Include="..\..\LuaVM.h" /> <ClInclude Include="..\..\MapInfo.h" /> + <ClInclude Include="..\..\MediaPlayer.h" /> <ClInclude Include="..\..\MM7.h" /> <ClInclude Include="..\..\mm7_data.h" /> <ClInclude Include="..\..\mm7_unsorted_subs.h" /> @@ -436,6 +438,7 @@ <ClInclude Include="..\..\NPC.h" /> <ClInclude Include="..\..\NZIArray.h" /> <ClInclude Include="..\..\ObjectList.h" /> + <ClInclude Include="..\..\OpenALSoundProvider.h" /> <ClInclude Include="..\..\OSAPI.h" /> <ClInclude Include="..\..\OSInfo.h" /> <ClInclude Include="..\..\OSWindow.h" /> @@ -465,6 +468,7 @@ <ClInclude Include="..\..\stru367.h" /> <ClInclude Include="..\..\stru6.h" /> <ClInclude Include="..\..\stru9.h" /> + <ClInclude Include="..\..\stuff.h" /> <ClInclude Include="..\..\TestClass.h" /> <ClInclude Include="..\..\texts.h" /> <ClInclude Include="..\..\Texture.h" />
--- a/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters Thu Mar 20 17:38:29 2014 +0600 +++ b/Build/Visual Studio 2012/World of Might and Magic.vcxproj.filters Thu Mar 20 18:44:27 2014 +0600 @@ -384,6 +384,7 @@ <ClCompile Include="..\..\lib\libpng\pngwutil.c"> <Filter>lib\libpng</Filter> </ClCompile> + <ClCompile Include="..\..\MediaPlayer.cpp" /> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\Level\Decoration.h" /> @@ -907,6 +908,9 @@ <ClInclude Include="..\..\lib\libpng\pngstruct.h"> <Filter>lib\libpng</Filter> </ClInclude> + <ClInclude Include="..\..\MediaPlayer.h" /> + <ClInclude Include="..\..\OpenALSoundProvider.h" /> + <ClInclude Include="..\..\stuff.h" /> </ItemGroup> <ItemGroup> <None Include="..\..\Player.swig" />
--- a/MediaPlayer.cpp Thu Mar 20 17:38:29 2014 +0600 +++ b/MediaPlayer.cpp Thu Mar 20 18:44:27 2014 +0600 @@ -7,7 +7,6 @@ #include "lib/libswscale/swscale.h" #include "lib/libswresample/swresample.h" #include "lib/libavutil/opt.h" - //#include "libavutil/samplefmt.h" } #pragma comment(lib, "avcodec.lib") #pragma comment(lib, "avformat.lib") @@ -25,8 +24,6 @@ using namespace Media; - - class MemoryStream { public: @@ -662,9 +659,9 @@ { } - virtual void GetNextFrame(double dt, void *dst_surface) + virtual void GetNextFrame(double dt, void *dst_surface)// рисует сразу на экран { - playback_time += dt; + playback_time += dt;//изменение времени AVPacket *avpacket = decoding_packet; AVFrame *avframe = decoding_frame; @@ -680,7 +677,7 @@ volatile int decoded = false; do { - if (av_read_frame(format_ctx, avpacket) < 0) + if (av_read_frame(format_ctx, avpacket) < 0) //воспроизведение завершено { // probably movie is finished __debugbreak();