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
e5e17d6f
authored
Jan 27, 2023
by
kimvde
Committed by
christosts
Feb 01, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add EditedMediaItemSequence and Composition objects
PiperOrigin-RevId: 505047245
parent
97598490
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletions
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Composition.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EditedMediaItem.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EditedMediaItemSequence.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Composition.java
0 → 100644
View file @
e5e17d6f
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
google
.
android
.
exoplayer2
.
transformer
;
import
com.google.android.exoplayer2.MediaItem
;
import
com.google.common.collect.ImmutableList
;
/**
* A composition of {@link MediaItem} instances, with transformations to apply to them.
*
* <p>The {@linkplain MediaItem} instances can be concatenated or mixed. {@link Effects} can be
* applied to individual {@linkplain MediaItem} instances, as well as to the composition.
*/
public
final
class
Composition
{
/* package */
final
ImmutableList
<
EditedMediaItemSequence
>
sequences
;
/* package */
final
Effects
effects
;
/**
* Creates an instance.
*
* @param sequences The {@link EditedMediaItemSequence} instances to compose. {@link MediaItem}
* instances from different sequences that are overlapping in time will be mixed in the
* output.
* @param effects The {@link Effects} to apply to the composition.
*/
public
Composition
(
ImmutableList
<
EditedMediaItemSequence
>
sequences
,
Effects
effects
)
{
this
.
sequences
=
sequences
;
this
.
effects
=
effects
;
}
}
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EditedMediaItem.java
View file @
e5e17d6f
...
@@ -26,7 +26,7 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
...
@@ -26,7 +26,7 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
import
org.checkerframework.checker.nullness.qual.MonotonicNonNull
;
import
org.checkerframework.checker.nullness.qual.MonotonicNonNull
;
/** A {@link MediaItem} with the transformations to apply to it. */
/** A {@link MediaItem} with the transformations to apply to it. */
public
class
EditedMediaItem
{
public
final
class
EditedMediaItem
{
/** A builder for {@link EditedMediaItem} instances. */
/** A builder for {@link EditedMediaItem} instances. */
public
static
final
class
Builder
{
public
static
final
class
Builder
{
...
...
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EditedMediaItemSequence.java
0 → 100644
View file @
e5e17d6f
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
google
.
android
.
exoplayer2
.
transformer
;
import
com.google.common.collect.ImmutableList
;
/**
* A sequence of {@link EditedMediaItem} instances.
*
* <p>{@linkplain EditedMediaItem} instances in a sequence don't overlap in time.
*/
public
final
class
EditedMediaItemSequence
{
/* package */
final
ImmutableList
<
EditedMediaItem
>
editedMediaItems
;
/**
* Creates an instance.
*
* @param editedMediaItems The {@link EditedMediaItem} instances in the sequence.
*/
public
EditedMediaItemSequence
(
ImmutableList
<
EditedMediaItem
>
editedMediaItems
)
{
this
.
editedMediaItems
=
editedMediaItems
;
}
}
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