Announcement

Collapse
No announcement yet.

Best workflow for StreamMediaSources?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [GEAR VR] Best workflow for StreamMediaSources?

    Hi everyone,
    I have a small game where I have some videos playing as textures. When I use the FileMediaSources my launched Project is 1,5GB big on my Android phone. I have also checked the compressed cooked packages.
    When I switch the videos I have a delay of about a second.
    Now I use the StreamMediaFiles instead of the FMS and my project is just 128 MB big. But when I switch the videos it takes about 5 seconds to load the new video.

    So my question to you out there: Is there a way to decrease the time it takes the engine to load the videos with the SMS? It does not offer the ability to precache the files so the only idea I have is to open all of the sources at the game start and then switch between them.

    Has anybody some solution?

    Cheers,
    Evil_Fischi

    #2
    The delay may be caused by the media player attempting to get track information on opening the video. In MediaPlayer14.java you can change setDataSourceURL() by removing this code and see it if improves:

    Code:
    if (android.os.Build.VERSION.SDK_INT >= 16)
    {
    	MediaExtractor extractor = new MediaExtractor();
    	if (extractor != null)
    	{
    		extractor.setDataSource(UrlPath);
    		updateTrackInfo(extractor);
    		extractor.release();
    		extractor = null;
    	}
    }

    Comment


      #3
      Oh thanks!
      But I where can i find the mediaPlayer14? I am using a BluePrint project and no C++. Or is it in the engine files?

      Comment


        #4
        Originally posted by Evil_Fischi View Post
        Oh thanks!
        But I where can i find the mediaPlayer14? I am using a BluePrint project and no C++. Or is it in the engine files?
        Ok I found it in the engine binaries
        I will test it and come back here again

        Comment


          #5
          It felt like I had no improvement on the time it took to switch between the videos.
          I have set back my project to the normal FileMediaSources and now I try to profile my app.
          The heaviest call is the "CompressDataAndSendToGame". Is this the MediaSource sending the video to my texture?

          Comment


            #6
            That call is the profiler compressing the capture data; you can ignore it.

            Comment

            Working...
            X