"Effect start time + effect duration > media clip duration");
}
+ mMANativeHelper.setGeneratePreview(true);
+
mEffects.add(effect);
invalidateTransitions(effect.getStartTime(), effect.getDuration());
if (effect instanceof EffectKenBurns) {
mRegenerateClip = true;
}
- mMANativeHelper.setGeneratePreview(true);
}
/**
throw new IllegalArgumentException("Overlay bitmap not specified");
}
- ((OverlayFrame)overlay).save(mProjectPath);
-
final int scaledWidth, scaledHeight;
if (this instanceof MediaVideoItem) {
scaledWidth = getWidth();
throw new IllegalArgumentException(
"Bitmap dimensions must match media item dimensions");
}
+
+ mMANativeHelper.setGeneratePreview(true);
+ ((OverlayFrame)overlay).save(mProjectPath);
+
+ mOverlays.add(overlay);
+ invalidateTransitions(overlay.getStartTime(), overlay.getDuration());
+
} else {
throw new IllegalArgumentException("Overlay not supported");
}
-
- mOverlays.add(overlay);
- invalidateTransitions(overlay.getStartTime(), overlay.getDuration());
- mMANativeHelper.setGeneratePreview(true);
}
/**
throw new IllegalArgumentException("No more tracks can be added");
}
+ mMANativeHelper.setGeneratePreview(true);
+
/*
* Add the audio track to AudioTrack list
*/
mMANativeHelper.setAudioflag(false);
}
- mMANativeHelper.setGeneratePreview(true);
}
/*
throw new IllegalArgumentException("Media item already exists: " + mediaItem.getId());
}
+ mMANativeHelper.setGeneratePreview(true);
+
/*
* Invalidate the end transition if necessary
*/
mMediaItems.add(mediaItem);
computeTimelineDuration();
- mMANativeHelper.setGeneratePreview(true);
+
/*
* Generate project thumbnail only from first media Item on storyboard
*/
if (afterMediaItemIndex != (beforeMediaItemIndex - 1) ) {
throw new IllegalArgumentException("MediaItems are not in sequence");
}
- }
+ }
+
+ mMANativeHelper.setGeneratePreview(true);
mTransitions.add(transition);
/*
}
computeTimelineDuration();
- mMANativeHelper.setGeneratePreview(true);
}
/*
}
if (afterAudioTrackId == null) {
- mAudioTracks.add(0, audioTrack);
mMANativeHelper.setGeneratePreview(true);
+ mAudioTracks.add(0, audioTrack);
} else {
final int audioTrackCount = mAudioTracks.size();
for (int i = 0; i < audioTrackCount; i++) {
AudioTrack at = mAudioTracks.get(i);
if (at.getId().equals(afterAudioTrackId)) {
- mAudioTracks.add(i + 1, audioTrack);
mMANativeHelper.setGeneratePreview(true);
+ mAudioTracks.add(i + 1, audioTrack);
return;
}
}
}
if (afterMediaItemId == null) {
+ mMANativeHelper.setGeneratePreview(true);
if (mMediaItems.size() > 0) {
/**
* Invalidate the transition at the beginning of the timeline
mMediaItems.add(0, mediaItem);
computeTimelineDuration();
generateProjectThumbnail();
- mMANativeHelper.setGeneratePreview(true);
} else {
final int mediaItemCount = mMediaItems.size();
for (int i = 0; i < mediaItemCount; i++) {
final MediaItem mi = mMediaItems.get(i);
if (mi.getId().equals(afterMediaItemId)) {
+ mMANativeHelper.setGeneratePreview(true);
/**
* Invalidate the transition at this position
*/
*/
mMediaItems.add(i + 1, mediaItem);
computeTimelineDuration();
- mMANativeHelper.setGeneratePreview(true);
return;
}
}
if (afterMediaItemId == null) {
if (mMediaItems.size() > 0) {
+ mMANativeHelper.setGeneratePreview(true);
+
/**
* Invalidate adjacent transitions at the insertion point
*/
*/
mMediaItems.add(0, moveMediaItem);
computeTimelineDuration();
- mMANativeHelper.setGeneratePreview(true);
generateProjectThumbnail();
} else {
for (int i = 0; i < mediaItemCount; i++) {
final MediaItem mi = mMediaItems.get(i);
if (mi.getId().equals(afterMediaItemId)) {
+ mMANativeHelper.setGeneratePreview(true);
/**
* Invalidate adjacent transitions at the insertion point
*/
*/
mMediaItems.add(i + 1, moveMediaItem);
computeTimelineDuration();
- mMANativeHelper.setGeneratePreview(true);
return;
}
}
public synchronized AudioTrack removeAudioTrack(String audioTrackId) {
final AudioTrack audioTrack = getAudioTrack(audioTrackId);
if (audioTrack != null) {
+ mMANativeHelper.setGeneratePreview(true);
mAudioTracks.remove(audioTrack);
audioTrack.invalidate();
mMANativeHelper.invalidatePcmFile();
mMANativeHelper.setAudioflag(true);
- mMANativeHelper.setGeneratePreview(true);
} else {
throw new IllegalArgumentException(" No more audio tracks");
}
} else if (timeMs > mDurationMs) {
throw new IllegalArgumentException("requested time more than duration");
}
-
long result = 0;
boolean semAcquireDone = false;
mMANativeHelper.unlock();
}
}
-
+Log.i("VE_IMPL","renderPreviewFrame <--");
return result;
}
while (it.hasNext()) {
Transition t = it.next();
if (t.getBeforeMediaItem() == mediaItem) {
- it.remove();
mMANativeHelper.setGeneratePreview(true);
+ it.remove();
t.invalidate();
mediaItem.setBeginTransition(null);
if (index > 0) {
while (it.hasNext()) {
Transition t = it.next();
if (t.getAfterMediaItem() == mediaItem) {
- it.remove();
mMANativeHelper.setGeneratePreview(true);
+ it.remove();
t.invalidate();
mediaItem.setEndTransition(null);
/**