// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/video-view/video-view.h>
-#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/internal/visuals/visual-string-constants.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
namespace Dali
{
}
}
+ Property::Value* target = map.Find( RENDERING_TARGET );
+ std::string targetType;
+
+ if( target && target->Get( targetType ) && targetType == WINDOW_SURFACE_TARGET )
+ {
+ this->SetWindowSurfaceTarget();
+ }
+ else if( target && target->Get( targetType ) && targetType == NATIVE_IMAGE_TARGET )
+ {
+ this->SetNativeImageTarget();
+ }
+
RelayoutRequest();
}
case Toolkit::VideoView::Property::VIDEO:
{
std::string videoUrl;
+ Property::Map map;
+
if( value.Get( videoUrl ) )
{
impl.SetUrl( videoUrl );
}
-
- Property::Map map;
- if( value.Get( map ) )
+ else if( value.Get( map ) )
{
- impl.SetPropertyMap( map );
+ Property::Value* shaderValue = map.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER );
- Property::Value* target = map.Find( RENDERING_TARGET );
- std::string targetType;
- if( target && target->Get( targetType ) && targetType == WINDOW_SURFACE_TARGET )
+ if( map.Count() > 1u || !shaderValue )
{
- impl.SetWindowSurfaceTarget();
+ impl.SetPropertyMap( map );
}
- else if( target && target->Get( targetType ) && targetType == NATIVE_IMAGE_TARGET )
+ else if( impl.mVisual && map.Count() == 1u && shaderValue )
{
- impl.SetNativeImageTarget();
+ Property::Map shaderMap;
+ if( shaderValue->Get( shaderMap ) )
+ {
+ Internal::Visual::Base& visual = Toolkit::GetImplementation( impl.mVisual );
+ visual.SetCustomShader( shaderMap );
+ if( videoView.OnStage() )
+ {
+ visual.SetOffStage( videoView );
+ visual.SetOnStage( videoView );
+ }
+ }
}
}
break;