com.android.emulator.control.AudioPacket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adam Show documentation
Show all versions of adam Show documentation
Android Debug Bridge helper
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: emulator_controller.proto
// Protobuf Java Version: 3.25.0
package com.android.emulator.control;
/**
* Protobuf type {@code android.emulation.control.AudioPacket}
*/
public final class AudioPacket extends
com.google.protobuf.GeneratedMessageLite<
AudioPacket, AudioPacket.Builder> implements
// @@protoc_insertion_point(message_implements:android.emulation.control.AudioPacket)
AudioPacketOrBuilder {
private AudioPacket() {
audio_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int FORMAT_FIELD_NUMBER = 1;
private com.android.emulator.control.AudioFormat format_;
/**
* .android.emulation.control.AudioFormat format = 1;
*/
@java.lang.Override
public boolean hasFormat() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
@java.lang.Override
public com.android.emulator.control.AudioFormat getFormat() {
return format_ == null ? com.android.emulator.control.AudioFormat.getDefaultInstance() : format_;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
private void setFormat(com.android.emulator.control.AudioFormat value) {
value.getClass();
format_ = value;
bitField0_ |= 0x00000001;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeFormat(com.android.emulator.control.AudioFormat value) {
value.getClass();
if (format_ != null &&
format_ != com.android.emulator.control.AudioFormat.getDefaultInstance()) {
format_ =
com.android.emulator.control.AudioFormat.newBuilder(format_).mergeFrom(value).buildPartial();
} else {
format_ = value;
}
bitField0_ |= 0x00000001;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
private void clearFormat() { format_ = null;
bitField0_ = (bitField0_ & ~0x00000001);
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private long timestamp_;
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
* @param value The timestamp to set.
*/
private void setTimestamp(long value) {
timestamp_ = value;
}
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
*/
private void clearTimestamp() {
timestamp_ = 0L;
}
public static final int AUDIO_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString audio_;
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
* @return The audio.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAudio() {
return audio_;
}
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
* @param value The audio to set.
*/
private void setAudio(com.google.protobuf.ByteString value) {
java.lang.Class valueClass = value.getClass();
audio_ = value;
}
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
*/
private void clearAudio() {
audio_ = getDefaultInstance().getAudio();
}
public static com.android.emulator.control.AudioPacket parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.AudioPacket parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.AudioPacket parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.AudioPacket parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.AudioPacket parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.AudioPacket parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.AudioPacket parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.AudioPacket parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.android.emulator.control.AudioPacket parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.AudioPacket parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.android.emulator.control.AudioPacket parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.AudioPacket parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.android.emulator.control.AudioPacket prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code android.emulation.control.AudioPacket}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.android.emulator.control.AudioPacket, Builder> implements
// @@protoc_insertion_point(builder_implements:android.emulation.control.AudioPacket)
com.android.emulator.control.AudioPacketOrBuilder {
// Construct using com.android.emulator.control.AudioPacket.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
@java.lang.Override
public boolean hasFormat() {
return instance.hasFormat();
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
@java.lang.Override
public com.android.emulator.control.AudioFormat getFormat() {
return instance.getFormat();
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
public Builder setFormat(com.android.emulator.control.AudioFormat value) {
copyOnWrite();
instance.setFormat(value);
return this;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
public Builder setFormat(
com.android.emulator.control.AudioFormat.Builder builderForValue) {
copyOnWrite();
instance.setFormat(builderForValue.build());
return this;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
public Builder mergeFormat(com.android.emulator.control.AudioFormat value) {
copyOnWrite();
instance.mergeFormat(value);
return this;
}
/**
* .android.emulation.control.AudioFormat format = 1;
*/
public Builder clearFormat() { copyOnWrite();
instance.clearFormat();
return this;
}
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return instance.getTimestamp();
}
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
copyOnWrite();
instance.setTimestamp(value);
return this;
}
/**
*
* Unix epoch in us when this frame was captured.
*
*
* uint64 timestamp = 2;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
copyOnWrite();
instance.clearTimestamp();
return this;
}
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
* @return The audio.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAudio() {
return instance.getAudio();
}
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
* @param value The audio to set.
* @return This builder for chaining.
*/
public Builder setAudio(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setAudio(value);
return this;
}
/**
*
* Contains a sample in the given audio format.
*
*
* bytes audio = 3;
* @return This builder for chaining.
*/
public Builder clearAudio() {
copyOnWrite();
instance.clearAudio();
return this;
}
// @@protoc_insertion_point(builder_scope:android.emulation.control.AudioPacket)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.android.emulator.control.AudioPacket();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"format_",
"timestamp_",
"audio_",
};
java.lang.String info =
"\u0000\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u1009\u0000\u0002" +
"\u0003\u0003\n";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.android.emulator.control.AudioPacket.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:android.emulation.control.AudioPacket)
private static final com.android.emulator.control.AudioPacket DEFAULT_INSTANCE;
static {
AudioPacket defaultInstance = new AudioPacket();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
AudioPacket.class, defaultInstance);
}
public static com.android.emulator.control.AudioPacket getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}