From: taeyoon Date: Thu, 22 Sep 2016 06:06:48 +0000 (+0900) Subject: [3.0] Remove custom shader from video view example and change video file sample X-Git-Tag: accepted/tizen/3.0/ivi/20161011.043854 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2F3.0%2Fivi%2F20161011.043854;p=platform%2Fcore%2Fuifw%2Fdali-demo.git [3.0] Remove custom shader from video view example and change video file sample Change-Id: Ib42cc40bfebb4f16785269e20e7106c829532671 --- diff --git a/examples/video-view/video-view-example.cpp b/examples/video-view/video-view-example.cpp index ddbc1a8..c20b8f8 100644 --- a/examples/video-view/video-view-example.cpp +++ b/examples/video-view/video-view-example.cpp @@ -28,7 +28,7 @@ namespace const int INIT_HEIGHT( 400 ); const int BUTTON_SIZE( 80 ); - const char* const PLAY_FILE = DEMO_VIDEO_DIR "big_buck_bunny.mp4"; + const char* const PLAY_FILE = DEMO_VIDEO_DIR "demoVideo.mp4"; const char* const PLAY_IMAGE = DEMO_IMAGE_DIR "icon-play.png"; const char* const PAUSE_IMAGE = DEMO_IMAGE_DIR "Pause.png"; const char* const STOP_IMAGE = DEMO_IMAGE_DIR "icon-stop.png"; @@ -36,32 +36,6 @@ namespace const char* const FORWARD_IMAGE = DEMO_IMAGE_DIR "Forward.png"; const char* const BACKWARD_IMAGE = DEMO_IMAGE_DIR "Backward.png"; -const char* DEFAULT_FRAGMENT_SHADER = DALI_COMPOSE_SHADER( - varying mediump vec2 vTexCoord;\n - uniform sampler2D sTexture;\n - uniform lowp vec4 uColor;\n - \n - void main()\n - {\n - gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n - }\n -); - -const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER( - precision mediump float; - varying mediump vec2 vTexCoord;\n - uniform sampler2D sTexture;\n - uniform lowp vec4 uColor;\n - \n - void main()\n - {\n - vec2 st = vTexCoord.st;\n - vec3 irgb = texture2D( sTexture, st ).rgb;\n - vec3 negative = vec3( 1., 1., 1. ) - irgb;\n - gl_FragColor = vec4( mix( irgb, negative, 1.0), 1. ) * uColor;\n - }\n -); - } // namespace class VideoViewController: public ConnectionTracker @@ -73,7 +47,6 @@ class VideoViewController: public ConnectionTracker mIsPlay( false ), mIsStop( false ), mIsFullScreen( false ), - mSetCustomShader( false ), mScale( 1.f ) { // Connect to the Application's Init signal @@ -209,16 +182,6 @@ class VideoViewController: public ConnectionTracker Stage::GetCurrent().KeyEventSignal().Connect( this, &VideoViewController::OnKeyEvent ); - Property::Map customShader; - customShader.Insert( Visual::Shader::Property::FRAGMENT_SHADER, FRAGMENT_SHADER ); - mCustomShader.Insert( Visual::Property::TYPE, Visual::IMAGE ); - mCustomShader.Insert( Visual::Property::SHADER, customShader ); - - Property::Map defaultShader; - customShader.Insert( Visual::Shader::Property::FRAGMENT_SHADER, DEFAULT_FRAGMENT_SHADER ); - mDefaultShader.Insert( Visual::Property::TYPE, Visual::IMAGE ); - mDefaultShader.Insert( Visual::Property::SHADER, customShader ); - mWindowSurfaceTarget.Insert( "RENDERING_TARGET", "windowSurfaceTarget" ); mNativeImageTarget.Insert( "RENDERING_TARGET", "nativeImageTarget" ); @@ -350,17 +313,6 @@ class VideoViewController: public ConnectionTracker if( !mIsFullScreen ) { mRotationAnimation.Play(); - - if( mSetCustomShader ) - { - mSetCustomShader = false; - mVideoView.SetProperty( VideoView::Property::VIDEO, mDefaultShader ); - } - else - { - mSetCustomShader = true; - mVideoView.SetProperty( VideoView::Property::VIDEO, mCustomShader ); - } } } @@ -389,7 +341,6 @@ private: bool mIsPlay; bool mIsStop; bool mIsFullScreen; - bool mSetCustomShader; PushButton mPlayButton; PushButton mPauseButton; @@ -405,8 +356,6 @@ private: float mPinchStartScale; Animation mRotationAnimation; - Property::Map mCustomShader; - Property::Map mDefaultShader; Property::Map mWindowSurfaceTarget; Property::Map mNativeImageTarget; }; diff --git a/resources/videos/big_buck_bunny.mp4 b/resources/videos/big_buck_bunny.mp4 deleted file mode 100644 index a7c4228..0000000 Binary files a/resources/videos/big_buck_bunny.mp4 and /dev/null differ diff --git a/resources/videos/demoVideo.mp4 b/resources/videos/demoVideo.mp4 new file mode 100755 index 0000000..cd7dcd0 Binary files /dev/null and b/resources/videos/demoVideo.mp4 differ