Exemplo n.º 1
0
    @Override
    public synchronized void saveRequest() {
      if (mData == null) {
        Log.w(TAG, "[saveRequest]mData is null,return!");
        return;
      }
      int orientation = Exif.getOrientation(mData);
      // M: ConShots
      mGroupId = Exif.getGroupId(mData);
      mGroupIndex = Exif.getGroupIndex(mData);
      mFocusValueHigh = Exif.getFocusValueHigh(mData);
      mFocusValueLow = Exif.getFocusValueLow(mData);
      mOrientation = orientation;
      mDataSize = mData.length;

      if (null != mFileName) {
        mTitle = mFileName.substring(0, mFileName.indexOf('.'));
      } else {
        mTitle = createName(mFileType, mDateTaken, mGroupIndex);
        mFileName = Storage.generateFileName(mTitle, mTempPictureType);
        Log.i(TAG, "[saveRequest]PhotoOperator,mFileName = " + mFileName);
      }
      mFilePath = Storage.generateFilepath(mFileName);
      mTempFilePath = mFilePath + TEMP_SUFFIX;
      saveImageToSDCard(mTempFilePath, mFilePath, mData);
      // camera decouple
      mMimeType = Storage.generateMimetype(mTitle, mTempPictureType);
      checkDataProperty();
      saveImageToDatabase(this);
    }
Exemplo n.º 2
0
 @Override
 public void prepareRequest() {
   mFileType = Storage.FILE_TYPE_VIDEO;
   mDateTaken = System.currentTimeMillis();
   mTitle = createName(mFileType, mDateTaken, 0);
   mFileName = mTitle + convertOutputFormatToFileExt(mTempOutputFileFormat);
   mMimeType = convertOutputFormatToMimeType(mTempOutputFileFormat);
   mFilePath = Storage.generateFilepath(mFileName);
 }
Exemplo n.º 3
0
 @Override
 public void prepareRequest() {
   Log.i(TAG, "[prepareRequest]PanoOperator,mFileName = " + mFileName);
   mFileType = Storage.FILE_TYPE_PANO;
   mDateTaken = System.currentTimeMillis();
   Location loc = mContext.getLocationManager().getCurrentLocation();
   if (loc != null) {
     mLocation = new Location(loc);
   }
   mTitle = createName(mFileType, mDateTaken, 0);
   mFileName = Storage.generateFileName(mTitle, mTempPictureType);
   mFilePath = Storage.generateFilepath(mFileName);
   mTempFilePath = mFilePath + TEMP_SUFFIX;
 }