diff options
author | Mathias Agopian <mathias@google.com> | 2013-03-13 21:42:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-03-13 21:42:14 +0000 |
commit | a32fd0e2c7489fa28055595d7c67d857d32566a5 (patch) | |
tree | 00863cd60d10d9725070356413f882f8c95374ab /media | |
parent | 9dd73dd2634d41766e6cfd67edd96a018a8ad7d7 (diff) | |
parent | 99617adda9bc46c43f511f0940bc735c73de61de (diff) | |
download | frameworks_av-a32fd0e2c7489fa28055595d7c67d857d32566a5.zip frameworks_av-a32fd0e2c7489fa28055595d7c67d857d32566a5.tar.gz frameworks_av-a32fd0e2c7489fa28055595d7c67d857d32566a5.tar.bz2 |
Merge "remove uses of Surface in favor or IGraphicBufferProducer" into jb-mr2-dev
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/IMediaRecorder.cpp | 6 | ||||
-rw-r--r-- | media/libmedia/mediarecorder.cpp | 2 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaRecorderClient.cpp | 2 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaRecorderClient.h | 2 | ||||
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 2 | ||||
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.h | 4 | ||||
-rw-r--r-- | media/libstagefright/CameraSource.cpp | 6 | ||||
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 4 |
8 files changed, 14 insertions, 14 deletions
diff --git a/media/libmedia/IMediaRecorder.cpp b/media/libmedia/IMediaRecorder.cpp index c935d97..8e58162 100644 --- a/media/libmedia/IMediaRecorder.cpp +++ b/media/libmedia/IMediaRecorder.cpp @@ -87,12 +87,12 @@ public: return interface_cast<IGraphicBufferProducer>(reply.readStrongBinder()); } - status_t setPreviewSurface(const sp<Surface>& surface) + status_t setPreviewSurface(const sp<IGraphicBufferProducer>& surface) { ALOGV("setPreviewSurface(%p)", surface.get()); Parcel data, reply; data.writeInterfaceToken(IMediaRecorder::getInterfaceDescriptor()); - Surface::writeToParcel(surface, &data); + data.writeStrongBinder(surface->asBinder()); remote()->transact(SET_PREVIEW_SURFACE, data, &reply); return reply.readInt32(); } @@ -443,7 +443,7 @@ status_t BnMediaRecorder::onTransact( case SET_PREVIEW_SURFACE: { ALOGV("SET_PREVIEW_SURFACE"); CHECK_INTERFACE(IMediaRecorder, data, reply); - sp<Surface> surface = Surface::readFromParcel(data); + sp<IGraphicBufferProducer> surface = interface_cast<IGraphicBufferProducer>(data.readStrongBinder()); reply->writeInt32(setPreviewSurface(surface)); return NO_ERROR; } break; diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index 3ac98cc..3710e46 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -49,7 +49,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec return ret; } -status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface) +status_t MediaRecorder::setPreviewSurface(const sp<IGraphicBufferProducer>& surface) { ALOGV("setPreviewSurface(%p)", surface.get()); if (mMediaRecorder == NULL) { diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index a52b238..a9820e0 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -81,7 +81,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera, return mRecorder->setCamera(camera, proxy); } -status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface) +status_t MediaRecorderClient::setPreviewSurface(const sp<IGraphicBufferProducer>& surface) { ALOGV("setPreviewSurface"); Mutex::Autolock lock(mLock); diff --git a/media/libmediaplayerservice/MediaRecorderClient.h b/media/libmediaplayerservice/MediaRecorderClient.h index bd0eaf1..a65ec9f 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.h +++ b/media/libmediaplayerservice/MediaRecorderClient.h @@ -32,7 +32,7 @@ class MediaRecorderClient : public BnMediaRecorder public: virtual status_t setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy); - virtual status_t setPreviewSurface(const sp<Surface>& surface); + virtual status_t setPreviewSurface(const sp<IGraphicBufferProducer>& surface); virtual status_t setVideoSource(int vs); virtual status_t setAudioSource(int as); virtual status_t setOutputFormat(int of); diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index f570856..c2c9985 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -224,7 +224,7 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera, return OK; } -status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) { +status_t StagefrightRecorder::setPreviewSurface(const sp<IGraphicBufferProducer> &surface) { ALOGV("setPreviewSurface: %p", surface.get()); mPreviewSurface = surface; diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h index fbe6fa6..c864207 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.h +++ b/media/libmediaplayerservice/StagefrightRecorder.h @@ -51,7 +51,7 @@ struct StagefrightRecorder : public MediaRecorderBase { virtual status_t setVideoSize(int width, int height); virtual status_t setVideoFrameRate(int frames_per_second); virtual status_t setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy); - virtual status_t setPreviewSurface(const sp<Surface>& surface); + virtual status_t setPreviewSurface(const sp<IGraphicBufferProducer>& surface); virtual status_t setOutputFile(const char *path); virtual status_t setOutputFile(int fd, int64_t offset, int64_t length); virtual status_t setParameters(const String8& params); @@ -71,7 +71,7 @@ struct StagefrightRecorder : public MediaRecorderBase { private: sp<ICamera> mCamera; sp<ICameraRecordingProxy> mCameraProxy; - sp<Surface> mPreviewSurface; + sp<IGraphicBufferProducer> mPreviewSurface; sp<IMediaRecorderClient> mListener; String16 mClientName; uid_t mClientUid; diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index f8557d0..5a26b06 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -140,7 +140,7 @@ CameraSource *CameraSource::CreateFromCamera( uid_t clientUid, Size videoSize, int32_t frameRate, - const sp<Surface>& surface, + const sp<IGraphicBufferProducer>& surface, bool storeMetaDataInVideoBuffers) { CameraSource *source = new CameraSource(camera, proxy, cameraId, @@ -157,7 +157,7 @@ CameraSource::CameraSource( uid_t clientUid, Size videoSize, int32_t frameRate, - const sp<Surface>& surface, + const sp<IGraphicBufferProducer>& surface, bool storeMetaDataInVideoBuffers) : mCameraFlags(0), mNumInputBuffers(0), @@ -536,7 +536,7 @@ status_t CameraSource::initWithCameraAccess( if (mSurface != NULL) { // This CHECK is good, since we just passed the lock/unlock // check earlier by calling mCamera->setParameters(). - CHECK_EQ((status_t)OK, mCamera->setPreviewDisplay(mSurface)); + CHECK_EQ((status_t)OK, mCamera->setPreviewTexture(mSurface)); } // By default, do not store metadata in video buffers diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 2ed2223..20214e8 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -40,7 +40,7 @@ CameraSourceTimeLapse *CameraSourceTimeLapse::CreateFromCamera( uid_t clientUid, Size videoSize, int32_t videoFrameRate, - const sp<Surface>& surface, + const sp<IGraphicBufferProducer>& surface, int64_t timeBetweenFrameCaptureUs) { CameraSourceTimeLapse *source = new @@ -66,7 +66,7 @@ CameraSourceTimeLapse::CameraSourceTimeLapse( uid_t clientUid, Size videoSize, int32_t videoFrameRate, - const sp<Surface>& surface, + const sp<IGraphicBufferProducer>& surface, int64_t timeBetweenFrameCaptureUs) : CameraSource(camera, proxy, cameraId, clientName, clientUid, videoSize, videoFrameRate, surface, true), |