[4.0] Added APIs for codec in video-player 03/167803/4
authortaeyoon0.lee <taeyoon0.lee@samsung.com>
Mon, 22 Jan 2018 09:31:38 +0000 (18:31 +0900)
committertaeyoon0.lee <taeyoon0.lee@samsung.com>
Tue, 6 Feb 2018 07:59:51 +0000 (16:59 +0900)
Change-Id: I76c7dacc1bc55e6c06552bf136bc3edba4081158

adaptors/common/video-player-impl.cpp
adaptors/common/video-player-impl.h
adaptors/devel-api/adaptor-framework/video-player-plugin.h
adaptors/devel-api/adaptor-framework/video-player.cpp
adaptors/devel-api/adaptor-framework/video-player.h

index 0807e2a..0a95230 100644 (file)
@@ -299,6 +299,24 @@ bool VideoPlayer::IsVideoTextureSupported()
   return false;
 }
 
+void VideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type )
+{
+  if( mPlugin != NULL )
+  {
+    mPlugin->SetCodecType( type );
+  }
+}
+
+Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const
+{
+  if( mPlugin != NULL )
+  {
+    return mPlugin->GetCodecType();
+  }
+
+  return Dali::VideoPlayerPlugin::CodecType::DEFAULT;
+}
+
 } // namespace Adaptor;
 } // namespace Internal;
 } // namespace Dali;
index 498a761..76bdfbb 100644 (file)
@@ -164,6 +164,16 @@ public:
    */
   bool IsVideoTextureSupported();
 
+  /**
+   * @brief Dali::VideoPlayer::SetCodecType()
+   */
+  void SetCodecType( Dali::VideoPlayerPlugin::CodecType type );
+
+  /**
+   * @brief Dali::VideoPlayer::GetCodecType()
+   */
+  Dali::VideoPlayerPlugin::CodecType GetCodecType() const;
+
 private:
 
   /**
index 10a6d5d..524200a 100644 (file)
@@ -53,6 +53,16 @@ public:
   };
 
   /**
+   * @brief Enumeration for video codec type
+   */
+  enum class CodecType
+  {
+    DEFAULT,      ///< Codec which has higher priority as default. Platform selects it. Usually the H/W codec has higher priority than S/W codec if it exist.
+    HW,           ///< H/W codec
+    SW            ///< S/W codec
+  };
+
+  /**
    * @brief Constructor.
    * @SINCE_1_1.38
    */
@@ -217,6 +227,17 @@ public:
    */
   virtual bool IsVideoTextureSupported() = 0;
 
+  /**
+   * @brief Sets codec type
+   * @param[in] type The CodecType
+   */
+  virtual void SetCodecType( VideoPlayerPlugin::CodecType type ) = 0;
+
+  /**
+   * @brief Gets codec type
+   * @return CodecType
+   */
+  virtual VideoPlayerPlugin::CodecType GetCodecType() const = 0;
 };
 
 } // namespace Dali;
index 048a9f0..18a0731 100644 (file)
@@ -176,5 +176,15 @@ bool VideoPlayer::IsVideoTextureSupported()
   return GetImplementation( *this ).IsVideoTextureSupported();
 }
 
+void VideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type )
+{
+  GetImplementation( *this ).SetCodecType( type );
+}
+
+Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const
+{
+  return GetImplementation( *this ).GetCodecType();
+}
+
 } // namespace Dali;
 
index c630c72..83a3dbd 100644 (file)
@@ -247,6 +247,18 @@ public:
    */
   bool IsVideoTextureSupported();
 
+  /**
+   * @brief Sets codec type
+   * @param[in] type The VideoCodec::Type
+   */
+  void SetCodecType( Dali::VideoPlayerPlugin::CodecType type );
+
+  /**
+   * @brief Gets codec type
+   * @return VideoCodec::Type
+   */
+  Dali::VideoPlayerPlugin::CodecType GetCodecType() const;
+
 private: // Not intended for application developers
 
   /**