Explorar o código

V1.8.0

1.代码结构调整(将底层播放器和Qt界面分开成2个模块,底层播放器代码使用纯c++编写,方便播放器模块的移植)
2.支持播放不带音频流的视频文件
叶海辉 %!s(int64=6) %!d(string=hai) anos
pai
achega
eb724c65c2
Modificáronse 100 ficheiros con 955 adicións e 276 borrados
  1. BIN=BIN
      SDL2/lib/x64/SDL2.dll
  2. BIN=BIN
      SDL2/lib/x64/SDL2.lib
  3. BIN=BIN
      SDL2/lib/x64/SDL2main.lib
  4. BIN=BIN
      SDL2/lib/x64/SDL2test.lib
  5. 29 31
      VideoPlayer.pro
  6. 318 0
      VideoPlayer.pro.user
  7. 0 0
      bin/SDL2.dll
  8. BIN=BIN
      bin/VideoPlayer.exe
  9. BIN=BIN
      bin/VideoPlayer.pdb
  10. 0 0
      bin/avcodec-56.dll
  11. 0 0
      bin/avdevice-56.dll
  12. 0 0
      bin/avfilter-5.dll
  13. 0 0
      bin/avformat-56.dll
  14. 0 0
      bin/avutil-54.dll
  15. 0 0
      bin/ffmpeg.exe
  16. 0 0
      bin/ffplay.exe
  17. 0 0
      bin/ffprobe.exe
  18. 0 0
      bin/postproc-53.dll
  19. 0 0
      bin/swresample-1.dll
  20. 0 0
      bin/swscale-3.dll
  21. BIN=BIN
      ffmpeg/bin/SDL2.dll
  22. 89 245
      module/DragAbleWidget/DragAbleWidget.cpp
  23. 67 0
      module/DragAbleWidget/DragAbleWidget.h
  24. 10 0
      module/DragAbleWidget/DragAbleWidget.pri
  25. 409 0
      module/DragAbleWidget/DragAbleWidget.ui
  26. 33 0
      module/VideoPlayer/VideoPlayer.pri
  27. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL.h
  28. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_assert.h
  29. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_atomic.h
  30. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_audio.h
  31. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_bits.h
  32. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_blendmode.h
  33. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_clipboard.h
  34. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_config.h
  35. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_cpuinfo.h
  36. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_endian.h
  37. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_error.h
  38. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_events.h
  39. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_filesystem.h
  40. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_gamecontroller.h
  41. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_gesture.h
  42. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_haptic.h
  43. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_hints.h
  44. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_joystick.h
  45. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_keyboard.h
  46. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_keycode.h
  47. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_loadso.h
  48. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_log.h
  49. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_main.h
  50. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_messagebox.h
  51. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_mouse.h
  52. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_mutex.h
  53. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_name.h
  54. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_opengl.h
  55. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_opengles.h
  56. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_opengles2.h
  57. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_pixels.h
  58. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_platform.h
  59. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_power.h
  60. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_quit.h
  61. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_rect.h
  62. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_render.h
  63. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_revision.h
  64. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_rwops.h
  65. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_scancode.h
  66. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_shape.h
  67. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_stdinc.h
  68. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_surface.h
  69. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_system.h
  70. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_syswm.h
  71. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test.h
  72. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_assert.h
  73. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_common.h
  74. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_compare.h
  75. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_crc32.h
  76. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_font.h
  77. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_fuzzer.h
  78. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_harness.h
  79. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_images.h
  80. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_log.h
  81. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_md5.h
  82. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_test_random.h
  83. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_thread.h
  84. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_timer.h
  85. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_touch.h
  86. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_types.h
  87. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_version.h
  88. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/SDL_video.h
  89. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/begin_code.h
  90. 0 0
      module/VideoPlayer/lib/win32/SDL2/include/close_code.h
  91. 0 0
      module/VideoPlayer/lib/win32/SDL2/lib/SDL2.lib
  92. 0 0
      module/VideoPlayer/lib/win32/SDL2/lib/SDL2main.lib
  93. 0 0
      module/VideoPlayer/lib/win32/SDL2/lib/SDL2test.lib
  94. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/avcodec.h
  95. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/avfft.h
  96. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/dv_profile.h
  97. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/dxva2.h
  98. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/old_codec_ids.h
  99. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/vaapi.h
  100. 0 0
      module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/vda.h

BIN=BIN
SDL2/lib/x64/SDL2.dll


BIN=BIN
SDL2/lib/x64/SDL2.lib


BIN=BIN
SDL2/lib/x64/SDL2main.lib


BIN=BIN
SDL2/lib/x64/SDL2test.lib


+ 29 - 31
VideoPlayer.pro

@@ -8,45 +8,43 @@ QT       += core gui
 
 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
-TARGET = VideoPlayer
-TEMPLATE = app
 
-SOURCES += src/main.cpp \
-    src/videoplayer/videoplayer_thread.cpp \
-    src/videoplayer/videoplayer.cpp \
-    src/videoplayer/videoplayer_showvideowidget.cpp \
-    src/videoplayer/widget/VideoSlider.cpp
+UI_DIR  = obj/Gui
+MOC_DIR = obj/Moc
+OBJECTS_DIR = obj/Obj
 
-HEADERS  += \
-    src/videoplayer/videoplayer_thread.h \
-    src/videoplayer/videoplayer.h \
-    src/videoplayer/videoplayer_showvideowidget.h \
-    src/videoplayer/widget/VideoSlider.h
 
-FORMS    += \
-    src/videoplayer/videoplayer.ui \
-    src/videoplayer/videoplayer_showvideowidget.ui
+#将输出文件直接放到源码目录下的bin目录下,将dll都放在了次目录中,用以解决运行后找不到dll的问
+#DESTDIR=$$OUT_PWD/bin/
+DESTDIR=$$PWD/bin/
+QMAKE_CXXFLAGS += -std=c++11
+
+TARGET = VideoPlayer
+TEMPLATE = app
 
+#包含视频播放器的代码
+include(module/VideoPlayer/VideoPlayer.pri)
+#包含可拖动窗体的代码
+include(module/DragAbleWidget/DragAbleWidget.pri)
 
-INCLUDEPATH += $$PWD/ffmpeg/include \
-               $$PWD/SDL2/include \
-               $$PWD/src
+SOURCES += src/main.cpp \
+    src/Widget/VideoPlayerWidget.cpp \
+    src/Widget/ShowVideoWidget.cpp \
+    src/Widget/VideoSlider.cpp
 
-#LIBS += $$PWD/ffmpeg/lib/avcodec.lib \
-#        $$PWD/ffmpeg/lib/avdevice.lib \
-#        $$PWD/ffmpeg/lib/avfilter.lib \
-#        $$PWD/ffmpeg/lib/avformat.lib \
-#        $$PWD/ffmpeg/lib/avutil.lib \
-#        $$PWD/ffmpeg/lib/postproc.lib \
-#        $$PWD/ffmpeg/lib/swresample.lib \
-#        $$PWD/ffmpeg/lib/swscale.lib \
-#        $$PWD/SDL2/lib/x86/SDL2.lib
 
-LIBS += -L$$PWD/ffmpeg/lib -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lswresample -lswscale
-LIBS += -L$$PWD/SDL2/lib/x86 -lSDL2
+HEADERS  += \
+    src/Widget/VideoPlayerWidget.h \
+    src/Widget/ShowVideoWidget.h \
+    src/Widget/VideoSlider.h
 
+FORMS    += \
+    src/Widget/VideoPlayerWidget.ui \
+    src/Widget/ShowVideoWidget.ui
 
 RESOURCES += \
-    resources.qrc
+    resources/resources.qrc
+
+INCLUDEPATH += $$PWD/src
 
-win32:RC_FILE=$$PWD/main.rc
+win32:RC_FILE=$$PWD/resources/main.rc

+ 318 - 0
VideoPlayer.pro.user

@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.0.3, 2019-03-19T14:15:01. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{60719a71-fdb8-4fb3-939c-cdb5596b2c1d}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+    <value type="QString" key="language">Cpp</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+    </valuemap>
+   </valuemap>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+    <value type="QString" key="language">QmlJS</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+    </valuemap>
+   </valuemap>
+   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+   <value type="QByteArray" key="EditorConfiguration.Codec">GBK</value>
+   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+   <value type="int" key="EditorConfiguration.IndentSize">4</value>
+   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+   <value type="int" key="EditorConfiguration.TabSize">8</value>
+   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.PluginSettings</variable>
+  <valuemap type="QVariantMap"/>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.6.2 MSVC2013 32bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.6.2 MSVC2013 32bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.56.win32_msvc2013_kit</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/MyProjects/build-VideoPlayer-Desktop_Qt_5_6_2_MSVC2013_32bit-Debug</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/MyProjects/build-VideoPlayer-Desktop_Qt_5_6_2_MSVC2013_32bit-Release</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/MyProjects/build-VideoPlayer-Desktop_Qt_5_6_2_MSVC2013_32bit-Profile</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">在本地部署</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
+    <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
+    <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
+    <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
+    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">VideoPlayer</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/MyProjects/VideoPlayer/VideoPlayer.pro</value>
+    <value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">VideoPlayer.pro</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory">E:/MyProjects/VideoPlayer/bin</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">E:/MyProjects/VideoPlayer/bin/</value>
+    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">18</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">18</value>
+ </data>
+</qtcreator>

+ 0 - 0
SDL2/lib/x86/SDL2.dll → bin/SDL2.dll


BIN=BIN
bin/VideoPlayer.exe


BIN=BIN
bin/VideoPlayer.pdb


+ 0 - 0
ffmpeg/bin/avcodec-56.dll → bin/avcodec-56.dll


+ 0 - 0
ffmpeg/bin/avdevice-56.dll → bin/avdevice-56.dll


+ 0 - 0
ffmpeg/bin/avfilter-5.dll → bin/avfilter-5.dll


+ 0 - 0
ffmpeg/bin/avformat-56.dll → bin/avformat-56.dll


+ 0 - 0
ffmpeg/bin/avutil-54.dll → bin/avutil-54.dll


+ 0 - 0
ffmpeg/bin/ffmpeg.exe → bin/ffmpeg.exe


+ 0 - 0
ffmpeg/bin/ffplay.exe → bin/ffplay.exe


+ 0 - 0
ffmpeg/bin/ffprobe.exe → bin/ffprobe.exe


+ 0 - 0
ffmpeg/bin/postproc-53.dll → bin/postproc-53.dll


+ 0 - 0
ffmpeg/bin/swresample-1.dll → bin/swresample-1.dll


+ 0 - 0
ffmpeg/bin/swscale-3.dll → bin/swscale-3.dll


BIN=BIN
ffmpeg/bin/SDL2.dll


+ 89 - 245
src/videoplayer/videoplayer.cpp → module/DragAbleWidget/DragAbleWidget.cpp

@@ -1,93 +1,42 @@
-/**
- * �海辉
- * QQ群121376426
+/**
+ * Ò¶º£»Ô
+ * QQȺ121376426
  * http://blog.yundiantech.com/
  */
 
-#include "videoplayer.h"
-#include "ui_videoplayer.h"
+#include "DragAbleWidget.h"
+#include "ui_DragAbleWidget.h"
 
-#include <QPainter>
-#include <QPaintEvent>
-#include <QFileDialog>
-#include <QDebug>
 #include <QDesktopWidget>
-#include <QFontDatabase>
 #include <QMouseEvent>
+#include <QTimer>
+#include <QDebug>
 
-#define MARGINS 2 //窗体边框
-
-Q_DECLARE_METATYPE(VideoPlayer_Thread::PlayerState)
+#define MARGINS 2 //´°Ìå±ß¿ò
 
-VideoPlayer::VideoPlayer(QWidget *parent) :
+DragAbleWidget::DragAbleWidget(QWidget *parent) :
     QWidget(parent),
-    ui(new Ui::VideoPlayer)
+    ui(new Ui::DragAbleWidget)
 {
     ui->setupUi(this);
 
-    setWindowFlags(Qt::FramelessWindowHint);//|Qt::WindowStaysOnTopHint);  //使窗�的标题���
-    setAttribute(Qt::WA_TranslucentBackground);
-
-    av_register_all(); //�始化FFMPEG  调用了这个�能正常使用编�器和解�器
-    avformat_network_init(); //支�打开网络文件
-
-    if (SDL_Init(SDL_INIT_AUDIO)) {
-        fprintf(stderr,"Could not initialize SDL - %s. \n", SDL_GetError());
-        exit(1);
-    }
-
-    //因为VideoPlayer::PlayerState是自定义的类型 �跨线程传递需�先注册一下
-    qRegisterMetaType<VideoPlayer_Thread::PlayerState>();
-
-
-    mPlayer = new VideoPlayer_Thread;
-    connect(mPlayer,SIGNAL(sig_TotalTimeChanged(qint64)),this,SLOT(slotTotalTimeChanged(qint64)));
-    connect(mPlayer,SIGNAL(sig_StateChanged(VideoPlayer_Thread::PlayerState)),this,SLOT(slotStateChanged(VideoPlayer_Thread::PlayerState)));
-
-    mPlayer->setVideoWidget(ui->widget_videoPlayer);
-
-    mTimer = new QTimer; //定时器-获�当�视频时间
-    connect(mTimer,SIGNAL(timeout()),this,SLOT(slotTimerTimeOut()));
-    mTimer->setInterval(500);
-
-    connect(ui->pushButton_open,SIGNAL(clicked()),this,SLOT(slotBtnClick()));
-    connect(ui->toolButton_open,SIGNAL(clicked()),this,SLOT(slotBtnClick()));
-    connect(ui->pushButton_play,SIGNAL(clicked()),this,SLOT(slotBtnClick()));
-    connect(ui->pushButton_pause,SIGNAL(clicked()),this,SLOT(slotBtnClick()));
-    connect(ui->pushButton_stop,SIGNAL(clicked()),this,SLOT(slotBtnClick()));
-
-//    connect(ui->horizontalSlider,SIGNAL(sliderMoved(int)),this,SLOT(slotSliderMoved(int)));
-    connect(ui->horizontalSlider,SIGNAL(sig_valueChanged(int)),this,SLOT(slotSliderMoved(int)));
-
-    connect(ui->horizontalSlider_volume,SIGNAL(valueChanged(int)),this,SLOT(slotSliderMoved(int)));
-
-    resize(1024,768);
-
-    setTitle(QStringLiteral("我的播放器"));
-
-    ui->widget_video->hide();
-
-    ui->pushButton_pause->hide();
-
-
-
-
-///改�窗体大�相关
+///¸Ä±ä´°Ìå´óСÏà¹Ø
     isMax = false;
 
     int w = this->width();
     int h = this->height();
 
-    QRect screenRect = QApplication::desktop()->screenGeometry();//获�设备�幕大�
+    QRect screenRect = QApplication::desktop()->screenGeometry();//»ñÈ¡É豸ÆÁÄ»´óС
     int x = (screenRect.width() - w) / 2;
     int y = (screenRect.height() - h) / 2;
 
-    mLocation = QRect(x, y, w, h);
-    this->setGeometry(mLocation);
+    mLocation = this->geometry();
+//    mLocation = QRect(x, y, w, h);
+//    this->setGeometry(mLocation);
 
     isLeftPressDown = false;
     this->dir = NONE;
-    this->setMouseTracking(true);// 追踪鼠标
+    this->setMouseTracking(true);// ×·×ÙÊó±ê
     ui->widget_frame->setMouseTracking(true);
     ui->widget_back->setMouseTracking(true);
     ui->widget_container->setMouseTracking(true);
@@ -100,149 +49,43 @@ VideoPlayer::VideoPlayer(QWidget *parent) :
 
 //    ui->widget_frame->setContentsMargins(1, 1, 1, 1);
 
-    //安装事件监�器,让标题�识别鼠标�击
+    //°²×°Ê¼þ¼àÌýÆ÷,ÈñêÌâÀ¸Ê¶±ðÊó±êË«»÷
 //    ui->widget_beingClass_back->installEventFilter(this);
 
-
-
 }
 
-VideoPlayer::~VideoPlayer()
+DragAbleWidget::~DragAbleWidget()
 {
-    delete ui;
+
 }
 
-void VideoPlayer::doClose()
+QWidget *DragAbleWidget::getContainWidget()
 {
-    mPlayer->stop(true);
-    close();
+    return ui->widget_container;
 }
 
-void VideoPlayer::setTitle(QString str)
+void DragAbleWidget::setTitle(QString str)
 {
     ui->label_titleName->setText(str);
     this->setWindowTitle(str);
 }
 
-void VideoPlayer::slotTotalTimeChanged(qint64 uSec)
-{
-    qint64 Sec = uSec/1000000;
-
-    ui->horizontalSlider->setRange(0,Sec);
-
-//    QString hStr = QString("00%1").arg(Sec/3600);
-    QString mStr = QString("00%1").arg(Sec/60);
-    QString sStr = QString("00%1").arg(Sec%60);
-
-    QString str = QString("%1:%2").arg(mStr.right(2)).arg(sStr.right(2));
-    ui->label_totaltime->setText(str);
-
-}
-
-void VideoPlayer::slotSliderMoved(int value)
-{
-    if (QObject::sender() == ui->horizontalSlider)
-    {
-        mPlayer->seek((qint64)value * 1000000);
-    }
-    else if (QObject::sender() == ui->horizontalSlider_volume)
-    {
-        mPlayer->setVolume(value / 100.0);
-        ui->label_volume->setText(QString("%1").arg(value));
-    }
-}
-
-void VideoPlayer::slotTimerTimeOut()
-{
-    if (QObject::sender() == mTimer)
-    {
-
-        qint64 Sec = mPlayer->getCurrentTime();
-
-        ui->horizontalSlider->setValue(Sec);
-
-    //    QString hStr = QString("00%1").arg(Sec/3600);
-        QString mStr = QString("00%1").arg(Sec/60);
-        QString sStr = QString("00%1").arg(Sec%60);
-
-        QString str = QString("%1:%2").arg(mStr.right(2)).arg(sStr.right(2));
-        ui->label_currenttime->setText(str);
-    }
-}
-
-void VideoPlayer::slotBtnClick()
-{
-    if (QObject::sender() == ui->pushButton_play)
-    {
-        mPlayer->play();
-    }
-    else if (QObject::sender() == ui->pushButton_pause)
-    {
-        mPlayer->pause();
-    }
-    else if (QObject::sender() == ui->pushButton_stop)
-    {
-        mPlayer->stop(true);
-    }
-    else if (QObject::sender() == ui->pushButton_open || QObject::sender() == ui->toolButton_open)
-    {
-        QString s = QFileDialog::getOpenFileName(
-                   this, "选择�播放的文件",
-                    "/",//�始目录
-                    "视频文件 (*.flv *.rmvb *.avi *.MP4);; 所有文件 (*.*);; ");
-        if (!s.isEmpty())
-        {
-            s.replace("/","\\");
-
-            mPlayer->stop(true); //如果在播放则先�止
-            mPlayer->setFileName(s);
-            mTimer->start();
-        }
-    }
-
-}
+////////////¸Ä±ä´°Ìå´óСÏà¹Ø
 
-void VideoPlayer::slotStateChanged(VideoPlayer_Thread::PlayerState state)
+void DragAbleWidget::mouseReleaseEvent(QMouseEvent *event)
 {
-
-    if (state == VideoPlayer_Thread::Stop)
+    if(event->button() == Qt::LeftButton)
     {
-        ui->widget_video->hide();
-        ui->widget_showopen->show();
-        ui->pushButton_pause->hide();
-    }
-    else if (state == VideoPlayer_Thread::Playing)
-    {
-        ui->widget_showopen->hide();
-        ui->widget_video->show();
-
-        ui->pushButton_play->hide();
-        ui->pushButton_pause->show();
-    }
-    else if (state == VideoPlayer_Thread::Pause)
-    {
-        ui->pushButton_pause->hide();
-        ui->pushButton_play->show();
-    }
-}
-
-
-
-
-////////////改�窗体大�相关
-
-void VideoPlayer::mouseReleaseEvent(QMouseEvent *event)
-{
-    if(event->button() == Qt::LeftButton){
         isLeftPressDown = false;
-        if(dir != NONE) {
+        if(dir != NONE)
+        {
             this->releaseMouse();
             this->setCursor(QCursor(Qt::ArrowCursor));
         }
     }
 }
 
-void VideoPlayer::mousePressEvent(QMouseEvent *event)
+void DragAbleWidget::mousePressEvent(QMouseEvent *event)
 {
 //    qDebug()<<__FUNCTION__;
     if (event->type() == QEvent::MouseButtonDblClick)
@@ -251,7 +94,7 @@ void VideoPlayer::mousePressEvent(QMouseEvent *event)
         {
 //            if(QApplication::keyboardModifiers() == (Qt::ControlModifier|Qt::ShiftModifier|Qt::AltModifier))
             {
-                doChangeFullScreen(); //ctrl + 左键
+                doChangeFullScreen(); //ctrl + ×ó¼ü
             }
         }
     }
@@ -281,7 +124,7 @@ void VideoPlayer::mousePressEvent(QMouseEvent *event)
 
 }
 
-void VideoPlayer::mouseMoveEvent(QMouseEvent *event)
+void DragAbleWidget::mouseMoveEvent(QMouseEvent *event)
 {
 //    qDebug()<<__FUNCTION__;
 
@@ -373,13 +216,13 @@ void VideoPlayer::mouseMoveEvent(QMouseEvent *event)
             event->accept();
         }
     }
-//    QWidget::mouseMoveEvent(event);�
+//    QWidget::mouseMoveEvent(event);¡¢
     event->accept();
 }
 
-void VideoPlayer::checkCursorDirect(const QPoint &cursorGlobalPoint)
+void DragAbleWidget::checkCursorDirect(const QPoint &cursorGlobalPoint)
 {
-    // 获�窗体在�幕上的�置区域,tl为topleft点,rb为rightbottom点
+    // »ñÈ¡´°ÌåÔÚÆÁÄ»ÉϵÄλÖÃÇøÓò£¬tlΪtopleftµã£¬rbΪrightbottomµã
     QRect rect = this->rect();
     QPoint tl = mapToGlobal(rect.topLeft());
     QPoint rb = mapToGlobal(rect.bottomRight());
@@ -388,96 +231,57 @@ void VideoPlayer::checkCursorDirect(const QPoint &cursorGlobalPoint)
     int y = cursorGlobalPoint.y();
 
     if(tl.x() + PADDING >= x && tl.x() <= x && tl.y() + PADDING >= y && tl.y() <= y) {
-        // 左上角
+        // ×óÉϽÇ
         dir = LEFTTOP;
-        this->setCursor(QCursor(Qt::SizeFDiagCursor));  // 设置鼠标形状
+        this->setCursor(QCursor(Qt::SizeFDiagCursor));  // ÉèÖÃÊó±êÐÎ×´
     } else if(x >= rb.x() - PADDING && x <= rb.x() && y >= rb.y() - PADDING && y <= rb.y()) {
-        // �下角
+        // ÓÒϽÇ
         dir = RIGHTBOTTOM;
         this->setCursor(QCursor(Qt::SizeFDiagCursor));
     } else if(x <= tl.x() + PADDING && x >= tl.x() && y >= rb.y() - PADDING && y <= rb.y()) {
-        //左下角
+        //×óϽÇ
         dir = LEFTBOTTOM;
         this->setCursor(QCursor(Qt::SizeBDiagCursor));
     } else if(x <= rb.x() && x >= rb.x() - PADDING && y >= tl.y() && y <= tl.y() + PADDING) {
-        // �上角
+        // ÓÒÉϽÇ
         dir = RIGHTTOP;
         this->setCursor(QCursor(Qt::SizeBDiagCursor));
     } else if(x <= tl.x() + PADDING && x >= tl.x()) {
-        // 左边
+        // ×ó±ß
         dir = LEFT;
         this->setCursor(QCursor(Qt::SizeHorCursor));
     } else if( x <= rb.x() && x >= rb.x() - PADDING) {
-        // �边
+        // ÓÒ±ß
         dir = RIGHT;
         this->setCursor(QCursor(Qt::SizeHorCursor));
     }else if(y >= tl.y() && y <= tl.y() + PADDING){
-        // 上边
+        // Éϱß
         dir = UP;
         this->setCursor(QCursor(Qt::SizeVerCursor));
     } else if(y <= rb.y() && y >= rb.y() - PADDING) {
-        // 下边
+        // 챧
         dir = DOWN;
         this->setCursor(QCursor(Qt::SizeVerCursor));
     }else {
-        // 默认
+        // ĬÈÏ
         dir = NONE;
         this->setCursor(QCursor(Qt::ArrowCursor));
     }
 }
 
 
-void VideoPlayer::on_btnMenu_Close_clicked()
-{
-    qDebug()<<__FUNCTION__;
-
-    close();
-
-//    QTimer::singleShot(500,this,[&]()
-//    {
-//        QPoint pt(0, 0);
-//        QMouseEvent evt(QEvent::Leave, pt, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-//        qApp->sendEvent(ui->btnMenu_Close, &evt);
-//    });
-
-}
-
-void VideoPlayer::on_btnMenu_Max_clicked()
-{
-    doChangeFullScreen();
-}
-
-void VideoPlayer::on_btnMenu_Min_clicked()
-{
-    if (this->isFullScreen())
-    {
-//        mAnimation->stop();
-//        mTimer_CheckTitle->stop();
-        ui->widget_title->move(ui->widget_title->x(), 0 - ui->widget_title->height());
-        ui->widget_title->hide();
-    }
-    this->showMinimized();
-
-    QTimer::singleShot(500,this,[&]()
-    {
-        QPoint pt(0, 0);
-        QMouseEvent evt(QEvent::Leave, pt, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-        qApp->sendEvent(ui->btnMenu_Min, &evt);
-    });
-}
-
-void VideoPlayer::doShowFullScreen()
+void DragAbleWidget::doShowFullScreen()
 {
     this->show();
     this->showFullScreen();
     this->raise();
-    ui->widget_frame->setContentsMargins(0,0,0,0); //��边框
+    ui->widget_frame->setContentsMargins(0,0,0,0); //Òþ²Ø±ß¿ò
 
     showBorderRadius(false);
 
     ui->btnMenu_Max->setIcon(QIcon(":/image/shownormalbtn.png"));
 
-    ui->widget_title->hide(); //��标题�
+    ui->widget_title->hide(); //Òþ²Ø±êÌâÀ¸
 //    ui->verticalLayout_titleWidget_Back->removeWidget(ui->widget_title);
 //    ui->widget_title->setParent(NULL);
 //    ui->widget_title->setWindowFlags(Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint|Qt::Tool|Qt::X11BypassWindowManagerHint);
@@ -487,7 +291,7 @@ void VideoPlayer::doShowFullScreen()
 
 }
 
-void VideoPlayer::doShowNormal()
+void DragAbleWidget::doShowNormal()
 {
     qDebug()<<__FUNCTION__;
 
@@ -516,7 +320,7 @@ void VideoPlayer::doShowNormal()
 }
 
 
-void VideoPlayer::showBorderRadius(bool isShow)
+void DragAbleWidget::showBorderRadius(bool isShow)
 {
     QString str;
 
@@ -591,7 +395,7 @@ void VideoPlayer::showBorderRadius(bool isShow)
 
 }
 
-void VideoPlayer::doChangeFullScreen()
+void DragAbleWidget::doChangeFullScreen()
 {
     if (this->isFullScreen())
     {
@@ -604,3 +408,43 @@ void VideoPlayer::doChangeFullScreen()
 //        mAction_FullScreen->setText(tr("quit fullscreen"));
     }
 }
+
+
+void DragAbleWidget::on_btnMenu_Close_clicked()
+{
+    qDebug()<<__FUNCTION__;
+
+    close();
+
+//    QTimer::singleShot(500,this,[&]()
+//    {
+//        QPoint pt(0, 0);
+//        QMouseEvent evt(QEvent::Leave, pt, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+//        qApp->sendEvent(ui->btnMenu_Close, &evt);
+//    });
+
+}
+
+void DragAbleWidget::on_btnMenu_Max_clicked()
+{
+    doChangeFullScreen();
+}
+
+void DragAbleWidget::on_btnMenu_Min_clicked()
+{
+    if (this->isFullScreen())
+    {
+//        mAnimation->stop();
+//        mTimer_CheckTitle->stop();
+        ui->widget_title->move(ui->widget_title->x(), 0 - ui->widget_title->height());
+        ui->widget_title->hide();
+    }
+    this->showMinimized();
+
+    QTimer::singleShot(500,this,[&]()
+    {
+        QPoint pt(0, 0);
+        QMouseEvent evt(QEvent::Leave, pt, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+        qApp->sendEvent(ui->btnMenu_Min, &evt);
+    });
+}

+ 67 - 0
module/DragAbleWidget/DragAbleWidget.h

@@ -0,0 +1,67 @@
+/**
+ * 叶海辉
+ * QQ群121376426
+ * http://blog.yundiantech.com/
+ */
+
+#ifndef DRAGABLEWIDGET_H
+#define DRAGABLEWIDGET_H
+
+#include <QWidget>
+
+namespace Ui {
+class DragAbleWidget;
+}
+
+//鼠标实现改变窗口大小
+#define PADDING 6
+enum Direction { UP=0, DOWN, LEFT, RIGHT, LEFTTOP, LEFTBOTTOM, RIGHTBOTTOM, RIGHTTOP, NONE };
+
+
+class DragAbleWidget : public QWidget
+{
+    Q_OBJECT
+
+public:
+    explicit DragAbleWidget(QWidget *parent = 0);
+    ~DragAbleWidget();
+
+    QWidget *getContainWidget();
+
+    void setTitle(QString str);
+
+private:
+    Ui::DragAbleWidget *ui;
+
+    ///以下是改变窗体大小相关
+    ////////
+protected:
+//    bool eventFilter(QObject *obj, QEvent *event);
+    void mouseReleaseEvent(QMouseEvent *event);
+    void mouseMoveEvent(QMouseEvent *event);
+    void mousePressEvent(QMouseEvent *event);
+
+private:
+    bool isMax; //是否最大化
+    QRect mLocation;
+
+    bool isLeftPressDown;  // 判断左键是否按下
+    QPoint dragPosition;   // 窗口移动拖动时需要记住的点
+    int dir;        // 窗口大小改变时,记录改变方向
+
+    void checkCursorDirect(const QPoint &cursorGlobalPoint);
+
+    void doShowFullScreen();
+    void doShowNormal();
+
+    void showBorderRadius(bool isShow);
+    void doChangeFullScreen();
+
+private slots:
+    void on_btnMenu_Close_clicked();
+    void on_btnMenu_Max_clicked();
+    void on_btnMenu_Min_clicked();
+
+};
+
+#endif // DRAGABLEWIDGET_H

+ 10 - 0
module/DragAbleWidget/DragAbleWidget.pri

@@ -0,0 +1,10 @@
+SOURCES +=  \
+    $$PWD/DragAbleWidget.cpp
+
+HEADERS  += \
+    $$PWD/DragAbleWidget.h
+
+FORMS    += \
+    $$PWD/DragAbleWidget.ui
+
+INCLUDEPATH += $$PWD

+ 409 - 0
module/DragAbleWidget/DragAbleWidget.ui

@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DragAbleWidget</class>
+ <widget class="QWidget" name="DragAbleWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>718</width>
+    <height>449</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="leftMargin">
+    <number>0</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>0</number>
+   </property>
+   <property name="bottomMargin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QWidget" name="widget_frame" native="true">
+     <property name="styleSheet">
+      <string notr="true">QWidget#widget_frame
+{
+	border:3px solid  rgb(46, 165, 255);
+	background-color: rgba(255, 255, 255, 0);
+	border-radius:5px;
+}
+
+QWidget#widget_back
+{
+border-radius:3px;
+}
+
+QWidget#widget_title
+{
+	border-top-right-radius:5px;
+	border-top-left-radius:5px;
+}
+
+QWidget#widget_container
+{
+	border-bottom-right-radius:5px;
+	border-bottom-left-radius:5px;
+}
+
+QStackedWidget
+{
+	border-bottom-right-radius:5px;
+	border-bottom-left-radius:5px;
+}
+
+QWidget#page_courseList
+{
+	border-bottom-right-radius:5px;
+	border-bottom-left-radius:5px;
+}
+
+	</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_6">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <property name="leftMargin">
+       <number>0</number>
+      </property>
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="rightMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QWidget" name="widget_back" native="true">
+        <property name="styleSheet">
+         <string notr="true"/>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_8">
+         <property name="spacing">
+          <number>0</number>
+         </property>
+         <property name="leftMargin">
+          <number>0</number>
+         </property>
+         <property name="topMargin">
+          <number>0</number>
+         </property>
+         <property name="rightMargin">
+          <number>0</number>
+         </property>
+         <property name="bottomMargin">
+          <number>0</number>
+         </property>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_titleWidget_Back">
+           <property name="spacing">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <item>
+            <widget class="QWidget" name="widget_title" native="true">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="minimumSize">
+              <size>
+               <width>0</width>
+               <height>32</height>
+              </size>
+             </property>
+             <property name="maximumSize">
+              <size>
+               <width>16777215</width>
+               <height>32</height>
+              </size>
+             </property>
+             <property name="styleSheet">
+              <string notr="true">
+QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
+	border-radius:0px;
+	color: #F0F0F0;
+	background-color:rgba(0,0,0,0);
+	border-style:none;
+}
+
+QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
+	background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #636363);
+}
+
+QPushButton#btnMenu_Close:hover{
+	background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
+}
+
+QWidget#widget_title{
+        background-color:rgb(0, 153, 255); 
+}
+
+QLabel#lab_Ico,QLabel#lab_Title{
+	border-radius:0px;
+	color: #F0F0F0;
+	background-color:rgba(0,0,0,0);
+	border-style:none;
+}
+</string>
+             </property>
+             <layout class="QHBoxLayout" name="horizontalLayout_40">
+              <property name="spacing">
+               <number>0</number>
+              </property>
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <layout class="QHBoxLayout" name="horizontalLayout_19">
+                <property name="spacing">
+                 <number>0</number>
+                </property>
+                <property name="leftMargin">
+                 <number>12</number>
+                </property>
+                <property name="topMargin">
+                 <number>0</number>
+                </property>
+                <property name="rightMargin">
+                 <number>0</number>
+                </property>
+                <item>
+                 <widget class="QLabel" name="label_titleName">
+                  <property name="styleSheet">
+                   <string notr="true">color: rgb(255, 255, 255);
+font-size:16px;
+font-weight:bold;
+font-family:&quot;微软雅黑&quot;;</string>
+                  </property>
+                  <property name="text">
+                   <string>视频播放器</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <spacer name="horizontalSpacer_26">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>40</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+                <item>
+                 <widget class="QWidget" name="widget_titleBtn" native="true">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="maximumSize">
+                   <size>
+                    <width>16777215</width>
+                    <height>46</height>
+                   </size>
+                  </property>
+                  <layout class="QHBoxLayout" name="horizontalLayout_5">
+                   <property name="spacing">
+                    <number>2</number>
+                   </property>
+                   <property name="leftMargin">
+                    <number>0</number>
+                   </property>
+                   <property name="topMargin">
+                    <number>0</number>
+                   </property>
+                   <property name="rightMargin">
+                    <number>0</number>
+                   </property>
+                   <property name="bottomMargin">
+                    <number>0</number>
+                   </property>
+                   <item>
+                    <widget class="QPushButton" name="btnMenu_Min">
+                     <property name="sizePolicy">
+                      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+                       <horstretch>0</horstretch>
+                       <verstretch>0</verstretch>
+                      </sizepolicy>
+                     </property>
+                     <property name="maximumSize">
+                      <size>
+                       <width>16777215</width>
+                       <height>60</height>
+                      </size>
+                     </property>
+                     <property name="cursor">
+                      <cursorShape>ArrowCursor</cursorShape>
+                     </property>
+                     <property name="focusPolicy">
+                      <enum>Qt::NoFocus</enum>
+                     </property>
+                     <property name="layoutDirection">
+                      <enum>Qt::LeftToRight</enum>
+                     </property>
+                     <property name="styleSheet">
+                      <string notr="true"/>
+                     </property>
+                     <property name="text">
+                      <string/>
+                     </property>
+                     <property name="icon">
+                      <iconset resource="../resources/resources.qrc">
+                       <normaloff>:/image/showminisizebtn.png</normaloff>:/image/showminisizebtn.png</iconset>
+                     </property>
+                     <property name="iconSize">
+                      <size>
+                       <width>22</width>
+                       <height>22</height>
+                      </size>
+                     </property>
+                     <property name="flat">
+                      <bool>true</bool>
+                     </property>
+                    </widget>
+                   </item>
+                   <item>
+                    <widget class="QPushButton" name="btnMenu_Max">
+                     <property name="sizePolicy">
+                      <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+                       <horstretch>0</horstretch>
+                       <verstretch>0</verstretch>
+                      </sizepolicy>
+                     </property>
+                     <property name="maximumSize">
+                      <size>
+                       <width>16777215</width>
+                       <height>60</height>
+                      </size>
+                     </property>
+                     <property name="cursor">
+                      <cursorShape>ArrowCursor</cursorShape>
+                     </property>
+                     <property name="focusPolicy">
+                      <enum>Qt::NoFocus</enum>
+                     </property>
+                     <property name="layoutDirection">
+                      <enum>Qt::LeftToRight</enum>
+                     </property>
+                     <property name="styleSheet">
+                      <string notr="true"/>
+                     </property>
+                     <property name="text">
+                      <string/>
+                     </property>
+                     <property name="icon">
+                      <iconset resource="../resources/resources.qrc">
+                       <normaloff>:/image/showmaxsizebtn.png</normaloff>:/image/showmaxsizebtn.png</iconset>
+                     </property>
+                     <property name="iconSize">
+                      <size>
+                       <width>22</width>
+                       <height>22</height>
+                      </size>
+                     </property>
+                     <property name="flat">
+                      <bool>true</bool>
+                     </property>
+                    </widget>
+                   </item>
+                  </layout>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QPushButton" name="btnMenu_Close">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                   </sizepolicy>
+                  </property>
+                  <property name="cursor">
+                   <cursorShape>PointingHandCursor</cursorShape>
+                  </property>
+                  <property name="styleSheet">
+                   <string notr="true"/>
+                  </property>
+                  <property name="text">
+                   <string/>
+                  </property>
+                  <property name="icon">
+                   <iconset resource="../resources/resources.qrc">
+                    <normaloff>:/image/close_normal.png</normaloff>:/image/close_normal.png</iconset>
+                  </property>
+                  <property name="iconSize">
+                   <size>
+                    <width>28</width>
+                    <height>28</height>
+                   </size>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QWidget" name="widget_container" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QWidget#widget_container
+{
+	background-color: rgb(22, 22, 22);
+}
+</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../resources/resources.qrc"/>
+ </resources>
+ <connections/>
+</ui>

+ 33 - 0
module/VideoPlayer/VideoPlayer.pri

@@ -0,0 +1,33 @@
+QMAKE_CXXFLAGS += -std=c++11
+
+SOURCES +=  \
+    $$PWD/src/AppConfig.cpp \
+    $$PWD/src/Mutex/Cond.cpp \
+    $$PWD/src/Mutex/Mutex.cpp \
+    $$PWD/src/LogWriter/LogWriter.cpp \
+    $$PWD/src/VideoPlayer/VideoPlayer.cpp \
+    $$PWD/src/VideoPlayer/Video/VideoPlayer_VideoThread.cpp \
+    $$PWD/src/VideoPlayer/Audio/VideoPlayer_AudioThread.cpp \
+    $$PWD/src/VideoPlayer/Audio/PcmVolumeControl.cpp \
+
+HEADERS  += \
+    $$PWD/src/AppConfig.h \
+    $$PWD/src/Mutex/Cond.h \
+    $$PWD/src/Mutex/Mutex.h \
+    $$PWD/src/LogWriter/LogWriter.h \
+    $$PWD/src/VideoPlayer/VideoPlayer.h \
+    $$PWD/src/VideoPlayer/Audio/PcmVolumeControl.h \
+
+
+win32{
+
+    INCLUDEPATH += $$PWD/lib/win32/ffmpeg/include \
+                   $$PWD/lib/win32/SDL2/include \
+                   $$PWD/src
+
+    LIBS += -L$$PWD/lib/win32/ffmpeg/lib -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lswresample -lswscale
+    LIBS += -L$$PWD/lib/win32/SDL2/lib -lSDL2
+
+}
+
+

+ 0 - 0
SDL2/include/SDL.h → module/VideoPlayer/lib/win32/SDL2/include/SDL.h


+ 0 - 0
SDL2/include/SDL_assert.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_assert.h


+ 0 - 0
SDL2/include/SDL_atomic.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_atomic.h


+ 0 - 0
SDL2/include/SDL_audio.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_audio.h


+ 0 - 0
SDL2/include/SDL_bits.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_bits.h


+ 0 - 0
SDL2/include/SDL_blendmode.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_blendmode.h


+ 0 - 0
SDL2/include/SDL_clipboard.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_clipboard.h


+ 0 - 0
SDL2/include/SDL_config.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_config.h


+ 0 - 0
SDL2/include/SDL_cpuinfo.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_cpuinfo.h


+ 0 - 0
SDL2/include/SDL_endian.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_endian.h


+ 0 - 0
SDL2/include/SDL_error.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_error.h


+ 0 - 0
SDL2/include/SDL_events.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_events.h


+ 0 - 0
SDL2/include/SDL_filesystem.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_filesystem.h


+ 0 - 0
SDL2/include/SDL_gamecontroller.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_gamecontroller.h


+ 0 - 0
SDL2/include/SDL_gesture.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_gesture.h


+ 0 - 0
SDL2/include/SDL_haptic.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_haptic.h


+ 0 - 0
SDL2/include/SDL_hints.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_hints.h


+ 0 - 0
SDL2/include/SDL_joystick.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_joystick.h


+ 0 - 0
SDL2/include/SDL_keyboard.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_keyboard.h


+ 0 - 0
SDL2/include/SDL_keycode.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_keycode.h


+ 0 - 0
SDL2/include/SDL_loadso.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_loadso.h


+ 0 - 0
SDL2/include/SDL_log.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_log.h


+ 0 - 0
SDL2/include/SDL_main.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_main.h


+ 0 - 0
SDL2/include/SDL_messagebox.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_messagebox.h


+ 0 - 0
SDL2/include/SDL_mouse.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_mouse.h


+ 0 - 0
SDL2/include/SDL_mutex.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_mutex.h


+ 0 - 0
SDL2/include/SDL_name.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_name.h


+ 0 - 0
SDL2/include/SDL_opengl.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_opengl.h


+ 0 - 0
SDL2/include/SDL_opengles.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_opengles.h


+ 0 - 0
SDL2/include/SDL_opengles2.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_opengles2.h


+ 0 - 0
SDL2/include/SDL_pixels.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_pixels.h


+ 0 - 0
SDL2/include/SDL_platform.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_platform.h


+ 0 - 0
SDL2/include/SDL_power.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_power.h


+ 0 - 0
SDL2/include/SDL_quit.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_quit.h


+ 0 - 0
SDL2/include/SDL_rect.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_rect.h


+ 0 - 0
SDL2/include/SDL_render.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_render.h


+ 0 - 0
SDL2/include/SDL_revision.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_revision.h


+ 0 - 0
SDL2/include/SDL_rwops.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_rwops.h


+ 0 - 0
SDL2/include/SDL_scancode.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_scancode.h


+ 0 - 0
SDL2/include/SDL_shape.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_shape.h


+ 0 - 0
SDL2/include/SDL_stdinc.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_stdinc.h


+ 0 - 0
SDL2/include/SDL_surface.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_surface.h


+ 0 - 0
SDL2/include/SDL_system.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_system.h


+ 0 - 0
SDL2/include/SDL_syswm.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_syswm.h


+ 0 - 0
SDL2/include/SDL_test.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test.h


+ 0 - 0
SDL2/include/SDL_test_assert.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_assert.h


+ 0 - 0
SDL2/include/SDL_test_common.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_common.h


+ 0 - 0
SDL2/include/SDL_test_compare.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_compare.h


+ 0 - 0
SDL2/include/SDL_test_crc32.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_crc32.h


+ 0 - 0
SDL2/include/SDL_test_font.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_font.h


+ 0 - 0
SDL2/include/SDL_test_fuzzer.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_fuzzer.h


+ 0 - 0
SDL2/include/SDL_test_harness.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_harness.h


+ 0 - 0
SDL2/include/SDL_test_images.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_images.h


+ 0 - 0
SDL2/include/SDL_test_log.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_log.h


+ 0 - 0
SDL2/include/SDL_test_md5.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_md5.h


+ 0 - 0
SDL2/include/SDL_test_random.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_test_random.h


+ 0 - 0
SDL2/include/SDL_thread.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_thread.h


+ 0 - 0
SDL2/include/SDL_timer.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_timer.h


+ 0 - 0
SDL2/include/SDL_touch.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_touch.h


+ 0 - 0
SDL2/include/SDL_types.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_types.h


+ 0 - 0
SDL2/include/SDL_version.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_version.h


+ 0 - 0
SDL2/include/SDL_video.h → module/VideoPlayer/lib/win32/SDL2/include/SDL_video.h


+ 0 - 0
SDL2/include/begin_code.h → module/VideoPlayer/lib/win32/SDL2/include/begin_code.h


+ 0 - 0
SDL2/include/close_code.h → module/VideoPlayer/lib/win32/SDL2/include/close_code.h


+ 0 - 0
SDL2/lib/x86/SDL2.lib → module/VideoPlayer/lib/win32/SDL2/lib/SDL2.lib


+ 0 - 0
SDL2/lib/x86/SDL2main.lib → module/VideoPlayer/lib/win32/SDL2/lib/SDL2main.lib


+ 0 - 0
SDL2/lib/x86/SDL2test.lib → module/VideoPlayer/lib/win32/SDL2/lib/SDL2test.lib


+ 0 - 0
ffmpeg/include/libavcodec/avcodec.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/avcodec.h


+ 0 - 0
ffmpeg/include/libavcodec/avfft.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/avfft.h


+ 0 - 0
ffmpeg/include/libavcodec/dv_profile.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/dv_profile.h


+ 0 - 0
ffmpeg/include/libavcodec/dxva2.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/dxva2.h


+ 0 - 0
ffmpeg/include/libavcodec/old_codec_ids.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/old_codec_ids.h


+ 0 - 0
ffmpeg/include/libavcodec/vaapi.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/vaapi.h


+ 0 - 0
ffmpeg/include/libavcodec/vda.h → module/VideoPlayer/lib/win32/ffmpeg/include/libavcodec/vda.h


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio