Deprecate MediaExtractor.setMediaCas
- There is no evidence of usage, after checking with all known stakeholders. - We are aware of bugs that were never detected by users (b/193267732). - The successor (MediaCasV2) is already available as a system API (under android.media.tv.tuner, including the Descrambler class). Deprecation has a role in the long term MediaExtractor codebase convergence. Test: Built the tree. Bug: 201414083 Change-Id: If7a6f160a007ab2db9e55a1ad003a948e6668b58
This commit is contained in:
@@ -22649,7 +22649,7 @@ package android.media {
|
||||
method public void setDataSource(@NonNull java.io.FileDescriptor) throws java.io.IOException;
|
||||
method public void setDataSource(@NonNull java.io.FileDescriptor, long, long) throws java.io.IOException;
|
||||
method public void setLogSessionId(@NonNull android.media.metrics.LogSessionId);
|
||||
method public void setMediaCas(@NonNull android.media.MediaCas);
|
||||
method @Deprecated public void setMediaCas(@NonNull android.media.MediaCas);
|
||||
method public void unselectTrack(int);
|
||||
field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
|
||||
field public static final int SAMPLE_FLAG_PARTIAL_FRAME = 4; // 0x4
|
||||
|
||||
@@ -250,15 +250,10 @@ public final class MediaExtractor {
|
||||
@NonNull FileDescriptor fd, long offset, long length) throws IOException;
|
||||
|
||||
/**
|
||||
* Sets the MediaCas instance to use. This should be called after a
|
||||
* successful setDataSource() if at least one track reports mime type
|
||||
* of {@link android.media.MediaFormat#MIMETYPE_AUDIO_SCRAMBLED}
|
||||
* or {@link android.media.MediaFormat#MIMETYPE_VIDEO_SCRAMBLED}.
|
||||
* Stream parsing will not proceed until a valid MediaCas object
|
||||
* is provided.
|
||||
*
|
||||
* @param mediaCas the MediaCas object to use.
|
||||
* @deprecated Use the {@code Descrambler} system API instead, or DRM public APIs like
|
||||
* {@link MediaDrm}.
|
||||
*/
|
||||
@Deprecated
|
||||
public final void setMediaCas(@NonNull MediaCas mediaCas) {
|
||||
mMediaCas = mediaCas;
|
||||
nativeSetMediaCas(mediaCas.getBinder());
|
||||
|
||||
Reference in New Issue
Block a user