Lines Matching defs:effect

276      * Add the specified effect to this media item.
283 * effect overlaps with the beginning and/or the end transition.
285 * @param effect The effect to apply
287 * @throws IllegalArgumentException if the effect start and/or duration are
288 * invalid or if the effect cannot be applied to this type of media
289 * item or if the effect id is not unique across all the Effects
292 public void addEffect(Effect effect) {
294 if (effect == null) {
295 throw new IllegalArgumentException("NULL effect cannot be applied");
298 if (effect.getMediaItem() != this) {
302 if (mEffects.contains(effect)) {
303 throw new IllegalArgumentException("Effect already exists: " + effect.getId());
306 if (effect.getStartTime() + effect.getDuration() > getDuration()) {
308 "Effect start time + effect duration > media clip duration");
313 mEffects.add(effect);
315 invalidateTransitions(effect.getStartTime(), effect.getDuration());
317 if (effect instanceof EffectKenBurns) {
323 * Remove the effect with the specified id.
325 * This method invalidates a transition video clip if the effect overlaps
328 * @param effectId The id of the effect to be removed
330 * @return The effect that was removed
334 for (Effect effect : mEffects) {
335 if (effect.getId().equals(effectId)) {
338 mEffects.remove(effect);
340 invalidateTransitions(effect.getStartTime(), effect.getDuration());
341 if (effect instanceof EffectKenBurns) {
354 return effect;
361 * Set the filepath of the generated image clip when the effect is added.
370 * Get the filepath of the generated image clip when the effect is added.
380 * Find the effect with the specified id
382 * @param effectId The effect id
383 * @return The effect with the specified id (null if it does not exist)
386 for (Effect effect : mEffects) {
387 if (effect.getId().equals(effectId)) {
388 return effect;
625 * @param startTimeMs The start time of the effect or overlay
626 * @param durationMs The duration of the effect or overlay
633 * effect is changing.
635 * @param oldStartTimeMs The old start time of the effect or overlay
636 * @param oldDurationMs The old duration of the effect or overlay
637 * @param newStartTimeMs The new start time of the effect or overlay
638 * @param newDurationMs The new duration of the effect or overlay