01-13-2015 07:51 AM
mediaPlayer.Call( "setDataSource", "/sdcard/oculus/Movies/Trailers/Night_of_the_living_Dead.mp4" );to an existing movie it doesn't play the movie.
05-21-2015 11:18 AM
05-22-2015 02:53 AM
05-22-2015 05:55 AM
E/MediaPlayer(23595): setDataSource replace URI : /storage/extSdCard/
string path = "/storage/sdcard0/Oculus/360Videos/test_video.mp4";
bool fileTest = new AndroidJavaObject ("java/io/File", path).Call<bool>("exists");
Debug.Log ((fileTest ? "found " : "could not find ") + path);
public static AndroidJavaObject fileDescriptorFromPath(string path){
Debug.Log ("opening file descriptor");
AndroidJavaObject fd = new AndroidJavaObject ("java/io/FileInputStream", (new AndroidJavaObject ("java/io/File", path))
).Call<AndroidJavaObject>("getFD");
Debug.Log ("fd toString output: " + fd.Call<String> ("toString"));
Debug.Log ("fd is: " + (fd.Call<bool> ("valid") ? "valid" : "invalid"));
if (fd != null) {
Debug.Log ("successfully created a file descriptor");
return fd;
} else {
Debug.Log ("something went wrong, fileDescriptor is null");
return null;
}
}
AndroidJavaObject StartVideoPlayerOnTextureId(int textureId)
{
Debug.Log("SetUpVideoPlayer ");
IntPtr androidSurface = OVR_Media_Surface(textureId);
AndroidJavaObject mediaPlayer = new AndroidJavaObject("android/media/MediaPlayer");
// Can't use AndroidJavaObject.Call() with a jobject, must use low level interface
//mediaPlayer.Call("setSurface", androidSurface);
IntPtr setSurfaceMethodId = AndroidJNI.GetMethodID(mediaPlayer.GetRawClass(),"setSurface","(Landroid/view/Surface;)V");
jvalue[] parms = new jvalue[1];
parms[0] = new jvalue();
parms[0].l = androidSurface;
AndroidJNI.CallObjectMethod(mediaPlayer.GetRawObject(), setSurfaceMethodId, parms);
//############# set movie path here ####################
Debug.Log("movie player trying to open file...");
mediaPlayer.Call("setDataSource", fileDescriptorFromPath("/storage/sdcard0/Oculus/360Videos/test_video.mp4"));
mediaPlayer.Call("prepare");
mediaPlayer.Call("setLooping", true);
Debug.Log("starting player");
mediaPlayer.Call("start");
Debug.Log("called start, movie should run");
return mediaPlayer;
}
--------- beginning of system
D/Unity (10109): GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader
D/Unity (10109): _pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic
I/Unity (10109): Unity Version: 5.0.2f1
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): Inhibiting Entitlement Check!
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): Creating volume controller...
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): Awake
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): external dir path: /storage/emulated/0
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): found /storage/sdcard0/Oculus/360Videos/video_test.mp4
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): Movie Texture id: 22
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): OnApplicationFocus() True
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): SetUpVideoPlayer
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/MediaPlayer(10109): Need to enable context aware info
I/Unity (10109): movie player trying to open file...
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): opening file descriptor
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): fd toString output: FileDescriptor[61]
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): fd is: valid
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): successfully created a file descriptor
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
E/MediaPlayer(10109): Should have subtitle controller already set
E/MediaPlayer(10109): Should have subtitle controller already set
I/Unity (10109): starting player
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
W/MediaPlayer(10109): this is IMEDIA_PLAYER_VIDEO_EXIST
I/MediaPlayer(10109): sendBroadcast android.media.IMediaPlayer.videoexist
I/Unity (10109): called start, movie should run
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/MediaPlayer(10109): send context aware event
I/MediaPlayer(10109): sendBroadcast CONTEXT_AWARE_MUSIC_INFO - type(start) - id (40)
W/MediaPlayer(10109): this is IMEDIA_PLAYER_VIDEO_EXIST
I/MediaPlayer(10109): sendBroadcast android.media.IMediaPlayer.videoexist
W/MediaPlayer(10109): info/warning (3, 0)
I/Unity (10109): OnApplicationPause() True
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/Unity (10109): OnApplicationPause: True
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
I/MediaPlayer(10109): sendBroadcast CONTEXT_AWARE_MUSIC_INFO - type(pause) - id(40)
I/Unity (10109): OnApplicationFocus() False
I/Unity (10109):
I/Unity (10109): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebug.gen.cpp Line: 56)
I/Unity (10109):
W/MediaPlayer( 3877): info/warning (973, 0)
E/MediaPlayer( 3877): Should have subtitle controller already set
I/MediaPlayer( 3877): sendBroadcast CONTEXT_AWARE_MUSIC_INFO - type(release) - id(39)
E/MediaPlayer( 3877): Should have subtitle controller already set
I/MediaPlayer( 3877): send context aware event
I/MediaPlayer( 3877): sendBroadcast CONTEXT_AWARE_MUSIC_INFO - type(start) - id (41)
I/MediaPlayer( 3877): sendBroadcast CONTEXT_AWARE_MUSIC_INFO - type(complete) - id(41)
05-23-2015 03:25 PM
05-26-2015 04:13 AM
05-27-2015 01:57 AM
05-28-2015 01:47 AM
06-03-2015 04:46 AM
06-03-2015 11:02 PM
"TNTantoine" wrote:
Hey everyone !
I downloaded the latest sdk (0.6.0), and I have troubles getting decent 360 video quality (even at 4k) with the MoviePlayerSample.cs script in Unity.
As suggested in the .cs file and in your previous posts, I searched for the MediaSurface.cpp file in the sdk, but couldn't find it in the 0.6.0 revision.
Has the file name and/or path changed ?
06-03-2015 11:48 PM