Package 

Class MultiDataSink

  • All Implemented Interfaces:
    com.otaliastudios.transcoder.sink.DataSink

    
    public class MultiDataSink
     implements DataSink
                        
    • Method Summary

      Modifier and Type Method Description
      void setOrientation(int orientation) Called before starting to set the orientation metadata.
      void setLocation(double latitude, double longitude) Called before starting to set the location metadata.
      void setTrackStatus(@NonNull() TrackType type, @NonNull() TrackStatus status) Called before starting to set the status for the giventrack.
      void setTrackFormat(@NonNull() TrackType type, @NonNull() MediaFormat format) Called by the transcoding pipeline when we have an output format.
      void writeTrack(@NonNull() TrackType type, @NonNull() ByteBuffer byteBuffer, @NonNull() MediaCodec.BufferInfo bufferInfo) Called by the transcoding pipeline to write data into this sink.
      void stop() Called when transcoders have stopped writing.
      void release() Called to release resources.Any exception should probably be caught here.
      • Methods inherited from class com.otaliastudios.transcoder.sink.DataSink

        setTrackFormat, setTrackStatus, writeTrack
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setOrientation

         void setOrientation(int orientation)

        Called before starting to set the orientation metadata.

        Parameters:
        orientation - 0, 90, 180 or 270
      • setLocation

         void setLocation(double latitude, double longitude)

        Called before starting to set the location metadata.

        Parameters:
        latitude - latitude
        longitude - longitude
      • setTrackFormat

         void setTrackFormat(@NonNull() TrackType type, @NonNull() MediaFormat format)

        Called by the transcoding pipeline when we have an output format.This is not the output format chosen by the library user but rather theoutput format determined by MediaCodec, which contains more information,and should be inspected to know what kind of data we're collecting.

        Parameters:
        type - the track type
        format - the track format
      • stop

         void stop()

        Called when transcoders have stopped writing.

      • release

         void release()

        Called to release resources.Any exception should probably be caught here.