Prime cache for tone mappers in mediaserver
Instantiate media side renderengine when mediaserver
starts, and prime shader cache for the tone mapper
shaders only.
bug: 140894732
bug: 135717526
test: manually check that shader should be compiled
already when test run for first time
Change-Id: Ib02569bec948838ace0f3162206dbbcadad5b641
diff --git a/media/libmediaplayerservice/Android.bp b/media/libmediaplayerservice/Android.bp
index 5301f5c..762ed19 100644
--- a/media/libmediaplayerservice/Android.bp
+++ b/media/libmediaplayerservice/Android.bp
@@ -39,6 +39,7 @@
"libpowermanager",
"libstagefright",
"libstagefright_foundation",
+ "libstagefright_framecapture_utils",
"libstagefright_httplive",
"libutils",
],
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 81ffcbc..f2a38dd 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -58,6 +58,7 @@
#include <media/Metadata.h>
#include <media/AudioTrack.h>
#include <media/MemoryLeakTrackUtil.h>
+#include <media/stagefright/FrameCaptureProcessor.h>
#include <media/stagefright/InterfaceUtils.h>
#include <media/stagefright/MediaCodecConstants.h>
#include <media/stagefright/MediaCodecList.h>
@@ -447,6 +448,8 @@
mNextConnId = 1;
MediaPlayerFactory::registerBuiltinFactories();
+ // initialize the frame capture utilities
+ (void)FrameCaptureProcessor::getInstance();
}
MediaPlayerService::~MediaPlayerService()