Merge branch 'main' into ci/gilbok-lee/update_public
[platform/core/multimedia/esplusplayer.git] / src / esplusplayer / src / esplusplayer_capi.cpp
index e28a0b3..f35c970 100644 (file)
@@ -307,7 +307,11 @@ class listener_bridge : public esplusplayer::EsEventListener {
     _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_);
@@ -1501,7 +1505,11 @@ std::shared_ptr<DecodedPacketManagerInterface> CreateDecodedPacketManager(
           _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;
@@ -1924,7 +1932,11 @@ int esplusplayer_get_decoded_video_packet(
     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);
@@ -2418,3 +2430,24 @@ int esplusplayer_set_simple_mix_out_buffer_level(
   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