Merge branch 'main' into tizen_public
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 12 Nov 2024 01:13:54 +0000 (10:13 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 12 Nov 2024 01:13:54 +0000 (10:13 +0900)
25 files changed:
1  2 
include/esplusplayer/decodedvideopacketex.h
include/esplusplayer/drm.h
include/esplusplayer/elementary_stream.h
include/esplusplayer/es_eventlistener.h
include/esplusplayer/espacket.h
include/esplusplayer/esplusplayer.h
include/esplusplayer/external_drm.h
include/esplusplayer/track.h
include/esplusplayer_capi/esplusplayer_capi.h
include/esplusplayer_capi/esplusplayer_internal.h
include/esplusplayer_capi/stream.h
include/mixer/mixer.h
include/mixer_capi/mixer_capi.h
packaging/esplusplayer.spec
src/esplusplayer/include_internal/esplayer/esplayer.h
src/esplusplayer/src/elementary_stream.cpp
src/esplusplayer/src/esplayer.cpp
src/esplusplayer/src/esplusplayer_capi.cpp
src/mixer/include_internal/mixer/sys/tbminterface.h
src/mixer/include_internal/mixer/tizen/tizenbuffermgr.h
src/mixer/include_internal/mixer/tizen/tizenbufferphyaddraccessor.h
src/mixer/src/sys/tbminterface.cpp
src/plusplayer-core/include_internal/core/trackrendereradapter.h
src/plusplayer-core/src/trackrendereradapter.cpp
ut/src/utils/utility.cpp

index ad1aa858cefefbc8c622dd0b018586c7f7fa6a05,66bf9bf30155ae3102f4f3e589fd939ee6e23edd..86eea3c961f823c8132ae211b4798d072eaa28d7
mode 100644,100755..100755
Simple merge
index aeb2d2348c32da32c0755e379dc3daa1de69202c,2263b96019a5c8cfaa85ccd0ba4917920914d8b2..8bfe130c2706e1f36db763ccd9b7d350c7e99517
mode 100644,100755..100755
index 2c46b5302ee52f728e2b130e1fa68704fc9c60ce,04220b558bbe9c3bfe5d2ad0f9a20e9744c5b09e..765b2eebb847ac357c12be2e9063460ca43d9b66
mode 100644,100755..100755
index e04a50dff0c4ed840b976a590e27eb6bb03864f9,27698713281fb77f39a75465b009e9bee29eddc1..232e4173e20f7d16cf6bd6ea6393998880cb927c
mode 100644,100755..100755
@@@ -938,12 -1039,17 +1036,17 @@@ class EsPlusPlayer : private boost::non
     * @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:
index d14f05c5f7a9660a183c82f692f6f2207e3e4284,a2936d107d4f796a23e9cf7411a6ec8181595df1..5da7960a9f32e4334066fb0ef2a1af6eabb62696
mode 100644,100755..100755
index 8c5edbf31687798a50692bba68ec5c35f316b536,28a3c78bedc604f3940aa812e5dfe0470c00bef9..5aeb543c0d9db780ac893ad187736e919b59a5ec
mode 100644,100755..100755
index 990985395327c6f30fea99145e8ae99b3f2d8db1,2a30c12f8ebdf93a5f1de335f97f613d96b5a962..c90b7faf7cbb5442928967c434175d365901808f
mode 100644,100755..100755
Simple merge
index d63ebc0b3dc63a8b7b183b5b719d9ef6bc5ea4d3,3dffe041badeece46873ca41ddd0d0449d60174d..acc4326b68a4ba0682e4fde3140f27842d5abd0e
mode 100644,100755..100755
index a7fde2cccb0fb8723f1043d4030d1f342142849a,c33f7d5a1e4aa9be08a1ad9afe8b20022f07b09b..2855eda5cc21779bd3c3aebb6e094b26b459a0f4
mode 100644,100755..100755
index a14219d1c7dcd696917fcb84e6c90d86515accb7,2015888cdb2d8fc2019dcad95c17dc7625675b61..836cb53882e02b10e7d752ac23a5c6406bcb7c31
mode 100644,100755..100755
index f8899dba10c3dbc2e1b49942cbb9bfdadcf4ae79,0c9d9e2903d7c8e75cf37becf60bc43d6858c0ac..4108387d989644a67d2869695e0359ad024aa230
@@@ -174,10 -158,7 +174,11 @@@ class EsPlayer : public EsPlusPlayer 
    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 =
index 90249592b55e06dcfefa2fe6130517a34d536784,8037c53daea23debf58aa118002b5740d4d70f96..d320e06724a1b5732d28b0b352305415e158ead1
@@@ -635,6 -611,17 +635,17 @@@ void EsPlayer::SetTrackRendererAttribut
    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
@@@ -1200,15 -1175,10 +1211,12 @@@ bool EsPlayer::SetStream_(const Track& 
      }
    }
    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);
@@@ -3033,7 -3006,16 +3044,17 @@@ bool EsPlayer::SetSimpleMixOutBufferLev
    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;
index 4a31ea9295907dd25b371f9c65fcda3c8df0e3d2,ae9a70783ad6df51cf6bd59e70f81fc1a747f1e9..eea93956193296bfb0c69e6c44ddb117d1fc2581
@@@ -2447,23 -2419,10 +2447,31 @@@ int esplusplayer_set_simple_mix_out_buf
        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);
+ }
index 0dc126d0bb8d6df1e7e9d380b826560c33d1b877,75334fecf9e26c83b854d521d005bb4817e62a48..5ca1147089d66a119db4e9844907c02bc75dc1d9
@@@ -51,16 -35,16 +51,16 @@@ BufferDefaultType TBMInterface::BoImpor
    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
index 83a498f95274c2065b918611b1846bfadad6c255,35638366a645b5da91a918ea6b5ea3962d384aad..5c5fe3b155e3e7d9b4a617ffd3b6803234e08e19
mode 100644,100755..100755
  #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;
@@@ -501,10 -490,9 +502,10 @@@ bool Utility::IsAudioDisconnected() 
  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,