--- /dev/null
+* @tizen-vault/espp-public
SET(PC_LDFLAGS "-lesplusplayer -lmixer")
SET(PC_CFLAGS "-I/usr/include/esplusplayer_capi -I/usr/include/mixer")
+IF(${TIZEN_PUBLIC} STREQUAL "ON")
+SET(PC_REQUIRED "capi-media-sound-manager")
+SET(PC_CFLAGS "${PC_CFLAGS} -DTIZEN_FEATURE_PUBLIC")
+ENDIF(${TIZEN_PUBLIC} STREQUAL "ON")
+
SET(INC_DIR ${PROJECT_SOURCE_DIR}/include/)
INCLUDE_DIRECTORIES(${INC_DIR})
SET(CMAKE_INSTALL_PREFIX /usr)
Name: @PC_NAME@
Description: @PACKAGE_DESCRYPTION@
Version: @VERSION@
+Requires: @PC_REQUIRED@
Libs: -L${libdir} @PC_LDFLAGS@
Cflags : @PC_CFLAGS@
#include <utility>
#include <vector>
+#ifdef TIZEN_FEATURE_PUBLIC
+#include <sound_manager.h>
+#endif
+
#ifdef USE_MIXER
#include "mixer/mixer.h"
#endif
return false;
}
+#ifdef TIZEN_FEATURE_PUBLIC
+ /**
+ * @brief Provided api for enabling video hole
+ * @return @c True on success, otherwise @c False
+ */
+ virtual bool EnableVideoHole(bool value) { return false; }
+
+ /**
+ * @brief Set sound stream information
+ * @param [in] stream_info : sound stream information
+ * @pre The player state must be set to #EsState::kIdle.
+ * @post None
+ * @return @c True on success, otherwise @c False
+ * @exception None
+ */
+ virtual bool SetSoundStreamInfo(const sound_stream_info_h stream_info) {
+ return false;
+ }
+#endif
// LCOV_EXCL_STOP
protected:
uint64_t duration = 0;
tbm_surface_h surface_data = nullptr; // tbm_surface
void* scaler_index = nullptr;
+#ifdef TIZEN_FEATURE_PUBLIC
+ void* buffer_addr = nullptr;
+#endif
};
-struct DecoderBufferTime{
+struct DecoderBufferTime {
uint64_t pts = 0;
uint64_t system_time = 0;
-} ;
+};
/**
* @brief Enumerations for the state of getting decoded packet
#ifndef __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_BUFFER_H__
#define __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_BUFFER_H__
-#include <cstdint>
-
#ifdef __cplusplus
+#include <cstdint>
extern "C" {
+#else
+#include <stdint.h>
#endif
/**
#ifndef __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_ESPACKET_H__
#define __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_ESPACKET_H__
-#include <cstdint>
-
#include "esplusplayer_capi/matroska_color.h"
#include "esplusplayer_capi/stream.h"
#ifdef __cplusplus
+#include <cstdint>
extern "C" {
+#else
+#include <stdint.h>
#endif
/**
#ifndef __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_ESPLUSPLAYER_CAPI_H__
#define __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_ESPLUSPLAYER_CAPI_H__
+#ifdef TIZEN_FEATURE_PUBLIC
+#include <media/sound_manager.h>
+#endif
+
#include "esplusplayer_capi/buffer.h"
#include "esplusplayer_capi/display.h"
#include "esplusplayer_capi/drm.h"
int esplusplayer_set_simple_mix_out_buffer_level(
esplusplayer_handle handle, esplusplayer_simple_mix_out_buffer_level level);
+#ifdef TIZEN_FEATURE_PUBLIC
+/**
+ * @brief Provided api for enabling video hole.
+ * @param [in] handle : esplusplayer handle.
+ * @param [in] value : the value of video hole.
+ * (@c true = video hole enabled, @c false = video hole disabled)
+ * @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success, otherwise @c one of
+ * esplusplayer_error_type values will be returned.
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_NONE Successful
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER Invalid parameter
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION Internal operation
+ * failed
+ * @code
+ * esplusplayer_open(esplayer);
+ * esplusplayer_enable_video_hole(esplayer, false);
+ * // ... your codes ...
+ * esplusplayer_close(esplayer);
+ * @endcode
+ * @pre The player state must not be #ESPLUSPLAYER_STATE_NONE.
+ * @remark To disable video hole,
+ * esplusplayer_decoded_video_frame_buffer_type() must not be set to
+ * #ESPLUSPLAYER_DECODED_VIDEO_FRAME_BUFFER_TYPE_NONE. To enable video hole,
+ * esplusplayer_set_display() must be set to #ESPLUSPLAYER_DISPLAY_TYPE_OVERLAY
+ * @post None
+ * @exception None
+ * @see esplusplayer_set_video_frame_buffer_type()
+ * esplusplayer_set_media_packet_video_decoded_cb()
+ */
+int esplusplayer_enable_video_hole(esplusplayer_handle handle,
+ const bool value);
+
+/**
+ * @brief Set sound stream information
+ * @param [in] handle : esplusplayer handle.
+ * @param [in] stream_info : sound stream information
+ * @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
+ * esplusplayer_error_type
+ * values will be returned.
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_NONE Successful
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER Invalid parameter
+ * @retval #ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION Internal operation
+ * failed
+ * @code
+ * esplusplayer_open(esplayer);
+ * esplusplayer_set_sound_stream_info(esplayer, stream_info);
+ * // ... your codes ...
+ * esplusplayer_close(esplayer);
+ * @endcode
+ * @pre The player state must be set to #ESPLUSPLAYER_STATE_IDLE
+ * @post None
+ * @exception None
+ * @see esplusplayer_open()
+ */
+int esplusplayer_set_sound_stream_info(esplusplayer_handle handle,
+ const sound_stream_info_h stream_info);
+#endif
#ifdef __cplusplus
}
#endif
#ifndef __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_EVENT_H__
#define __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_EVENT_H__
-#include <cstdint>
-
#ifdef __cplusplus
+#include <cstdint>
extern "C" {
+#else
+#include <stdint.h>
#endif
/**
#ifndef __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_MATROSKA_COLOR_H__
#define __ESPLUSPLAYER_ESPLUSPLAYER_CAPI_MATROSKA_COLOR_H__
-#include <cstdint>
-
#ifdef __cplusplus
+#include <cstdint>
extern "C" {
+#else
+#include <stdint.h>
#endif
/**
#%bcond_with : disable ESPLUSPLAYER_UT by default, %bcond_without : enable ESPLUSPLAYER_UT
+%bcond_without TIZEN_PUBLIC
%if ("%{_vd_cfg_product_type}" != "AUDIO")
%bcond_without ESPLUSPLAYER_UT
%else
Name: esplusplayer
Summary: new multimedia streaming player
Version: 1.3.7
-Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(ecore-wl2)
+%if %{with TIZEN_PUBLIC}
+BuildRequires: pkgconfig(libtrackrenderer)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+# for test
+BuildRequires: pkgconfig(capi-mediademuxer)
+BuildRequires: pkgconfig(appcore-efl)
+%else
BuildRequires: pkgconfig(tv-resource-manager)
+BuildRequires: pkgconfig(drmdecrypt)
+BuildRequires: pkgconfig(context-aware-api)
+%if ("%{_vd_cfg_product_type}" != "AUDIO")
+BuildRequires: pkgconfig(graphics-control)
+%endif
+BuildRequires: pkgconfig(capi-trackrenderer-tv)
+BuildRequires: pkgconfig(logger)
+%endif
+
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(icu-i18n)
-BuildRequires: pkgconfig(drmdecrypt)
-BuildRequires: pkgconfig(logger)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(libtbm)
-BuildRequires: pkgconfig(context-aware-api)
-BuildRequires: pkgconfig(capi-trackrenderer-tv)
+
BuildRequires: pkgconfig(libtbm)
BuildRequires: pkgconfig(capi-system-info)
-%if ("%{_vd_cfg_product_type}" != "AUDIO")
-BuildRequires: pkgconfig(graphics-control)
-%endif
%if ("%{sec_buildconf_product_lite_tizen}" == "n")
# for ut
%package ut-component-tomato
Summary: Test package with TOMATO
BuildRequires: gtest-devel
+%if %{without TIZEN_PUBLIC}
BuildRequires: pkgconfig(video-capture)
BuildRequires: pkgconfig(audio-control)
-BuildRequires: libjpeg-turbo-devel
BuildRequires: pkgconfig(video-sink)
+%endif
+BuildRequires: libjpeg-turbo-devel
+
#BuildRequires: pkgconfig(capi-system-info)
Requires: %{name} = %{version}-%{release}
export CFLAGS+=" -Wno-deprecated-declarations"
export CXXFLAGS+=" -Wno-deprecated-declarations"
+%if %{with TIZEN_PUBLIC}
+export CFLAGS+=" -DTIZEN_FEATURE_PUBLIC"
+export CXXFLAGS+=" -DTIZEN_FEATURE_PUBLIC"
+%define TIZEN_PUBLIC ON
+%define USE_MIXER no
+%else
%if ("%{_vd_cfg_product_type}" == "AUDIO")
export CFLAGS+=" -DIS_AUDIO_PRODUCT"
export CXXFLAGS+=" -DIS_AUDIO_PRODUCT"
%define PRODUCT_TYPE_AUDIO no
%define USE_MIXER yes
%endif
+%define TIZEN_PUBLIC OFF
+%endif
#TODO: check AV type is used or not
%if ("%{_vd_cfg_product_type}" == "AV")
export CXXFLAGS+=" -Wno-pessimizing-move"
+%if %{without TIZEN_PUBLIC}
%ifarch aarch64
export CXXFLAGS+=" -DDRM_MAPI_AARCH_64"
%endif
+%endif
%if ("%{sec_buildconf_product_lite_tizen}" == "n")
%if %{with ESPLUSPLAYER_UT}
-%cmake . -DESPLUSPLAYER_BUILD_UT=ON -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER
+%cmake . -DESPLUSPLAYER_BUILD_UT=ON -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER -DTIZEN_PUBLIC=%TIZEN_PUBLIC
%else
-%cmake . -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER
+%cmake . -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER -DTIZEN_PUBLIC=%TIZEN_PUBLIC
%endif
%else
-%cmake . -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER
+%cmake . -DPRODUCT_TYPE_AUDIO=%PRODUCT_TYPE_AUDIO -DUSE_MIXER=%USE_MIXER -DTIZEN_PUBLIC=%TIZEN_PUBLIC
+
%endif
make %{?jobs:-j%jobs}
SET(dependents "gstreamer-1.0 glib-2.0 dlog"
"boost"
- "tv-resource-manager"
"elementary ecore ecore-wl2"
"jsoncpp"
"drmdecrypt")
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(dependents ${dependents} "tv-resource-manager")
+ELSE(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(dependents ${dependents} "capi-media-sound-manager")
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
+
INCLUDE(FindPkgConfig)
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
#include <functional>
#include <list>
#include <memory>
+#ifdef TIZEN_FEATURE_PUBLIC
+#include <gst/gst.h>
+#endif
#include "core/utils/plusplayer_log.h"
#include "esplusplayer/types/buffer.h"
namespace {
// LCOV_EXCL_START
void DecodedPacketDeleter(esplusplayer_decoded_video_packet* packet) {
+#ifndef TIZEN_FEATURE_PUBLIC
if (packet == nullptr || packet->surface_data == nullptr) return;
+#else
+ if (packet == nullptr) return;
+ if (packet->private_data) { // hw dec
+ gst_buffer_unref((GstBuffer*)packet->private_data);
+ packet->private_data = nullptr;
+ }
+ if (packet->surface_data == nullptr) return;
+#endif
// LOG_DEBUG("packet[%p] deleted", packet);
tbm_surface_destroy(static_cast<tbm_surface_h>(packet->surface_data));
packet->surface_data = NULL;
-// LCOV_EXCL_STOP
+ // LCOV_EXCL_STOP
}
} // namespace
bool destroy_flag = false;
};
-// LCOV_EXCL_START
+// LCOV_EXCL_START
class AbstractDecodedPacketList : public DecodedPacketManagerInterface {
public:
explicit AbstractDecodedPacketList() = default;
public:
explicit DecodedScaledPacketList() { LOG_DEBUG("created"); }
virtual ~DecodedScaledPacketList() { LOG_DEBUG("destroyed"); }
-// LCOV_EXCL_START
+ // LCOV_EXCL_START
virtual void GetFreeTbmSurface(void** ptr, bool is_scale_change) {
std::unique_lock<std::mutex> lk(mtx_);
if (is_scale_change) {
return false;
});
}
-// LCOV_EXCL_STOP
+ // LCOV_EXCL_STOP
virtual void Clear() override {
std::unique_lock<std::mutex> lk(mtx_);
}
protected:
-// LCOV_EXCL_START
+ // LCOV_EXCL_START
virtual bool IsAvailableInternal() override {
if (GetList().size() > kMaxAvailableSize_) return false;
return true;
}
}
}
-// LCOV_EXCL_STOP
+ // LCOV_EXCL_STOP
private:
const std::uint32_t kMaxAvailableSize_ = 5;
#include <vector>
#include "core/decoderinputbuffer.h"
+#ifndef TIZEN_FEATURE_PUBLIC
#include "core/kpi.h"
+#endif
#include "core/trackrendereradapter.h"
#ifdef USE_MIXER
#include "mixer/mixerticket.h"
bool GetVideoStreamRotationInfo(VideoRotation* rotation) override;
bool SetSimpleMixOutBufferLevel(
const PlayerSimpleMixOutBufferLevel level) override;
+#ifdef TIZEN_FEATURE_PUBLIC
+ bool EnableVideoHole(bool value) override;
+ bool SetSoundStreamInfo(const sound_stream_info_h stream_info) override;
+#endif // TIZEN_FEATURE_PUBLIC
private:
using SubmitPacketOperator =
void ResetContextForStop_();
void GetSrcQueueCurrentSize_(const TrackType& type, uint64_t* byte_size,
uint64_t* time_size);
+#ifndef TIZEN_FEATURE_PUBLIC
kpi::EsCodecLoggerKeys MakeKpiKeys_();
+#endif
#ifdef USE_MIXER
bool PrepareVideoMixingMode_(std::vector<Track>* tracks);
#endif // USE_MIXER
#include "core/gst_utils.h"
#include "core/track_util.h"
+#ifndef TIZEN_FEATURE_PUBLIC
#include "core/utils/caf_logger.h"
+#endif
#include "core/utils/performance_checker.h"
#include "core/utils/plusplayer_cfg.h"
#include "core/utils/plusplayer_log.h"
EsPlayer::EsPlayer() {
std::call_once(es_conf::loaded, [this]() { es_conf::LoadIniFile(); });
+#ifndef TIZEN_FEATURE_PUBLIC
if (CafLogger::Initialize() != true) {
LOG_INFO("CAF Dbus not connect.");
}
+#endif
InitValuesFromIni_();
}
performance_checker::End(start, "Open");
return true;
};
+
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::SetUniqueNumber();
caf_unique_number = CafLogger::GetUniqueNumber();
CafLogger::LogMessage(CafEventType::kIdle, caf_unique_number);
+#endif
es_event::Open event{op};
return state_manager_.ProcessEvent(event);
return true;
};
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::LogMessage(CafEventType::kPlaying, caf_unique_number);
+#endif
es_event::Start event{op};
return state_manager_.ProcessEvent(event);
LOG_INFO_P(this, "Wait , Wait Prepare() Done...");
}
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::LogMessage(CafEventType::kIdle, caf_unique_number);
CafLogger::StopLoggingThread();
+#endif
return res;
}
return true;
};
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::StartLoggingThread();
CafLogger::LogMessage(CafEventType::kReady, caf_unique_number);
+#endif
es_event::Prepare event{op};
if (!state_manager_.ProcessEvent(event)) {
LOG_INFO_P(this, "call OnPrepareDone End");
}
+#ifndef TIZEN_FEATURE_PUBLIC
kpi::CodecLogger logger;
kpi::EsCodecLoggerKeys event_keys = MakeKpiKeys_();
logger.SendKpi(ret, event_keys);
+#endif
LOG_LEAVE_P(this);
}
internal::ConvertToStreamType(track.type), true);
}
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::LogMessage(CafEventType::kPaused, caf_unique_number);
+#endif
es_event::Pause event{op};
return state_manager_.ProcessEvent(event);
internal::ConvertToStreamType(track.type), true);
}
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::LogMessage(CafEventType::kPlaying, caf_unique_number);
+#endif
es_event::Resume event{op};
return state_manager_.ProcessEvent(event);
app_info_ = app_info;
trackrenderer_->SetAppInfo(app_info);
LOG_INFO("Appid [%s]", app_info.id.c_str());
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::SetAppId(app_info.id);
+#endif
}
void EsPlayer::SetAppInfoEx(const PlayerAppInfoEx& app_info) {
app_info_.type = app_info.type;
trackrenderer_->SetAppInfoEx(app_info);
LOG_INFO("Appid [%s]", app_info_.id.c_str());
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::SetAppId(app_info_.id);
+#endif
}
bool EsPlayer::SetPlaybackRate(const double rate, const bool audio_mute) {
return true;
};
+#ifndef TIZEN_FEATURE_PUBLIC
CafLogger::LogMessage(CafEventType::kStreamReady, caf_unique_number);
+#endif
es_event::SetStream event{op};
return state_manager_.ProcessEvent(event);
return trackrenderer_->SetSimpleMixOutBufferLevel(converted_level);
}
+#ifndef TIZEN_FEATURE_PUBLIC
kpi::EsCodecLoggerKeys EsPlayer::MakeKpiKeys_() {
kpi::EsCodecLoggerKeys event_info;
event_info.app_id = app_info_.id;
}
return event_info;
}
+#endif
void EsPlayer::InitValuesFromIni_() {
force_audio_swdecoder_use_ = es_conf::ini_property["force_sw_audio_codec"];
force_video_swdecoder_use_ = es_conf::ini_property["force_sw_video_codec"];
}
+#ifdef TIZEN_FEATURE_PUBLIC
+bool EsPlayer::EnableVideoHole(bool value) {
+ if (state_manager_.GetState() < EsState::kIdle) {
+ LOG_ERROR_P(this, "Invalid State , current %d",
+ state_manager_.GetStateEnum());
+ return false;
+ }
+ return trackrenderer_->EnableVideoHole(value);
+}
+
+bool EsPlayer::SetSoundStreamInfo(const sound_stream_info_h stream_info) {
+ if (state_manager_.GetState() != EsState::kIdle) {
+ LOG_ERROR_P(this, "Invalid State , current %d",
+ state_manager_.GetStateEnum());
+ return false;
+ }
+ if (!stream_info) {
+ LOG_ERROR_P(this, "stream_info is null");
+ return false;
+ }
+ return trackrenderer_->SetSoundStreamInfo(stream_info);
+}
+#endif
+
namespace es_conf {
void LoadIniProperty(const Json::Value& root) {
_pkt->pts = packet.pts;
_pkt->duration = packet.duration;
_pkt->surface_data = static_cast<void*>(packet.surface_data);
+#ifdef TIZEN_FETURE_PUBLIC
+ _pkt->private_data = packet.buffer_addr;
+#else
_pkt->private_data = packet.scaler_index;
+#endif
if (decoded_pkt_mgr_ && decoded_pkt_mgr_->TryToAdd(_pkt)) {
this->media_packet_video_decoded_cb_(
_pkt, media_packet_video_decoded_cb_userdata_);
_pkt.pts = pkt->pts;
_pkt.duration = pkt->duration;
_pkt.surface_data = static_cast<tbm_surface_h>(pkt->surface_data);
+#ifdef TIZEN_FEATURE_PUBLIC
+ _pkt.buffer_addr = pkt->private_data;
+#else
_pkt.scaler_index = pkt->private_data;
+#endif
return cast_(handle)->ReturnDecodedPacket(_pkt);
});
return mgr;
packet->pts = _packet.pts;
packet->duration = _packet.duration;
packet->surface_data = static_cast<void*>(_packet.surface_data);
+#ifdef TIZEN_FEATURE_PUBLIC
+ packet->private_data = _packet.buffer_addr;
+#else
packet->private_data = _packet.scaler_index;
+#endif
}
if (state) {
*state = convert_get_decoded_video_frame_status_(_state);
return convert_return_type_(cast_(handle)->SetSimpleMixOutBufferLevel(
static_cast<PlayerSimpleMixOutBufferLevel>(level)));
}
+
+#ifdef TIZEN_FEATURE_PUBLIC
+int esplusplayer_enable_video_hole(esplusplayer_handle handle,
+ const bool value) {
+ LOG_ENTER_P(cast_(handle))
+ if (is_null_(handle)) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
+
+ auto ret = cast_(handle)->EnableVideoHole(value);
+ return convert_return_type_(ret);
+}
+
+int esplusplayer_set_sound_stream_info(esplusplayer_handle handle,
+ const sound_stream_info_h stream_info) {
+ LOG_ENTER_P(cast_(handle))
+ if (is_null_(handle) || is_null_(stream_info))
+ return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
+
+ auto ret = cast_(handle)->SetSoundStreamInfo(stream_info);
+ return convert_return_type_(ret);
+}
+#endif
SET(${fw_name}_CXXFLAGS "-Wall -Werror -std=c++14 -fPIC -Wl,-z,relro -fstack-protector -DEFL_BETA_API_SUPPORT")
SET(dependents "gstreamer-1.0 dlog capi-system-info"
- "boost"
- "context-aware-api"
- "libtzplatform-config"
- "drmdecrypt"
- "logger")
+ "boost"
+ "libtzplatform-config")
+
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(dependents ${dependents} "context-aware-api"
+ "drmdecrypt"
+ "logger")
+ELSE(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(dependents ${dependents} "capi-media-sound-manager")
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
INCLUDE(FindPkgConfig)
${PROJECT_SOURCE_DIR}/src/plusplayer_cfg.cpp
${PROJECT_SOURCE_DIR}/src/trackrendereradapter.cpp
${PROJECT_SOURCE_DIR}/src/trackrendereradapter_utils.cpp
- ${PROJECT_SOURCE_DIR}/src/kpi.cpp
${PROJECT_SOURCE_DIR}/src/decodedvideopacketex.cpp
${PROJECT_SOURCE_DIR}/src/videoframetypestrategy.cpp
- ${PROJECT_SOURCE_DIR}/src/caf_logger.cpp
-)
+ )
+
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(CC_SRCS ${CC_SRCS}
+ ${PROJECT_SOURCE_DIR}/src/kpi.cpp
+ ${PROJECT_SOURCE_DIR}/src/caf_logger.cpp)
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
ADD_LIBRARY(${fw_name} SHARED ${CC_SRCS})
#include "gst/gst.h"
// temporary until drmdecrypt platform interfaces are added into rootstrap
-#ifndef PLUPLAYER_DOWNLOADABLE_APP_TVPLUS
+#if !defined(TIZEN_FEATURE_PUBLIC) && \
+ !defined(PLUPLAYER_DOWNLOADABLE_APP_TVPLUS)
#include <drmdecrypt/drmdecrypt_api.h>
#endif
}
void ReleaseTZHandle_(GstBuffer* buffer) {
-#ifndef PLUPLAYER_DOWNLOADABLE_APP_TVPLUS
+#if !defined(TIZEN_FEATURE_PUBLIC) && \
+ !defined(PLUPLAYER_DOWNLOADABLE_APP_TVPLUS)
GstStructure* tzqdata = GST_STRUCTURE(gst_mini_object_get_qdata(
GST_MINI_OBJECT(buffer),
g_quark_from_static_string("GstTzHandleData")));
bool GetDecodingTime(StreamType type, int32_t* time_millisecond);
bool SetVideoStreamRotationInfo(const VideoRotation& rotation);
bool SetSimpleMixOutBufferLevel(const int& level);
+#ifdef TIZEN_FEATURE_PUBLIC
+ bool EnableVideoHole(bool value);
+ bool SetSoundStreamInfo(const sound_stream_info_h stream_info);
+#endif
private:
TrackRendererAdapter();
#include <cassert>
-#ifndef PLUPLAYER_DOWNLOADABLE_APP_TVPLUS
+#if defined(TIZEN_FEATURE_PUBLIC) || !defined(PLUPLAYER_DOWNLOADABLE_APP_TVPLUS)
#include "tzplatform_config.h"
#endif
namespace esplusplayer {
namespace esplusplayer_cfg {
-
+
const char* GetIniPath() {
const char* path =
- tzplatform_mkpath(TZ_SYS_RO_ETC, "multimedia/esplusplayer.ini");
+ tzplatform_mkpath(TZ_SYS_RO_ETC, "multimedia/esplusplayer.ini");
assert(path);
return path;
}
-} // namespace esplusplayer_cfg
+} // namespace esplusplayer_cfg
-} // namespace esplusplayer
\ No newline at end of file
+} // namespace esplusplayer
\ No newline at end of file
}
return true;
}
+
+#ifdef TIZEN_FEATURE_PUBLIC
+bool TrackRendererAdapter::EnableVideoHole(bool value) {
+ return (trackrenderer_enable_video_hole(handle_, value) != kFailed);
+}
+
+bool TrackRendererAdapter::SetSoundStreamInfo(
+ const sound_stream_info_h stream_info) {
+ return (trackrenderer_set_sound_stream_info(handle_, stream_info) != kFailed);
+}
+#endif
+
// LCOV_EXCL_START
/////////////////////////////////////////////
namespace adapter_utils {
void InitTrack(TrackRendererTrack* track) {
+#ifdef TIZEN_FEATURE_PUBLIC
+ memset(track, 0x00, sizeof(TrackRendererTrack));
+#endif
track->index = kTrackRendererInvalidTrackIndex; // int index
track->id = 0; // int id
track->mimetype = nullptr; // const char* mimetype
_packet.pts = packet->pts;
_packet.duration = packet->duration;
_packet.surface_data = static_cast<tbm_surface_h>(packet->surface_data);
+#ifdef TIZEN_FEATURE_PUBLIC
+ _packet.buffer_addr = packet->buffer_addr;
+#else
_packet.scaler_index = packet->scaler_index;
+#endif
return _packet;
}
_packet.pts = packet.pts;
_packet.duration = packet.duration;
_packet.surface_data = static_cast<tbm_surface_h>(packet.surface_data);
+#ifdef TIZEN_FEATURE_PUBLIC
+ _packet.buffer_addr = packet.buffer_addr;
+#else
_packet.scaler_index = packet.scaler_index;
+#endif
return _packet;
}
SET(dependents "gstreamer-1.0 glib-2.0 gstreamer-plugins-base-1.0 gstreamer-app-1.0 dlog gtest gmock"
"boost"
- "tv-resource-manager appcore-efl elementary ecore evas ecore-wl2"
- "libavoc"
- "video-capture libturbojpeg libjpeg"
- "audio-control video-sink capi-system-info"
+ "appcore-efl elementary ecore evas ecore-wl2"
+ " libturbojpeg libjpeg capi-system-info"
)
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(dependents ${dependents} "tv-resource-manager r"
+ "video-capture audio-control video-sink"
+ "libavoc"
+ )
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
+
INCLUDE(FindPkgConfig)
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/src/plusplayer-core/include_internal
${PROJECT_SOURCE_DIR}/src/esplusplayer/include_internal
+ )
+
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/src/mixer/include_internal
)
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
+
+include_directories(/usr/include/ecore-wayland-1)
FILE(GLOB UT_SRC
src/utils/*.cpp
src/esplusplayer/tclist.cpp
src/ut_main.cpp
- src/ut_cloudgame.cpp
src/tc_regression.cpp
)
+IF(${TIZEN_PUBLIC} STREQUAL "OFF")
+SET(UT_SRC ${UT_SRC} src/ut_cloudgame.cpp)
+ENDIF(${TIZEN_PUBLIC} STREQUAL "OFF")
+
IF(${USE_MIXER} STREQUAL "yes")
SET(UT_MIXER_SRC
src/mixer/constant.cpp
#include <gmock/gmock.h>
#include <gst/gst.h>
#include <gtest/gtest.h>
+#ifndef TIZEN_FEATURE_PUBLIC
#include <rm_api.h>
+#endif
#include <condition_variable>
#include <iostream>
std::unique_ptr<EsStreamReader> reader = nullptr;
bool ready_to_push = false;
- explicit StreamContext(const std::string &path,
+ explicit StreamContext(const std::string& path,
esplusplayer_stream_type type) noexcept {
reader = std::make_unique<EsStreamReader>(path, type);
}
return prepared_.result;
}
- bool SetDisplay(void *window) {
+ bool SetDisplay(void* window) {
return esplusplayer_set_display(handle_, ESPLUSPLAYER_DISPLAY_TYPE_OVERLAY,
window) == ESPLUSPLAYER_ERROR_TYPE_NONE;
}
}
public:
- static Context *Create(const std::string &path) {
+ static Context* Create(const std::string& path) {
if (path.empty()) {
return nullptr;
}
}
private:
- explicit Context(const std::string &path) : path_(path) {}
+ explicit Context(const std::string& path) : path_(path) {}
bool Init() {
video_ = std::make_unique<StreamContext>(path_ + "video/",
}
private:
- static void OnError(const esplusplayer_error_type, void *) {
+ static void OnError(const esplusplayer_error_type, void*) {
std::cout << "Error happened" << std::endl;
}
- static void OnResourceConflicted(void *) {
+ static void OnResourceConflicted(void*) {
std::cout << "Resource conflicted" << std::endl;
}
- static void OnPrepared(bool ret, void *userdata) {
+ static void OnPrepared(bool ret, void* userdata) {
std::cout << "Prepared" << std::endl;
- auto *ctx = static_cast<Context *>(userdata);
+ auto* ctx = static_cast<Context*>(userdata);
ctx->StartDataFeedingTask(ESPLUSPLAYER_STREAM_TYPE_VIDEO);
ctx->StartDataFeedingTask(ESPLUSPLAYER_STREAM_TYPE_AUDIO);
ctx->SignalPrepareDone(ret);
}
static void OnReadyToPrepare(const esplusplayer_stream_type type,
- void *userdata) {
+ void* userdata) {
std::cout << "Ready to prepare" << std::endl;
- auto *ctx = static_cast<Context *>(userdata);
+ auto* ctx = static_cast<Context*>(userdata);
ctx->StartDataFeedingTask(type);
}
Signal<bool, false> prepared_;
};
+#ifndef TIZEN_FEATURE_PUBLIC
struct ResourceManager {
explicit ResourceManager() {
rm_register(&ResourceManager::OnResourceConflicted, this, &rm_handle,
}
static rm_cb_result OnResourceConflicted(int handle, rm_callback_type event,
- rm_device_request_s *info,
- void *data) {
+ rm_device_request_s* info,
+ void* data) {
return RM_CB_RESULT_OK;
}
int rm_handle = -1;
int count = 0;
};
-
+#endif
} // namespace
class RegressionTest : public ::testing::Test {
}
protected:
- static ::Environment *window_;
+ static ::Environment* window_;
};
-::Environment *RegressionTest::window_ = nullptr;
+::Environment* RegressionTest::window_ = nullptr;
/*
* [[ DF230714-00327 ]]
ASSERT_TRUE(ctx->WaitForPrepareDone()) << "Prepare failed";
ASSERT_TRUE(ctx->Start());
+#ifndef TIZEN_FEATURE_PUBLIC
std::this_thread::sleep_for(std::chrono::seconds(2));
-
{
::ResourceManager rm;
rm.RaiseResourceConflict(RM_CATEGORY_SCALER);
}
std::this_thread::sleep_for(std::chrono::seconds(2));
+#endif
ASSERT_TRUE(ctx->Stop());
}
\ No newline at end of file
#include <jpeglib.h>
#include <math.h>
#include <poll.h>
-#include <system-type/system_type_enum.h>
#include <unistd.h>
#include <algorithm>
#include <fstream>
#include <memory>
+#include "ut/include/esplusplayer/eseventlistener.hpp"
+#include "ut/include/esplusplayer/esreader.hpp"
+#ifdef TIZEN_FEATURE_PUBLIC
+#include <system_info.h>
+#else
+#include <capi-system-info/system_info.h>
+#include <capi-system-info/system_info_key.h>
+#include <system-type/system_type_enum.h>
+
#include "capi-video-capture.h"
#include "diagnosis-audio-control.hpp"
#include "iaudio-control.hpp"
#include "ivideocapture.hpp"
-#include "ut/include/esplusplayer/eseventlistener.hpp"
-#include "ut/include/esplusplayer/esreader.hpp"
+#endif
using namespace std;
using namespace esplusplayer;
Utility::Utility() {
appwindow_.reset(new esplusplayer_ut::AppWindow(0, 0, 1920, 1080));
+#ifndef TIZEN_FEATURE_PUBLIC
audioControl = IAudioControl::getInstance();
audioDiagnoser = DiagnosisAudioControl::getInstance();
+#endif
}
Utility::~Utility() {}
return u << shift;
}
+#ifndef TIZEN_FEATURE_PUBLIC
void ResizeCopy(unsigned int m_width, unsigned int m_height,
unsigned int m_rwidth, unsigned int m_rheight, char* c_ptr,
char* y_ptr, unsigned char* dest, unsigned int color_format) {
audioDiagnoser->Diagnosis_GetBoolean(0, "main out mute", &audioMute), 0);
return (audioMute != 0);
}
+#endif
int Utility::GetPlayingTimeForManualTestInMsec() {
// If you want to adjust the playingTime for the TC which use this method,