public ArrayList<ElementInfo> gettimeandorderForEncode( ArrayList<ElementInfo> elementInfo, ArrayList<MediaInfo> mMediaInfo, Script mScript) { ArrayList<ElementInfo> mFileOrder = new ArrayList<ElementInfo>(); int ElementCount = elementInfo.size(); // now we need start to put order // the textureId ==> 1:movie, 2-11:bitmap, 12-21:videoBitmap for (int i = 0; i < ElementCount; i++) { ElementInfo eInfo = new ElementInfo(); ElementInfo oldEInfo = elementInfo.get(i); int infoId = elementInfo.get(i).InfoId; for (int j = 0; j < mMediaInfo.size(); j++) { if (mMediaInfo.get(j).CountId == infoId) { MediaInfo tmp = mMediaInfo.get(j); if (tmp.getType() == MediaInfo.MEDIA_TYPE_IMAGE) { if (oldEInfo.Type == MediaInfo.MEDIA_TYPE_IMAGE) { eInfo.height = tmp.getImage().getHeight(); eInfo.width = tmp.getImage().getWidth(); if (tmp.mGeoInfo != null) eInfo.mLocation = tmp.mGeoInfo.getLocation(); } eInfo.Type = MediaInfo.MEDIA_TYPE_IMAGE; eInfo.mFaceCount = tmp.mFaceCount; eInfo.mFBorder = tmp.mFBorder; eInfo.InfoId = tmp.CountId; eInfo.mDate = tmp.getDate(); eInfo.mFaceRect = tmp.mFaceRect; } else if (tmp.getType() == MediaInfo.MEDIA_TYPE_VIDEO) { eInfo.Type = MediaInfo.MEDIA_TYPE_VIDEO; eInfo.TextureId = tmp.TextureId; eInfo.Videopart = oldEInfo.Videopart; eInfo.InfoId = tmp.CountId; eInfo.mDate = tmp.getDate(); } break; } } if (eInfo.Type == -1) eInfo.Type = oldEInfo.Type; mFileOrder.add(eInfo); } return mFileOrder; }