Apple 1 lună în urmă
părinte
comite
c11915bcc2
5 a modificat fișierele cu 25 adăugiri și 21 ștergeri
  1. 4 3
      CMakeLists.txt
  2. 1 1
      External
  3. 15 12
      demo/VideoPlayerGL/CMakeLists.txt
  4. 4 4
      demo/VideoPlayerGL/main.cpp
  5. 1 1
      demo/VideoPlayerGL/widget.h

+ 4 - 3
CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.22)
+cmake_minimum_required(VERSION 3.10)
 
 project(Library_Project VERSION 1.1 LANGUAGES CXX)
 
@@ -114,6 +114,7 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS
     Network
     # Multimedia
     Sql
+    OpenGLWidgets
     REQUIRED
 )
 
@@ -151,8 +152,8 @@ file(GLOB GLOBAL_SRC
 # add_subdirectory(${CMAKE_SOURCE_DIR}/demo/time)
 # add_subdirectory(${CMAKE_SOURCE_DIR}/demo/VideoPlayer)
 # add_subdirectory(${CMAKE_SOURCE_DIR}/demo/xlsx)
-add_subdirectory(${CMAKE_SOURCE_DIR}/demo/DesignerPattern)
+# add_subdirectory(${CMAKE_SOURCE_DIR}/demo/DesignerPattern)
 # add_subdirectory(${CMAKE_SOURCE_DIR}/demo/ViewModel)
-# add_subdirectory(${CMAKE_SOURCE_DIR}/demo/VideoPlayerGL)
+add_subdirectory(${CMAKE_SOURCE_DIR}/demo/VideoPlayerGL)
 
 

+ 1 - 1
External

@@ -1 +1 @@
-Subproject commit bedfa527c59b4af203efa45077833d1c9e3e5cd2
+Subproject commit 98bb10ddaba604074a127195e8fe77303f8636ad

+ 15 - 12
demo/VideoPlayerGL/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.10)
 
 set(this_exe PlayerGL)
 
@@ -15,7 +15,7 @@ file(GLOB LOCAL_SRC
 
     ${CMAKE_SOURCE_DIR}/External/module/Logs/*.cpp
     ${CMAKE_SOURCE_DIR}/External/module/ThreadPool/*.cpp
-    ${CMAKE_SOURCE_DIR}/External/module/VideoPlayer/*.cpp
+    # ${CMAKE_SOURCE_DIR}/External/module/VideoPlayer/*.cpp
 
     
     
@@ -46,18 +46,19 @@ target_include_directories(${this_exe} PRIVATE
     ${CMAKE_SOURCE_DIR}/External/module
     ${CMAKE_SOURCE_DIR}/External/module/ThreadPool
     ${CMAKE_SOURCE_DIR}/External/module/RingQueue
-    ${CMAKE_SOURCE_DIR}/External/module/VideoPlayer
+    # ${CMAKE_SOURCE_DIR}/External/module/VideoPlayer
     
     
-    ${CURL_INCLUDE_DIR}
-    ${FFMPEG_INCLUDE_DIR}
+    # ${CURL_INCLUDE_DIR}
+    # ${FFMPEG_INCLUDE_DIR}
     ${spdlog_INCLUDE_DIR}
 )
 
 target_link_libraries(${this_exe} PRIVATE
-    Qt5::Widgets
-    Qt5::Core
-    Qt5::Network
+    Qt6::Widgets
+    Qt6::Core
+    Qt6::Network
+    Qt6::OpenGLWidgets
     # Qt5::Multimedia
     # Qt5::Xml
     # Qt5::Sql
@@ -66,13 +67,15 @@ target_link_libraries(${this_exe} PRIVATE
 target_link_libraries(${this_exe} PRIVATE 
     # fmt::fmt
     # spdlog::spdlog
-    ${CURL_LIBRARY}
-    ${FFMPEG_LIBRARY}
+    # ${CURL_LIBRARY}
+    # ${FFMPEG_LIBRARY}
     ${spdlog_LIBRARY}
+    # opengl32
+    # glu32
 )
 
-find_package(OpenGL REQUIRED)
-target_link_libraries(${this_exe} PRIVATE ${OPENGL_LIBRARIES})
+# find_package(OpenGL REQUIRED)
+# target_link_libraries(${this_exe} PRIVATE ${OPENGL_LIBRARIES})
 
 if(CMAKE_CXX_COMPILER_VERSION LESS 9.0)
     target_link_libraries(${this_exe} PRIVATE

+ 4 - 4
demo/VideoPlayerGL/main.cpp

@@ -5,10 +5,10 @@
 #include "spdlog/spdlog.h"
 #include "FmtLog/fmtlog.h"
 
-extern "C" {
-#include <libavcodec/avcodec.h>
-#include <libavutil/hwcontext.h>
-}
+// extern "C" {
+// #include <libavcodec/avcodec.h>
+// #include <libavutil/hwcontext.h>
+// }
 
 int main(int argc, char *argv[])
 {

+ 1 - 1
demo/VideoPlayerGL/widget.h

@@ -2,7 +2,7 @@
 #define WIDGET_H
 
 #include <QWidget>
-#include "VideoPlayer.h"
+// #include "VideoPlayer.h"
 // #include "VideoPlayer1.h"
 #include "Player/PlayerGLWidget.h"