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
e6c7defc
authored
May 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make ParsableBitArray.data public, like ParsableByteArray.
parent
7ad55dbf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
15 deletions
library/src/main/java/com/google/android/exoplayer/extractor/ts/Ac3Reader.java
library/src/main/java/com/google/android/exoplayer/extractor/ts/AdtsReader.java
library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
library/src/main/java/com/google/android/exoplayer/util/ParsableBitArray.java
library/src/main/java/com/google/android/exoplayer/util/ParsableByteArray.java
library/src/main/java/com/google/android/exoplayer/extractor/ts/Ac3Reader.java
View file @
e6c7defc
...
...
@@ -53,7 +53,7 @@ import com.google.android.exoplayer.util.ParsableByteArray;
public
Ac3Reader
(
TrackOutput
output
)
{
super
(
output
);
headerScratchBits
=
new
ParsableBitArray
(
new
byte
[
HEADER_SIZE
]);
headerScratchBytes
=
new
ParsableByteArray
(
headerScratchBits
.
getData
()
);
headerScratchBytes
=
new
ParsableByteArray
(
headerScratchBits
.
data
);
state
=
STATE_FINDING_SYNC
;
}
...
...
library/src/main/java/com/google/android/exoplayer/extractor/ts/AdtsReader.java
View file @
e6c7defc
...
...
@@ -89,7 +89,7 @@ import java.util.Collections;
break
;
case
STATE_READING_HEADER:
int
targetLength
=
hasCrc
?
HEADER_SIZE
+
CRC_SIZE
:
HEADER_SIZE
;
if
(
continueRead
(
data
,
adtsScratch
.
getData
()
,
targetLength
))
{
if
(
continueRead
(
data
,
adtsScratch
.
data
,
targetLength
))
{
parseHeader
();
bytesRead
=
0
;
state
=
STATE_READING_SAMPLE
;
...
...
library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
View file @
e6c7defc
...
...
@@ -357,14 +357,14 @@ public final class TsExtractor implements Extractor {
data
.
skipBytes
(
data
.
bytesLeft
());
break
;
case
STATE_READING_HEADER:
if
(
continueRead
(
data
,
pesScratch
.
getData
()
,
HEADER_SIZE
))
{
if
(
continueRead
(
data
,
pesScratch
.
data
,
HEADER_SIZE
))
{
setState
(
parseHeader
()
?
STATE_READING_HEADER_EXTENSION
:
STATE_FINDING_HEADER
);
}
break
;
case
STATE_READING_HEADER_EXTENSION:
int
readLength
=
Math
.
min
(
MAX_HEADER_EXTENSION_SIZE
,
extendedHeaderLength
);
// Read as much of the extended header as we're interested in, and skip the rest.
if
(
continueRead
(
data
,
pesScratch
.
getData
()
,
readLength
)
if
(
continueRead
(
data
,
pesScratch
.
data
,
readLength
)
&&
continueRead
(
data
,
null
,
extendedHeaderLength
))
{
parseHeaderExtension
();
bodyStarted
=
false
;
...
...
library/src/main/java/com/google/android/exoplayer/util/ParsableBitArray.java
View file @
e6c7defc
...
...
@@ -20,7 +20,7 @@ package com.google.android.exoplayer.util;
*/
public
final
class
ParsableBitArray
{
p
rivate
byte
[]
data
;
p
ublic
byte
[]
data
;
// The offset within the data, stored as the current byte offset, and the bit offset within that
// byte (from 0 to 7).
...
...
@@ -51,15 +51,6 @@ public final class ParsableBitArray {
}
/**
* Gets the backing byte array.
*
* @return The backing byte array.
*/
public
byte
[]
getData
()
{
return
data
;
}
/**
* Gets the current bit offset.
*
* @return The current bit offset.
...
...
library/src/main/java/com/google/android/exoplayer/util/ParsableByteArray.java
View file @
e6c7defc
...
...
@@ -135,7 +135,7 @@ public final class ParsableByteArray {
* @param length The number of bytes to write.
*/
public
void
readBytes
(
ParsableBitArray
bitArray
,
int
length
)
{
readBytes
(
bitArray
.
getData
()
,
0
,
length
);
readBytes
(
bitArray
.
data
,
0
,
length
);
bitArray
.
setPosition
(
0
);
}
...
...
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