public abstract class Transition extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BEHAVIOR_LINEAR
The transition speed is constant
|
static int |
BEHAVIOR_MIDDLE_FAST
The transition starts slowly and ends slowly with a fast middle
|
static int |
BEHAVIOR_MIDDLE_SLOW
The transition starts fast and ends fast with a slow middle
|
static int |
BEHAVIOR_SPEED_DOWN
The transition start fast and speed down
|
static int |
BEHAVIOR_SPEED_UP
The transition starts slowly and speed up
|
protected int |
mBehavior
The transition behavior
|
protected long |
mDurationMs
The transition duration
|
protected String |
mFilename
The transition filename
|
protected android.media.videoeditor.MediaArtistNativeHelper |
mNativeHelper |
Modifier | Constructor and Description |
---|---|
protected |
Transition(String transitionId,
MediaItem afterMediaItem,
MediaItem beforeMediaItem,
long durationMs,
int behavior)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Compares this instance with the specified object and indicates if they
are equal.
|
MediaItem |
getAfterMediaItem()
Get the media item at the end of which the transition is applied.
|
MediaItem |
getBeforeMediaItem()
Get the media item at the beginning of which the transition is applied.
|
int |
getBehavior()
Get the behavior of the transition.
|
long |
getDuration()
Get the duration of the transition.
|
String |
getId()
Get the ID of the transition.
|
long |
getMaximumDuration()
The duration of a transition cannot be greater than half of the minimum
duration of the bounding media items.
|
int |
hashCode()
Returns an integer hash code for this object.
|
void |
setDuration(long durationMs)
Set the duration of the transition.
|
public static final int BEHAVIOR_SPEED_UP
public static final int BEHAVIOR_SPEED_DOWN
public static final int BEHAVIOR_LINEAR
public static final int BEHAVIOR_MIDDLE_SLOW
public static final int BEHAVIOR_MIDDLE_FAST
protected final int mBehavior
protected long mDurationMs
protected String mFilename
protected android.media.videoeditor.MediaArtistNativeHelper mNativeHelper
protected Transition(String transitionId, MediaItem afterMediaItem, MediaItem beforeMediaItem, long durationMs, int behavior)
transitionId
- The transition idafterMediaItem
- The transition is applied to the end of this
media itembeforeMediaItem
- The transition is applied to the beginning of
this media itemdurationMs
- The duration of the transition in millisecondsbehavior
- The transition behaviorpublic String getId()
public MediaItem getAfterMediaItem()
public MediaItem getBeforeMediaItem()
public void setDuration(long durationMs)
durationMs
- the duration of the transition in millisecondspublic long getDuration()
public long getMaximumDuration()
public int getBehavior()
public boolean equals(Object object)
Object
o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and Object.hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
equals
in class Object
object
- the object to compare this instance with.true
if the specified object is equal to this Object
; false
otherwise.Object.hashCode()
public int hashCode()
Object
Object.equals(java.lang.Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
hashCode
in class Object
Object.equals(java.lang.Object)