public interface DataSink
DefaultDataSink which collects
data into a File using MediaMuxer.
However there might be other implementations in the future, for example to stream data
to a server.| Modifier and Type | Method and Description |
|---|---|
void |
release()
Called to release resources.
|
void |
setLocation(double latitude,
double longitude)
Called before starting to set the location metadata.
|
void |
setOrientation(int orientation)
Called before starting to set the orientation metadata.
|
void |
setTrackFormat(TrackType type,
android.media.MediaFormat format)
Called by
TrackTranscoders when they have an output format. |
void |
setTrackStatus(TrackType type,
TrackStatus status)
Called before starting to set the status for the given
track.
|
void |
stop()
Called when transcoders have stopped writing.
|
void |
writeTrack(TrackType type,
java.nio.ByteBuffer byteBuffer,
android.media.MediaCodec.BufferInfo bufferInfo)
Called by
TrackTranscoders to write data into this sink. |
void setOrientation(int orientation)
orientation - 0, 90, 180 or 270void setLocation(double latitude,
double longitude)
latitude - latitudelongitude - longitudevoid setTrackStatus(@NonNull
TrackType type,
@NonNull
TrackStatus status)
TrackStatus.isTranscoding().type - track typestatus - statusvoid setTrackFormat(@NonNull
TrackType type,
@NonNull
android.media.MediaFormat format)
TrackTranscoders when they have an output format.
This is not the output format chosen by the library user but rather the
output format determined by MediaCodec, which contains more information,
and should be inspected to know what kind of data we're collecting.type - the track typeformat - the track formatvoid writeTrack(@NonNull
TrackType type,
@NonNull
java.nio.ByteBuffer byteBuffer,
@NonNull
android.media.MediaCodec.BufferInfo bufferInfo)
TrackTranscoders to write data into this sink.type - the track typebyteBuffer - the databufferInfo - the metadatavoid stop()
void release()