.class public Landroidx/media3/decoder/DecoderInputBuffer; .super Landroidx/media3/decoder/Buffer; .source "DecoderInputBuffer.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/media3/decoder/DecoderInputBuffer$InsufficientCapacityException;, Landroidx/media3/decoder/DecoderInputBuffer$BufferReplacementMode; } .end annotation # static fields .field public static final BUFFER_REPLACEMENT_MODE_DIRECT:I = 0x2 .field public static final BUFFER_REPLACEMENT_MODE_DISABLED:I = 0x0 .field public static final BUFFER_REPLACEMENT_MODE_NORMAL:I = 0x1 # instance fields .field private final bufferReplacementMode:I .field public final cryptoInfo:Landroidx/media3/decoder/CryptoInfo; .field public data:Ljava/nio/ByteBuffer; .field public format:Landroidx/media3/common/Format; .field private final paddingSize:I .field public supplementalData:Ljava/nio/ByteBuffer; .field public timeUs:J .field public waitingForKeys:Z # direct methods .method static constructor ()V .locals 1 const-string v0, "media3.decoder" .line 38 invoke-static {v0}, Landroidx/media3/common/MediaLibraryInfo;->registerModule(Ljava/lang/String;)V return-void .end method .method public constructor (I)V .locals 1 const/4 v0, 0x0 .line 128 invoke-direct {p0, p1, v0}, Landroidx/media3/decoder/DecoderInputBuffer;->(II)V return-void .end method .method public constructor (II)V .locals 1 .line 141 invoke-direct {p0}, Landroidx/media3/decoder/Buffer;->()V .line 142 new-instance v0, Landroidx/media3/decoder/CryptoInfo; invoke-direct {v0}, Landroidx/media3/decoder/CryptoInfo;->()V iput-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->cryptoInfo:Landroidx/media3/decoder/CryptoInfo; iput p1, p0, Landroidx/media3/decoder/DecoderInputBuffer;->bufferReplacementMode:I iput p2, p0, Landroidx/media3/decoder/DecoderInputBuffer;->paddingSize:I return-void .end method .method private createReplacementByteBuffer(I)Ljava/nio/ByteBuffer; .locals 2 iget v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->bufferReplacementMode:I const/4 v1, 0x1 if-ne v0, v1, :cond_0 .line 235 invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer; move-result-object p0 return-object p0 :cond_0 const/4 v1, 0x2 if-ne v0, v1, :cond_1 .line 237 invoke-static {p1}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer; move-result-object p0 return-object p0 :cond_1 iget-object p0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; if-nez p0, :cond_2 const/4 p0, 0x0 goto :goto_0 .line 239 :cond_2 invoke-virtual {p0}, Ljava/nio/ByteBuffer;->capacity()I move-result p0 .line 240 :goto_0 new-instance v0, Landroidx/media3/decoder/DecoderInputBuffer$InsufficientCapacityException; invoke-direct {v0, p0, p1}, Landroidx/media3/decoder/DecoderInputBuffer$InsufficientCapacityException;->(II)V throw v0 .end method .method public static newNoDataInstance()Landroidx/media3/decoder/DecoderInputBuffer; .locals 2 .line 119 new-instance v0, Landroidx/media3/decoder/DecoderInputBuffer; const/4 v1, 0x0 invoke-direct {v0, v1}, Landroidx/media3/decoder/DecoderInputBuffer;->(I)V return-object v0 .end method # virtual methods .method public clear()V .locals 1 .line 223 invoke-super {p0}, Landroidx/media3/decoder/Buffer;->clear()V iget-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; if-eqz v0, :cond_0 .line 225 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer; :cond_0 iget-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->supplementalData:Ljava/nio/ByteBuffer; if-eqz v0, :cond_1 .line 228 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer; :cond_1 const/4 v0, 0x0 iput-boolean v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->waitingForKeys:Z return-void .end method .method public ensureSpaceForWrite(I)V .locals 3 .annotation runtime Lorg/checkerframework/checker/nullness/qual/EnsuresNonNull; value = { "data" } .end annotation iget v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->paddingSize:I add-int/2addr p1, v0 iget-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; if-nez v0, :cond_0 .line 179 invoke-direct {p0, p1}, Landroidx/media3/decoder/DecoderInputBuffer;->createReplacementByteBuffer(I)Ljava/nio/ByteBuffer; move-result-object p1 iput-object p1, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; return-void .line 183 :cond_0 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->capacity()I move-result v1 .line 184 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->position()I move-result v2 add-int/2addr p1, v2 if-lt v1, p1, :cond_1 iput-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; return-void .line 191 :cond_1 invoke-direct {p0, p1}, Landroidx/media3/decoder/DecoderInputBuffer;->createReplacementByteBuffer(I)Ljava/nio/ByteBuffer; move-result-object p1 .line 192 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder; move-result-object v1 invoke-virtual {p1, v1}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer; if-lez v2, :cond_2 .line 195 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer; .line 196 invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; :cond_2 iput-object p1, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; return-void .end method .method public final flip()V .locals 1 iget-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->data:Ljava/nio/ByteBuffer; if-eqz v0, :cond_0 .line 214 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer; :cond_0 iget-object p0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->supplementalData:Ljava/nio/ByteBuffer; if-eqz p0, :cond_1 .line 217 invoke-virtual {p0}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer; :cond_1 return-void .end method .method public final isEncrypted()Z .locals 1 const/high16 v0, 0x40000000 # 2.0f .line 204 invoke-virtual {p0, v0}, Landroidx/media3/decoder/DecoderInputBuffer;->getFlag(I)Z move-result p0 return p0 .end method .method public resetSupplementalData(I)V .locals 1 .annotation runtime Lorg/checkerframework/checker/nullness/qual/EnsuresNonNull; value = { "supplementalData" } .end annotation iget-object v0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->supplementalData:Ljava/nio/ByteBuffer; if-eqz v0, :cond_1 .line 155 invoke-virtual {v0}, Ljava/nio/ByteBuffer;->capacity()I move-result v0 if-ge v0, p1, :cond_0 goto :goto_0 :cond_0 iget-object p0, p0, Landroidx/media3/decoder/DecoderInputBuffer;->supplementalData:Ljava/nio/ByteBuffer; .line 158 invoke-virtual {p0}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer; goto :goto_1 .line 156 :cond_1 :goto_0 invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer; move-result-object p1 iput-object p1, p0, Landroidx/media3/decoder/DecoderInputBuffer;->supplementalData:Ljava/nio/ByteBuffer; :goto_1 return-void .end method