Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a81a5f26
authored
Mar 06, 2023
by
sheenachhabra
Committed by
Rohit Singh
Mar 07, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Create orientation matrix byte array using util method
PiperOrigin-RevId: 514375835
parent
9c829230
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
0 deletions
libraries/common/src/main/java/androidx/media3/common/util/Util.java
libraries/test_data/src/test/assets/muxerdumps/mp4_with_180_orientation.mp4.dump
libraries/test_data/src/test/assets/muxerdumps/mp4_with_270_orientation.mp4.dump
libraries/common/src/main/java/androidx/media3/common/util/Util.java
View file @
a81a5f26
...
@@ -204,6 +204,24 @@ public final class Util {
...
@@ -204,6 +204,24 @@ 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.
*/
@UnstableApi
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
* 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
* apps. This will be enforced by specifying {@link Context#RECEIVER_NOT_EXPORTED} if {@link
* #SDK_INT} is 33 or above.
* #SDK_INT} is 33 or above.
...
...
libraries/test_data/src/test/assets/muxerdumps/mp4_with_180_orientation.mp4.dump
0 → 100644
View file @
a81a5f26
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
libraries/test_data/src/test/assets/muxerdumps/mp4_with_270_orientation.mp4.dump
0 → 100644
View file @
a81a5f26
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment