Commit c3c4c72d by xiongziliang

去除mp4v2依赖

parent 523a8d05
...@@ -37,7 +37,6 @@ endif () ...@@ -37,7 +37,6 @@ endif ()
set(ENABLE_HLS true) set(ENABLE_HLS true)
set(ENABLE_OPENSSL true) set(ENABLE_OPENSSL true)
set(ENABLE_MYSQL false) set(ENABLE_MYSQL false)
set(ENABLE_MP4V2 true)
set(ENABLE_FAAC false) set(ENABLE_FAAC false)
set(ENABLE_X264 false) set(ENABLE_X264 false)
set(ENABLE_MP4 true) set(ENABLE_MP4 true)
...@@ -66,16 +65,6 @@ if (ENABLE_OPENSSL) ...@@ -66,16 +65,6 @@ if (ENABLE_OPENSSL)
list(APPEND LINK_LIB_LIST ssl crypto) list(APPEND LINK_LIB_LIST ssl crypto)
endif () endif ()
#查找MP4V2是否安装
find_package(MP4V2 QUIET)
if (MP4V2_FOUND AND ENABLE_MP4V2)
include_directories(${MP4V2_INCLUDE_DIR})
list(APPEND LINK_LIB_LIST ${MP4V2_LIBRARY})
add_definitions(-DENABLE_MP4V2)
message(STATUS "found library:${MP4V2_LIBRARY},ENABLE_MP4V2 defined")
endif ()
#libmpeg #libmpeg
if(ENABLE_HLS) if(ENABLE_HLS)
aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg) aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg)
......
#!/bin/bash
cd ..
git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git
cd ZLMediaKit
git submodule init
git submodule update
mkdir -p android_build
rm -rf ./build
ln -s ./android_build build
cd android_build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_NDK=$ANDROID_NDK_ROOT -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi" -DANDROID_NATIVE_API_LEVEL=android-9
make -j4
...@@ -10,7 +10,6 @@ sudo apt-get install libmysqlclient-dev ...@@ -10,7 +10,6 @@ sudo apt-get install libmysqlclient-dev
sudo apt-get install libssl-dev sudo apt-get install libssl-dev
sudo apt-get install libx264-dev sudo apt-get install libx264-dev
sudo apt-get install libfaac-dev sudo apt-get install libfaac-dev
sudo apt-get install libmp4v2-dev
#sudo apt-get install libsdl-dev #sudo apt-get install libsdl-dev
#sudo apt-get install libavcodec-dev #sudo apt-get install libavcodec-dev
#sudo apt-get install libavutil-dev #sudo apt-get install libavutil-dev
......
...@@ -10,7 +10,6 @@ brew install mysql ...@@ -10,7 +10,6 @@ brew install mysql
brew install openssl brew install openssl
brew install x264 brew install x264
brew install faac brew install faac
brew install mp4v2
brew install sdl brew install sdl
brew install ffmpeg brew install ffmpeg
......
...@@ -151,7 +151,6 @@ bool MP4Reader::seekTo(uint32_t ui32Stamp){ ...@@ -151,7 +151,6 @@ bool MP4Reader::seekTo(uint32_t ui32Stamp){
return true; return true;
} }
} }
return false;
} }
bool MP4Reader::close(MediaSource &sender,bool force){ bool MP4Reader::close(MediaSource &sender,bool force){
......
...@@ -63,7 +63,7 @@ void createPusher(const EventPoller::Ptr &poller, ...@@ -63,7 +63,7 @@ void createPusher(const EventPoller::Ptr &poller,
const string &filePath, const string &filePath,
const string &url) { const string &url) {
//不限制APP名,并且指定文件绝对路径 //不限制APP名,并且指定文件绝对路径
auto src = MP4Reader::onMakeMediaSource(schema,vhost,app,stream,filePath, false); auto src = onMakeMediaSource(schema,vhost,app,stream,filePath, false);
if(!src){ if(!src){
//文件不存在 //文件不存在
WarnL << "MP4文件不存在:" << filePath; WarnL << "MP4文件不存在:" << filePath;
...@@ -134,7 +134,7 @@ int domain(const string & filePath,const string & pushUrl){ ...@@ -134,7 +134,7 @@ int domain(const string & filePath,const string & pushUrl){
int main(int argc,char *argv[]){ int main(int argc,char *argv[]){
//可以使用test_server生成的mp4文件 //可以使用test_server生成的mp4文件
//文件使用绝对路径,推流url支持rtsp和rtmp //文件使用绝对路径,推流url支持rtsp和rtmp
return domain("/Users/xzl/Desktop/bear-1280x720-long.mp4","rtsp://127.0.0.1/live/rtsp_push"); return domain("/Users/xzl/git/ZLMediaKit/release/mac/Debug/www/record/live/rtsp_test1/2020-04-03/15-32-24.mp4","rtsp://127.0.0.1/live/rtsp_push");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论