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
b27cc568
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
43aace03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
1 deletions
libraries/transformer/src/main/java/androidx/media3/transformer/Composition.java
libraries/transformer/src/main/java/androidx/media3/transformer/EditedMediaItem.java
libraries/transformer/src/main/java/androidx/media3/transformer/EditedMediaItemSequence.java
libraries/transformer/src/main/java/androidx/media3/transformer/Composition.java
0 → 100644
View file @
b27cc568
/*
* 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
androidx
.
media3
.
transformer
;
import
androidx.media3.common.MediaItem
;
import
androidx.media3.common.util.UnstableApi
;
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.
*/
@UnstableApi
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
;
}
}
libraries/transformer/src/main/java/androidx/media3/transformer/EditedMediaItem.java
View file @
b27cc568
...
...
@@ -28,7 +28,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/** A {@link MediaItem} with the transformations to apply to it. */
@UnstableApi
public
class
EditedMediaItem
{
public
final
class
EditedMediaItem
{
/** A builder for {@link EditedMediaItem} instances. */
public
static
final
class
Builder
{
...
...
libraries/transformer/src/main/java/androidx/media3/transformer/EditedMediaItemSequence.java
0 → 100644
View file @
b27cc568
/*
* 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
androidx
.
media3
.
transformer
;
import
androidx.media3.common.util.UnstableApi
;
import
com.google.common.collect.ImmutableList
;
/**
* A sequence of {@link EditedMediaItem} instances.
*
* <p>{@linkplain EditedMediaItem} instances in a sequence don't overlap in time.
*/
@UnstableApi
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