Package com.google.android.filament
Class Stream.Builder
- java.lang.Object
-
- com.google.android.filament.Stream.Builder
-
- Enclosing class:
- Stream
public static class Stream.Builder extends java.lang.ObjectUseBuilderto construct an Stream object instance. By default, Stream objects areACQUIREDand must have external images pushed to them viaStream.setAcquiredImage(java.lang.Object, java.lang.Object, java.lang.Runnable). To create aNATIVEstream, call thestream
method on the builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()UseBuilderto construct an Stream object instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Streambuild(Engine engine)Creates a newStreamobject instance.Stream.Builderheight(int height)Stream.Builderstream(java.lang.Object streamSource)Creates aNATIVEstream.Stream.Builderwidth(int width)
-
-
-
Method Detail
-
stream
@NonNull public Stream.Builder stream(@NonNull java.lang.Object streamSource)
Creates aNATIVEstream. Native streams can sample data directly from an opaque platform object such as aSurfaceTextureon Android.- Parameters:
streamSource- an opaque native stream handle, e.g.: on Android this must be aSurfaceTextureobject- Returns:
- This Builder, for chaining calls.
- See Also:
Texture.setExternalStream(com.google.android.filament.Engine, com.google.android.filament.Stream)
-
width
@NonNull public Stream.Builder width(int width)
- Parameters:
width- initial width of the incoming stream. Whether this value is used is stream dependent. On Android, it must be set when using#stream(long)- Returns:
- This Builder, for chaining calls.
-
height
@NonNull public Stream.Builder height(int height)
- Parameters:
height- initial height of the incoming stream. Whether this value is used is stream dependent. On Android, it must be set when using#stream(long)- Returns:
- This Builder, for chaining calls.
-
-