Commit db606428 by sheenachhabra Committed by Rohit Singh

Create orientation matrix byte array using util method

PiperOrigin-RevId: 514375835
parent 06741778
......@@ -201,6 +201,23 @@ public final class Util {
}
/**
* Converts an array of 32-bit integers into an equivalent byte array.
*
* <p>Each integer is converted into 4 sequential bytes.
*/
public static byte[] toByteArray(int... values) {
byte[] array = new byte[values.length * 4];
int index = 0;
for (int value : values) {
array[index++] = (byte) (value >> 24);
array[index++] = (byte) (value >> 16);
array[index++] = (byte) (value >> 8);
array[index++] = (byte) (value /* >> 0 */);
}
return array;
}
/**
* Registers a {@link BroadcastReceiver} that's not intended to receive broadcasts from other
* apps. This will be enforced by specifying {@link Context#RECEIVER_NOT_EXPORTED} if {@link
* #SDK_INT} is 33 or above.
......
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=44]]
getPosition(1) = [[timeUs=0, position=44]]
getPosition(0) = [[timeUs=0, position=44]]
getPosition(0) = [[timeUs=0, position=44]]
numberOfTracks = 1
track 0:
total output bytes = 55
sample count = 1
format 0:
id = 1
sampleMimeType = video/avc
codecs = avc1.9B2BF3
maxInputSize = 85
width = 12
height = 10
rotationDegrees = 180
initializationData:
data = length 24, hash 7F12E259
data = length 5, hash 1B4D906
sample 0:
time = 0
flags = 536870913
data = length 55, hash A481CEF4
tracksEnded = true
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=44]]
getPosition(1) = [[timeUs=0, position=44]]
getPosition(0) = [[timeUs=0, position=44]]
getPosition(0) = [[timeUs=0, position=44]]
numberOfTracks = 1
track 0:
total output bytes = 55
sample count = 1
format 0:
id = 1
sampleMimeType = video/avc
codecs = avc1.9B2BF3
maxInputSize = 85
width = 12
height = 10
rotationDegrees = 270
initializationData:
data = length 24, hash 7F12E259
data = length 5, hash 1B4D906
sample 0:
time = 0
flags = 536870913
data = length 55, hash A481CEF4
tracksEnded = true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment