diff --git a/mediaPlayer/CMakeLists.txt b/mediaPlayer/CMakeLists.txt index 1306d3ad6..ab48a8bb7 100644 --- a/mediaPlayer/CMakeLists.txt +++ b/mediaPlayer/CMakeLists.txt @@ -109,6 +109,18 @@ set(SOURCE_FILES playerOptions.h SMP_DCAManager.cpp CicadaPlayerPrototype.cpp) + +if(APPLE) + set(SOURCE_FILES ${SOURCE_FILES} + externalPlayer/AppleAVPlayer.cpp + externalPlayer/AppleAVPlayer.h + ) +elseif(ANDROID) + set(SOURCE_FILES ${SOURCE_FILES} + externalPlayer/JNIPlayer.cpp + externalPlayer/JNIPlayer.h + ) +endif() if (TARGET_PLATFORM STREQUAL "Android") set(SOURCE_FILES ${SOURCE_FILES} TrafficStats.c diff --git a/mediaPlayer/externalPlayer/AppleAVPlayer.cpp b/mediaPlayer/externalPlayer/AppleAVPlayer.cpp new file mode 100644 index 000000000..0f80348f5 --- /dev/null +++ b/mediaPlayer/externalPlayer/AppleAVPlayer.cpp @@ -0,0 +1,6 @@ +// +// Created by moqi on 2020/7/20. +// + +#include "AppleAVPlayer.h" +using namespace Cicada; diff --git a/mediaPlayer/externalPlayer/AppleAVPlayer.h b/mediaPlayer/externalPlayer/AppleAVPlayer.h new file mode 100644 index 000000000..c8f255814 --- /dev/null +++ b/mediaPlayer/externalPlayer/AppleAVPlayer.h @@ -0,0 +1,15 @@ +// +// Created by moqi on 2020/7/20. +// + +#ifndef CICADAMEDIA_APPLE_AVPLAYER_H +#define CICADAMEDIA_APPLE_AVPLAYER_H + +#include "../CicadaPlayerPrototype.h" +namespace Cicada { + class AppleAVPlayer : public ICicadaPlayer, private CicadaPlayerPrototype { + }; +}// namespace Cicada + + +#endif//CICADAMEDIA_APPLE_AVPLAYER_H diff --git a/mediaPlayer/externalPlayer/JNIPlayer.cpp b/mediaPlayer/externalPlayer/JNIPlayer.cpp new file mode 100644 index 000000000..c29bcb2d2 --- /dev/null +++ b/mediaPlayer/externalPlayer/JNIPlayer.cpp @@ -0,0 +1,5 @@ +// +// Created by moqi on 2020/7/20. +// + +#include "JNIPlayer.h" diff --git a/mediaPlayer/externalPlayer/JNIPlayer.h b/mediaPlayer/externalPlayer/JNIPlayer.h new file mode 100644 index 000000000..cb586a481 --- /dev/null +++ b/mediaPlayer/externalPlayer/JNIPlayer.h @@ -0,0 +1,13 @@ +// +// Created by moqi on 2020/7/20. +// + +#ifndef CICADAMEDIA_JNIPLAYER_H +#define CICADAMEDIA_JNIPLAYER_H + +#include "../CicadaPlayerPrototype.h" +class JNIPlayer : public ICicadaPlayer, private CicadaPlayerPrototype { +}; + + +#endif//CICADAMEDIA_JNIPLAYER_H