* @return @c ErrorType::kNone = fmm auto mode on @c
* ErrorType::kInvalidOperation = fmm audo mode off @c
* ErrorType::kInvalidState = internal operation failed
+ * @exception None
*/
virtual ErrorType SetFmmMode() { return ErrorType::kNone; }
-
++
/**
* @brief Provided api for setting audio codec type
+ * @param [in] type : type of audio codec
* @pre The player state must be set to #EsState::kIdle.
- * @return @c True on success, otherwise @c False
+ * @post None
+ * @return @c True on success, otherwise @c False
+ * @exception None
*/
virtual bool SetAudioCodecType(const PlayerAudioCodecType& type) {
return false;
* milliseconds
* @pre The player must be one of #EsState::kPlaying or
* #EsState::kPaused
+ * @post None
* @return @c True on success, otherwise @c False
* ("time_in_milliseconds" will be 0)
- * @exception None
++ * @exception None
*/
virtual bool GetDecodingTime(StreamType type, int32_t* time_in_milliseconds) {
return false;
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
+ * @brief Set the mode of virtual mic
* @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
++
+ virtual bool SetVirtualMicMode() { return false; }
+
// LCOV_EXCL_STOP
protected:
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
+ bool SetVirtualMicMode() override;
private:
using SubmitPacketOperator =
trackrenderer_->SetAttribute(
TrackRendererAdapter::Attribute::kPlayerTimeUnitType,
static_cast<std::uint32_t>(time_unit_type));
- static_cast<std::uint32_t>(3));
+ trackrenderer_->SetAttribute(TrackRendererAdapter::Attribute::kVirtualMicMode,
+ virtual_mic_mode_);
+ /*
+ std::map<std::uint32_t, PlayerTypes> players_map_ = {
+ {1, PlayerTypes::kDefaultPlayer},
+ {2, PlayerTypes::kDashPlayer},
+ {3, PlayerTypes::kESPlayer},
+ {4, PlayerTypes::kDefaultPlayerHttp}};
+ */
+ trackrenderer_->SetAttribute(TrackRendererAdapter::Attribute::kPlayerType,
++ static_cast<std::uint32_t>(3));
}
// LCOV_EXCL_START
}
}
auto op = [this, track]() noexcept {
- if (!SetTrack_(track)) {
- return false;
- }
- return true;
+ return SetTrack_(track);
};
+#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);
}
+ bool EsPlayer::SetVirtualMicMode() {
+ if (state_manager_.GetState() != EsState::kIdle) {
+ LOG_ERROR_P(this, "Invalid State , current %d",
+ state_manager_.GetStateEnum());
+ return false;
+ }
+ virtual_mic_mode_ = 1;
+ return true;
+ }
+
+#ifndef TIZEN_FEATURE_PUBLIC
kpi::EsCodecLoggerKeys EsPlayer::MakeKpiKeys_() {
kpi::EsCodecLoggerKeys event_info;
event_info.app_id = app_info_.id;
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
++
+ int esplusplayer_set_virtual_mic_mode(esplusplayer_handle handle) {
+ LOG_ENTER_P(cast_(handle))
+ if (is_null_(handle)) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
+
+ auto ret = cast_(handle)->SetVirtualMicMode();
+ return convert_return_type_(ret);
+ }
return tbm_bo_import(bufmgr, key);
}
- int TBMInterface::GAScale(tbm_bufmgr bufmgr, GraphicsGAScaleInfo* info) {
- return Gfx_GA_Scale(bufmgr, info);
+ int TBMInterface::GAScale(tbm_bufmgr bufmgr, ppi_graphics_control_ga_scale_info_s* info) {
+ return ppi_graphics_control_ga_scale(bufmgr, info) == 0 ? 1 : 0;
}
- int TBMInterface::GACopy(tbm_bufmgr bufmgr, GraphicsGABltRopInfo* info) {
- return Gfx_GA_BltRop(bufmgr, info);
+ int TBMInterface::GACopy(tbm_bufmgr bufmgr, ppi_graphics_control_ga_blt_rop_info_s* info) {
+ return ppi_graphics_control_ga_bltrop(bufmgr, info) == 0 ? 1 : 0;
}
- int TBMInterface::GAFill(tbm_bufmgr bufmgr, GraphicsGAFillRectInfo* info) {
- return Gfx_GA_FillRect(bufmgr, info);
+ int TBMInterface::GAFill(tbm_bufmgr bufmgr, ppi_graphics_control_ga_fill_rect_info_s* info) {
+ return ppi_graphics_control_ga_fillrect(bufmgr, info) == 0 ? 1 : 0;
}
} // namespace tizen
-} // namespace esplusplayer
+} // namespace esplusplayer
#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 <ppi-diagnosis-audio-control.h>
+
+ #include <ppi-audio-control.h>
#include "ivideocapture.hpp"
-#include "ut/include/esplusplayer/eseventlistener.hpp"
-#include "ut/include/esplusplayer/esreader.hpp"
+#endif
using namespace std;
using namespace esplusplayer;
bool Utility::IsAudioMute() {
long audioMute = 0;
EXPECT_EQ(
- audioDiagnoser->Diagnosis_GetBoolean(0, "main out mute", &audioMute), 0);
+ ppi_diagnosis_audio_control_diagnosis_get_boolean(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,