mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-30 16:27:36 +08:00
去除mp4v2依赖
This commit is contained in:
parent
523a8d0527
commit
c3c4c72d1d
@ -37,7 +37,6 @@ endif ()
|
||||
set(ENABLE_HLS true)
|
||||
set(ENABLE_OPENSSL true)
|
||||
set(ENABLE_MYSQL false)
|
||||
set(ENABLE_MP4V2 true)
|
||||
set(ENABLE_FAAC false)
|
||||
set(ENABLE_X264 false)
|
||||
set(ENABLE_MP4 true)
|
||||
@ -66,16 +65,6 @@ if (ENABLE_OPENSSL)
|
||||
list(APPEND LINK_LIB_LIST ssl crypto)
|
||||
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
|
||||
if(ENABLE_HLS)
|
||||
aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg)
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/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
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install libx264-dev
|
||||
sudo apt-get install libfaac-dev
|
||||
sudo apt-get install libmp4v2-dev
|
||||
#sudo apt-get install libsdl-dev
|
||||
#sudo apt-get install libavcodec-dev
|
||||
#sudo apt-get install libavutil-dev
|
||||
|
@ -10,7 +10,6 @@ brew install mysql
|
||||
brew install openssl
|
||||
brew install x264
|
||||
brew install faac
|
||||
brew install mp4v2
|
||||
brew install sdl
|
||||
brew install ffmpeg
|
||||
|
||||
|
@ -151,7 +151,6 @@ bool MP4Reader::seekTo(uint32_t ui32Stamp){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MP4Reader::close(MediaSource &sender,bool force){
|
||||
|
@ -63,7 +63,7 @@ void createPusher(const EventPoller::Ptr &poller,
|
||||
const string &filePath,
|
||||
const string &url) {
|
||||
//不限制APP名,并且指定文件绝对路径
|
||||
auto src = MP4Reader::onMakeMediaSource(schema,vhost,app,stream,filePath, false);
|
||||
auto src = onMakeMediaSource(schema,vhost,app,stream,filePath, false);
|
||||
if(!src){
|
||||
//文件不存在
|
||||
WarnL << "MP4文件不存在:" << filePath;
|
||||
@ -134,7 +134,7 @@ int domain(const string & filePath,const string & pushUrl){
|
||||
int main(int argc,char *argv[]){
|
||||
//可以使用test_server生成的mp4文件
|
||||
//文件使用绝对路径,推流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");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user