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
aa570621
authored
Feb 27, 2018
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Restore equivalence
parent
51405c99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
README.md
library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
README.md
View file @
aa570621
...
...
@@ -38,8 +38,8 @@ repositories {
}
```
Next add a
gradle compile dependency to the
`build.gradle`
file of your app
module. The
following will add a dependency to the full library:
Next add a
dependency in the
`build.gradle`
file of your app module. The
following will add a dependency to the full library:
```
gradle
implementation
'com.google.android.exoplayer:exoplayer:2.X.X'
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
View file @
aa570621
...
...
@@ -1929,12 +1929,12 @@ public final class MatroskaExtractor implements Extractor {
/**
* Builds initialization data for a {@link Format} from FourCC codec private data.
* <p>
* VC1 and H263 are the only supported compression types.
*
* @return A pair object with the first object being the codec mime type
* and the second object the initialization data for the {@link Format},
* or null if the compression type is not a currently supported type (VC1 or H263).
* <p>VC1 and H263 are the only supported compression types.
*
* @return The codec mime type and initialization data. If the compression type is not supported
* then the mime type is set to {@link MimeTypes#VIDEO_UNKNOWN} and the initialization data
* is {@code null}.
* @throws ParserException If the initialization data could not be built.
*/
private
static
Pair
<
String
,
List
<
byte
[]>>
parseFourCcPrivate
(
ParsableByteArray
buffer
)
...
...
@@ -1944,14 +1944,16 @@ public final class MatroskaExtractor implements Extractor {
long
compression
=
buffer
.
readLittleEndianUnsignedInt
();
if
(
compression
==
FOURCC_COMPRESSION_DIVX
)
{
return
new
Pair
<>(
MimeTypes
.
VIDEO_H263
,
null
);
}
else
if
(
compression
==
FOURCC_COMPRESSION_VC1
)
{
}
else
if
(
compression
==
FOURCC_COMPRESSION_VC1
)
{
// Search for the initialization data from the end of the BITMAPINFOHEADER. The last 20
// bytes of which are: sizeImage(4), xPel/m (4), yPel/m (4), clrUsed(4), clrImportant(4).
int
startOffset
=
buffer
.
getPosition
()
+
20
;
byte
[]
bufferData
=
buffer
.
data
;
for
(
int
offset
=
startOffset
;
offset
<
bufferData
.
length
-
4
;
offset
++)
{
if
(
bufferData
[
offset
]
==
0x00
&&
bufferData
[
offset
+
1
]
==
0x00
&&
bufferData
[
offset
+
2
]
==
0x01
&&
bufferData
[
offset
+
3
]
==
0x0F
)
{
if
(
bufferData
[
offset
]
==
0x00
&&
bufferData
[
offset
+
1
]
==
0x00
&&
bufferData
[
offset
+
2
]
==
0x01
&&
bufferData
[
offset
+
3
]
==
0x0F
)
{
// We've found the initialization data.
byte
[]
initializationData
=
Arrays
.
copyOfRange
(
bufferData
,
offset
,
bufferData
.
length
);
return
new
Pair
<>(
MimeTypes
.
VIDEO_VC1
,
Collections
.
singletonList
(
initializationData
));
...
...
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java
View file @
aa570621
...
...
@@ -289,6 +289,7 @@ public abstract class DownloadService extends Service implements DownloadManager
@Override
public
void
onIdle
(
DownloadManager
downloadManager
)
{
// Make sure startForeground is called before stopping.
// Workaround for https://buganizer.corp.google.com/issues/69424260
if
(
Util
.
SDK_INT
>=
26
)
{
Builder
notificationBuilder
=
new
Builder
(
this
,
getNotificationChannelId
());
Notification
foregroundNotification
=
notificationBuilder
.
build
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java
View file @
aa570621
...
...
@@ -614,8 +614,8 @@ public class DefaultHttpDataSource implements HttpDataSource {
}
String
className
=
inputStream
.
getClass
().
getName
();
if
(
"com.android.okhttp.internal.http.HttpTransport$ChunkedInputStream"
.
equals
(
className
)
||
"com.android.okhttp.internal.http.HttpTransport$FixedLengthInputStream"
.
equals
(
className
))
{
||
"com.android.okhttp.internal.http.HttpTransport$FixedLengthInputStream"
.
equals
(
className
))
{
Class
<?>
superclass
=
inputStream
.
getClass
().
getSuperclass
();
Method
unexpectedEndOfInput
=
superclass
.
getDeclaredMethod
(
"unexpectedEndOfInput"
);
unexpectedEndOfInput
.
setAccessible
(
true
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
View file @
aa570621
This diff is collapsed.
Click to expand it.
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