Lines Matching refs:frame

690 void AppCallbackNotifier::copyAndSendPictureFrame(CameraFrame* frame, int32_t msgType)  in copyAndSendPictureFrame()  argument
703 picture = mRequestMemory(-1, frame->mLength, 1, NULL); in copyAndSendPictureFrame()
708 src = (void *) ((unsigned int) frame->mBuffer + frame->mOffset); in copyAndSendPictureFrame()
709 memcpy(dest, src, frame->mLength); in copyAndSendPictureFrame()
715 mFrameProvider->returnFrame(frame->mBuffer, (CameraFrame::FrameType) frame->mFrameType); in copyAndSendPictureFrame()
726 void AppCallbackNotifier::copyAndSendPreviewFrame(CameraFrame* frame, int32_t msgType) in copyAndSendPreviewFrame() argument
739 if (!mPreviewMemory || !frame->mBuffer) { in copyAndSendPreviewFrame()
750 frame->mBuffer, in copyAndSendPreviewFrame()
751 frame->mWidth, in copyAndSendPreviewFrame()
752 frame->mHeight, in copyAndSendPreviewFrame()
753 frame->mAlignment, in copyAndSendPreviewFrame()
755 frame->mLength, in copyAndSendPreviewFrame()
760 if (CameraFrame::FRAME_DATA_SYNC == frame->mFrameType) { in copyAndSendPreviewFrame()
761 if ( (mPreviewMemory->size / MAX_BUFFERS) >= frame->mLength ) { in copyAndSendPreviewFrame()
762 memcpy(dest, (void*) frame->mBuffer, frame->mLength); in copyAndSendPreviewFrame()
767 if ((NULL == frame->mYuv[0]) || (NULL == frame->mYuv[1])){ in copyAndSendPreviewFrame()
773 frame->mYuv, in copyAndSendPreviewFrame()
774 frame->mWidth, in copyAndSendPreviewFrame()
775 frame->mHeight, in copyAndSendPreviewFrame()
776 frame->mAlignment, in copyAndSendPreviewFrame()
777 frame->mOffset, in copyAndSendPreviewFrame()
779 frame->mLength, in copyAndSendPreviewFrame()
787 mFrameProvider->returnFrame(frame->mBuffer, (CameraFrame::FrameType) frame->mFrameType); in copyAndSendPreviewFrame()
837 CameraFrame *frame; in notifyFrame() local
856 frame = NULL; in notifyFrame()
861 frame = (CameraFrame *) msg.arg1; in notifyFrame()
862 if(!frame) in notifyFrame()
867 if ( (CameraFrame::RAW_FRAME == frame->mFrameType )&& in notifyFrame()
876 copyAndSendPictureFrame(frame, CAMERA_MSG_RAW_IMAGE); in notifyFrame()
885 mFrameProvider->returnFrame(frame->mBuffer, in notifyFrame()
886 (CameraFrame::FrameType) frame->mFrameType); in notifyFrame()
892 else if ( (CameraFrame::IMAGE_FRAME == frame->mFrameType) && in notifyFrame()
895 (CameraFrame::ENCODE_RAW_YUV422I_TO_JPEG & frame->mQuirks) ) in notifyFrame()
903 camera_memory_t* raw_picture = mRequestMemory(-1, frame->mLength, 1, NULL); in notifyFrame()
924 if (CameraFrame::HAS_EXIF_DATA & frame->mQuirks) { in notifyFrame()
925 exif_data = frame->mCookie2; in notifyFrame()
933 int rightCrop = frame->mAlignment/2 - frame->mWidth; in notifyFrame()
936 CAMHAL_LOGDB("Video snapshot offset = %d", frame->mOffset); in notifyFrame()
939 main_jpeg->src = (uint8_t*) frame->mBuffer; in notifyFrame()
940 main_jpeg->src_size = frame->mLength; in notifyFrame()
942 main_jpeg->dst_size = frame->mLength; in notifyFrame()
944 main_jpeg->in_width = frame->mAlignment/2; // use stride here in notifyFrame()
945 main_jpeg->in_height = frame->mHeight; in notifyFrame()
946 main_jpeg->out_width = frame->mAlignment/2; in notifyFrame()
947 main_jpeg->out_height = frame->mHeight; in notifyFrame()
949 main_jpeg->start_offset = frame->mOffset; in notifyFrame()
986 (CameraFrame::FrameType)frame->mFrameType, in notifyFrame()
991 gEncoderQueue.add(frame->mBuffer, encoder); in notifyFrame()
998 else if ( ( CameraFrame::IMAGE_FRAME == frame->mFrameType ) && in notifyFrame()
1024 copyAndSendPictureFrame(frame, CAMERA_MSG_COMPRESSED_IMAGE); in notifyFrame()
1031 else if ( ( CameraFrame::VIDEO_FRAME_SYNC == frame->mFrameType ) && in notifyFrame()
1042 … (camera_memory_t *) mVideoMetadataBufferMemoryMap.valueFor((uint32_t) frame->mBuffer); in notifyFrame()
1045 … (NULL == videoMedatadaBufferMemory) || (NULL == videoMetadataBuffer) || (NULL == frame->mBuffer) ) in notifyFrame()
1053 int vBuf = mVideoMap.valueFor((uint32_t) frame->mBuffer); in notifyFrame()
1064 structConvImage input = {frame->mWidth, in notifyFrame()
1065 frame->mHeight, in notifyFrame()
1068 (mmByte *)frame->mYuv[0], in notifyFrame()
1069 (mmByte *)frame->mYuv[1], in notifyFrame()
1070 frame->mOffset}; in notifyFrame()
1089 videoMetadataBuffer->handle = frame->mBuffer; in notifyFrame()
1090 videoMetadataBuffer->offset = frame->mOffset; in notifyFrame()
1094frame->mBuffer, videoMetadataBuffer, videoMedatadaBufferMemory); in notifyFrame()
1096 mDataCbTimestamp(frame->mTimestamp, CAMERA_MSG_VIDEO_FRAME, in notifyFrame()
1103 … if( (NULL == fakebuf) || ( NULL == fakebuf->data) || ( NULL == frame->mBuffer)) in notifyFrame()
1109 fakebuf->data = frame->mBuffer; in notifyFrame()
1110 … mDataCbTimestamp(frame->mTimestamp, CAMERA_MSG_VIDEO_FRAME, fakebuf, 0, mCallbackCookie); in notifyFrame()
1117 else if(( CameraFrame::SNAPSHOT_FRAME == frame->mFrameType ) && in notifyFrame()
1123 copyAndSendPreviewFrame(frame, CAMERA_MSG_POSTVIEW_FRAME); in notifyFrame()
1125 mFrameProvider->returnFrame(frame->mBuffer, in notifyFrame()
1126 (CameraFrame::FrameType) frame->mFrameType); in notifyFrame()
1129 else if ( ( CameraFrame::PREVIEW_FRAME_SYNC== frame->mFrameType ) && in notifyFrame()
1135 copyAndSendPreviewFrame(frame, CAMERA_MSG_PREVIEW_FRAME); in notifyFrame()
1137 mFrameProvider->returnFrame(frame->mBuffer, in notifyFrame()
1138 (CameraFrame::FrameType) frame->mFrameType); in notifyFrame()
1141 else if ( ( CameraFrame::FRAME_DATA_SYNC == frame->mFrameType ) && in notifyFrame()
1145 copyAndSendPreviewFrame(frame, CAMERA_MSG_PREVIEW_FRAME); in notifyFrame()
1147 mFrameProvider->returnFrame(frame->mBuffer, in notifyFrame()
1148 ( CameraFrame::FrameType ) frame->mFrameType); in notifyFrame()
1149 CAMHAL_LOGDB("Frame type 0x%x is still unsupported!", frame->mFrameType); in notifyFrame()
1162 if ( NULL != frame ) in notifyFrame()
1164 delete frame; in notifyFrame()
1182 CameraFrame *frame; in frameCallback() local
1189 frame = new CameraFrame(*caFrame); in frameCallback()
1190 if ( NULL != frame ) in frameCallback()
1193 msg.arg1 = frame; in frameCallback()
1209 CameraFrame *frame; in flushAndReturnFrames() local
1214 frame = (CameraFrame*) msg.arg1; in flushAndReturnFrames()
1215 if (frame) { in flushAndReturnFrames()
1216 mFrameProvider->returnFrame(frame->mBuffer, in flushAndReturnFrames()
1217 (CameraFrame::FrameType) frame->mFrameType); in flushAndReturnFrames()
1702 void *frame = NULL; in releaseRecordingFrame() local
1725 frame = (void*) mVideoMetadataBufferReverseMap.valueFor((uint32_t) videoMetadataBuffer); in releaseRecordingFrame()
1727 videoMetadataBuffer, videoMetadataBuffer->handle, frame); in releaseRecordingFrame()
1731 frame = (void*)(*((uint32_t *)mem)); in releaseRecordingFrame()
1736 ret = mFrameProvider->returnFrame(frame, CameraFrame::VIDEO_FRAME_SYNC); in releaseRecordingFrame()