[3.0] Remove custom shader from video view example and change video file sample 95/89095/1 accepted/tizen/3.0/common/20161114.110133 accepted/tizen/3.0/ivi/20161011.043854 accepted/tizen/3.0/mobile/20161015.032710 accepted/tizen/3.0/tv/20161016.003823 accepted/tizen/3.0/wearable/20161015.081757 accepted/tizen/common/20160922.142736 accepted/tizen/common/20161014.103311 accepted/tizen/ivi/20160923.090339 accepted/tizen/ivi/20161017.013549 accepted/tizen/mobile/20160923.090111 accepted/tizen/mobile/20161017.013355 accepted/tizen/tv/20160923.090206 accepted/tizen/tv/20161017.013436 accepted/tizen/wearable/20160923.090257 accepted/tizen/wearable/20161017.013513 submit/tizen/20160922.140223 submit/tizen/20161014.094936 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
authortaeyoon <taeyoon0.lee@samsung.com>
Thu, 22 Sep 2016 06:06:48 +0000 (15:06 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Thu, 22 Sep 2016 06:08:13 +0000 (15:08 +0900)
Change-Id: Ib42cc40bfebb4f16785269e20e7106c829532671

examples/video-view/video-view-example.cpp
resources/videos/big_buck_bunny.mp4 [deleted file]
resources/videos/demoVideo.mp4 [new file with mode: 0755]

index ddbc1a8..c20b8f8 100644 (file)
@@ -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 (file)
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 (executable)
index 0000000..cd7dcd0
Binary files /dev/null and b/resources/videos/demoVideo.mp4 differ