Explorar o código

V0.10.1
1、完成了使用ffmpeg解码,使用OpenGL绘制图片的视频播放器

apple hai 6 días
pai
achega
09efc215b4

+ 4 - 4
Libraries/CURL/FindCURL.cmake

@@ -18,15 +18,15 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
         if(CMAKE_SIZEOF_VOID_P EQUAL 8)
             if(CMAKE_BUILD_TYPE MATCHES "Debug")
-                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gccc7.3/libcurl.dll)
+                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gcc7.3/libcurl.dll)
             else()
-                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gccc7.3/libcurl.dll)
+                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gcc7.3/libcurl.dll)
             endif()
         elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
             if(CMAKE_BUILD_TYPE MATCHES "Debug")
-                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gccc7.3_32/libcurl.dll)
+                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gcc7.3_32/libcurl.dll)
             else()
-                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gccc7.3_32/libcurl.dll)
+                list(APPEND CURL_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/windows/gcc7.3_32/libcurl.dll)
             endif()
         endif()
     elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

+ 11 - 6
module/VideoPlayer/DecodeVedio.cpp

@@ -281,6 +281,9 @@ void DecodeVedio::findHWDecoder()
     }else {
         m_supportHWDecoder = true;
     }
+
+    /* 暂时不支持硬件解码 */
+    m_supportHWDecoder = false;
 }
 
 
@@ -555,9 +558,9 @@ void DecodeVedio::threadDecodeUsingCPU()
 {
     /******** 初始化局部变量 ********/
     bool isEnd = false;
-    int ret = 0;
-    int retFrame = 0;
-    int retPacket = 0;
+    // int ret = 0;
+    // int retFrame = 0;
+    // int retPacket = 0;
     m_pauseDecode = false;
     m_decodeStatus = true;
     m_decodeState.store(DecodeState::DecodeRun);
@@ -761,9 +764,9 @@ void DecodeVedio::threadDecodeUsingGPU()
 {
     /******** 初始化局部变量 ********/
     bool isEnd = false;
-    int ret = 0;
-    int retFrame = 0;
-    int retPacket = 0;
+    // int ret = 0;
+    // int retFrame = 0;
+    // int retPacket = 0;
     m_pauseDecode = false;
     m_decodeStatus = true;
     m_decodeState.store(DecodeState::DecodeRun);
@@ -953,6 +956,8 @@ label_ThreadDecodeExit:
     m_threadRuning = false;
 }
 
+
+
 /* 暂停解码,会阻塞到线程暂停为止 */
 void DecodeVedio::pauseDecode()
 {

+ 2 - 2
module/VideoPlayer/DecodeVedio.h

@@ -10,11 +10,10 @@
 
 #include "RingQueue/RingQueue.hpp"
 
-// #include "threadcontroller.h"
 
 extern "C"
 {
-// #include <libavcodec/avcodec.h>
+#include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 // #include <libswscale/swscale.h>
 // #include <libavutil/imgutils.h>
@@ -102,6 +101,7 @@ private:
     void threadDecodeUsingCPU();     
     /* 硬件解码线程 */
     void threadDecodeUsingGPU();
+
     /* 退出线程 */      
     void exitThread();
     /* 暂停解码 */