diff options
author | Pannag Sanketi <psanketi@google.com> | 2011-07-01 17:39:39 -0700 |
---|---|---|
committer | Pannag Sanketi <psanketi@google.com> | 2011-07-22 14:17:25 -0700 |
commit | b33f3407bab0970a7f9241680723a1140b177c50 (patch) | |
tree | 8c49b51867769176b088f5ee2dbecd69c188464f /media/libmediaplayerservice/MediaRecorderClient.cpp | |
parent | fe388eedca9f46ed3fee9579258acecd93e88641 (diff) | |
download | frameworks_av-b33f3407bab0970a7f9241680723a1140b177c50.zip frameworks_av-b33f3407bab0970a7f9241680723a1140b177c50.tar.gz frameworks_av-b33f3407bab0970a7f9241680723a1140b177c50.tar.bz2 |
Connect MediaRecorder Native to SurfaceMediaSource
Making a connection from MediaRecorder Native layer to the
SurfaceMediaSource for the purpose of encoding GL Frames. This will be
called from the java side inside the Mobile Filter Framework.
The mediarecorder native layer (client), when set the videosource to
option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver
side to create a SurfaceMediaSource object and pass it back as a
sp<ISurfaceTexture> object. Using that, the client side will dequeue and
queue buffers. Connecting the GL Frames to the obtained
sp<ISurfaceTexture> is not part of this CL.
Related to bug id: 4529323
Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
Diffstat (limited to 'media/libmediaplayerservice/MediaRecorderClient.cpp')
-rw-r--r-- | media/libmediaplayerservice/MediaRecorderClient.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index 115db1a..905b885 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -41,6 +41,7 @@ #include "MediaPlayerService.h" #include "StagefrightRecorder.h" +#include <gui/ISurfaceTexture.h> namespace android { @@ -57,6 +58,20 @@ static bool checkPermission(const char* permissionString) { return ok; } + +sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource() +{ + LOGV("Query SurfaceMediaSource"); + Mutex::Autolock lock(mLock); + if (mRecorder == NULL) { + LOGE("recorder is not initialized"); + return NULL; + } + return mRecorder->querySurfaceMediaSource(); +} + + + status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy) { |