Add api for get the internal media player handle of the VideoView
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-factory-impl.cpp
index d30729b..dcc997b 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,6 +60,10 @@ namespace Internal
 namespace
 {
 
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_CONTROL_VISUALS");
+#endif
+
 BaseHandle Create()
 {
   BaseHandle handle = Toolkit::VisualFactory::Get();
@@ -273,9 +277,23 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
     }
   }
 
+  DALI_LOG_INFO( gLogFilter, Debug::Concise, "VisualFactory::CreateVisual( VisualType:%s %s%s)\n",
+                 Scripting::GetEnumerationName<Toolkit::DevelVisual::Type>( visualType,
+                                                                            VISUAL_TYPE_TABLE,
+                                                                            VISUAL_TYPE_TABLE_COUNT ),
+                 ( visualType == Toolkit::DevelVisual::IMAGE ) ? "url:" : "",
+                 ( visualType == Toolkit::DevelVisual::IMAGE ) ?
+                             ( ([&] (){
+                                        // Return URL if present in PropertyMap else return "not found message"
+                                        Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
+                                        return ( imageURLValue ) ? imageURLValue->Get<std::string>().c_str() : "url not found in PropertyMap";
+                                      })()
+                             )
+                             : "" );
+
   if( !visualPtr )
   {
-    DALI_LOG_ERROR( "Renderer type unknown\n" );
+    DALI_LOG_ERROR( "VisualType unknown\n" );
   }
 
   if( mDebugEnabled && visualType !=  Toolkit::DevelVisual::WIREFRAME )