remove unnecessary product code related to display quality 00/298400/5
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 6 Sep 2023 11:05:04 +0000 (20:05 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Wed, 6 Sep 2023 12:04:46 +0000 (21:04 +0900)
Display::SetDisplayQualityInfo()
Display::SetVideoQualityMode()
TrackRenderer::SetVideoQualityInfo_()

[Version] 0.0.36

Change-Id: Id57dfedca32028ceeb63b1b4987b7b9441bb48ad

packaging/libtrackrenderer.spec
src/display.cpp
src/include_internal/trackrenderer/display.h
src/include_internal/trackrenderer/trackrenderer.h
src/trackrenderer.cpp

index b639bc34487db7029f25db16d443e29487e8c613..00cb1285389276d0174ee8f2204498b95ad9164c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libtrackrenderer
 Summary:    new multimedia streaming player trackrenderer
-Version:    0.0.35
+Version:    0.0.36
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 644e6b3c95b590e3066ca427edace5a9b5ca6fe2..ac8273cafa3abfc5ba8831710c66a3514891c907 100644 (file)
@@ -439,11 +439,6 @@ bool Display::UpdateVisible(GstElement* videosink) {
   return true;
 }
 
-void Display::SetDisplayQualityInfo(const GstCaps* video_quality_info_caps) {
-  video_quality_info_caps_ =
-      gstguard::make_guard(gst_caps_copy(video_quality_info_caps));
-}
-
 void Display::SetDisplayMode(const DisplayMode& mode) { mode_ = mode; }
 
 void Display::SetDisplayRotate(const DisplayRotation& rotate) {
index 3b01dfbc80074e752c53c2c4e06588ce2baedb82..4c361fc7a97f0941bcdb863a3c7884305e400607 100644 (file)
@@ -23,7 +23,6 @@ class Display : private boost::noncopyable {
  public:
   ~Display();
   uint32_t GetSurfaceId() const { return surface_id_; }
-  void SetDisplayQualityInfo(const GstCaps* video_appsrc);
   void SetDisplayMode(const DisplayMode& mode);
   void SetDisplayRotate(const DisplayRotation& rotate);
   bool SetDisplay(const DisplayType& type, Evas_Object* obj);
@@ -43,7 +42,6 @@ class Display : private boost::noncopyable {
   }
   void GetDisplayMode(DisplayMode* mode) { *mode = mode_; }
   void GetDisplayRotate(DisplayRotation* rotate) { *rotate = rotate_; }
-  void SetVideoQualityMode(const uint32_t mode) { qualitymode_ = mode; }
 
  private:
   bool SetDisplay_(const DisplayType& type, Ecore_Wl2_Window* ecore_wl2_window,
@@ -57,10 +55,8 @@ class Display : private boost::noncopyable {
   DisplayType type_ = DisplayType::kNone;
   DisplayMode mode_ = DisplayMode::kFullScreen;
   DisplayRotation rotate_ = DisplayRotation::kNone;
-  uint32_t qualitymode_ = 0;
   bool visible_ = true;
   std::mutex settings_mutex_;
-  gstguard::GstGuardPtr<GstCaps> video_quality_info_caps_;
 };
 
 }  // namespace trackrenderer
index 82cdb60d09397f803b3ed30a4910671148f8b22c..a867f4cff9f2e36f2b42e79f4025fe0ad468b2f1 100644 (file)
@@ -331,7 +331,6 @@ class TrackRenderer : public ResourceConflictListener,
   bool SetUnlimitedMaxBufferMode_(const boost::any& value);
   bool SetVideoPreDisplayMode_(const boost::any& value);
   bool SetStartRenderingTime_(const boost::any& value);
-  void SetVideoQualityInfo_();
   void CompleteSeeking_(void);
   bool HasSubtitleOnly_() const;
   bool ActivateAudioPipeline(GstCaps* caps);
index 2cc35213df949a7ecc309d9693ed9ee890e6bda2..91f3d17d21ad680ba9cb0a94223babb4ac2b49e0 100644 (file)
@@ -511,41 +511,6 @@ bool TrackRenderer::Stop() {
   return true;
 }
 
-void TrackRenderer::SetVideoQualityInfo_() {
-  GstCaps* video_caps = nullptr;
-  pipeline_->GetProperty(Elements::kAppSrcVideo, "caps", &video_caps);
-
-  if (video_caps == nullptr) return;
-  auto video_caps_guard = gstguard::make_guard(video_caps);
-  auto new_caps_guard = gstguard::make_guard(gst_caps_copy(video_caps));
-
-  GstStructure* structure = gst_caps_get_structure(new_caps_guard.get(), 0);
-  const gchar* stream_type = gst_structure_get_string(structure, "stream-type");
-  if (stream_type) gst_structure_set_name(structure, stream_type);
-
-  int max_w = 0, max_h = 0;
-  if (!gst_structure_get_int(structure, "maxwidth", &max_w))
-    gst_structure_get_int(structure, "width", &max_w);
-  if (!gst_structure_get_int(structure, "maxheight", &max_h))
-    gst_structure_get_int(structure, "height", &max_h);
-
-  if (internal::IsUhd8kResolution(max_w, max_h)) {
-    max_w = kMaxUhd8kWidth;
-    max_h = kMaxUhd8kHeight;
-  } else if (internal::IsUhdResolution(max_w, max_h)) {
-    max_w = kMaxUhdWidth;
-    max_h = kMaxUhdHeight;
-  } else {
-    max_w = kMaxFhdWidth;
-    max_h = kMaxFhdHeight;
-  }
-  gst_caps_set_simple(new_caps_guard.get(), "maxwidth", G_TYPE_INT, max_w,
-                      "maxheight", G_TYPE_INT, max_h, NULL);
-
-  TRACKRENDERER_INFO("max width [%d], max height [%d]", max_w, max_h);
-  display_->SetDisplayQualityInfo(new_caps_guard.get());
-}
-
 bool TrackRenderer::Prepare() {
   TRACKRENDERER_ENTER_E;
   std::unique_lock<std::mutex> lock(resource_m_);
@@ -553,49 +518,22 @@ bool TrackRenderer::Prepare() {
     TRACKRENDERER_ERROR("already stopped");
     return false;
   }
-  ::PerfUsrTrace("Prepare GetResource");
+
   if (GetResource_() == false) {
     TRACKRENDERER_ERROR("resource acquire failed.");
     ReleaseResource_();
     return false;
   }
-  ::PerfUsrTrace("Prepare CreatePipeline");
+
   if (CreatePipeline_() == false) {
     TRACKRENDERER_ERROR("renderer pipeline creation failed");
     return false;
   }
 
-  int max_width = 0;
-  int max_height = 0;
-  for (const Track& track : trackinfo_) {
-    if (track.type == kTrackTypeVideo) {
-      max_width = track.maxwidth;
-      max_height = track.maxheight;
-      break;
-    }
-  }
-
-  if (internal::IsUhd8kResolution(max_width, max_height)) {
-    constexpr uint32_t kAdaptiveStreaming8kMode =
-        0x80;  // refer to waylandsink property value.
-    TRACKRENDERER_INFO("Set 8K Video quality mode : 0x80");
-    display_->SetVideoQualityMode(kAdaptiveStreaming8kMode);
-  }
-  ::PerfUsrTrace("Prepare SetVideoQualityInfo_ begin");
-  SetVideoQualityInfo_();
-  ::PerfUsrTrace("Prepare SetVideoQualityInfo_ end");
   pipeline_->Execute(Elements::kSinkVideo, [this](GstElement* obj) noexcept {
     return display_->Update(obj);
   });
-  auto audio_delay_info = gstguard::make_guard(gst_structure_new(
-      "audio-delay-info", "video-max-width", G_TYPE_UINT, max_width,
-      "video-max-height", G_TYPE_UINT, max_height, NULL));
-  TRACKRENDERER_INFO("Set AudioDelayInformation v_res [%d x %d]", max_width,
-                     max_height);
-
-  //TODO: should be enabled audio
-  //pipeline_->SetProperty(Elements::kSinkAudio, "audio-delay-info-for-avsync",
-  //                       audio_delay_info.get());
+
   if (!pipeline_->SetState(Elements::kPipeline, GST_STATE_PAUSED)) {
     TRACKRENDERER_ERROR("Set State to PAUSED failed");
     return false;