parent
1f0e6a5c46
commit
e90ad9c47d
@ -13,9 +13,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer.upstream;
|
package com.google.android.exoplayer.hls;
|
||||||
|
|
||||||
import com.google.android.exoplayer.C;
|
import com.google.android.exoplayer.C;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSource;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSourceInputStream;
|
||||||
|
import com.google.android.exoplayer.upstream.DataSpec;
|
||||||
import com.google.android.exoplayer.util.Assertions;
|
import com.google.android.exoplayer.util.Assertions;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -32,10 +35,14 @@ import javax.crypto.spec.IvParameterSpec;
|
|||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link DataSource} that decrypts the data read from an upstream source, encrypted with AES-128
|
* A {@link DataSource} that decrypts data read from an upstream source, encrypted with AES-128 with
|
||||||
* with a 128-bit key and PKCS7 padding.
|
* a 128-bit key and PKCS7 padding.
|
||||||
|
* <p>
|
||||||
|
* Note that this {@link DataSource} does not support being opened from arbitrary offsets. It is
|
||||||
|
* designed specifically for reading whole files as defined in an HLS media playlist. For this
|
||||||
|
* reason the implementation is private to the HLS package.
|
||||||
*/
|
*/
|
||||||
public class Aes128DataSource implements DataSource {
|
/* package */ class Aes128DataSource implements DataSource {
|
||||||
|
|
||||||
private final DataSource upstream;
|
private final DataSource upstream;
|
||||||
private final byte[] encryptionKey;
|
private final byte[] encryptionKey;
|
@ -20,7 +20,6 @@ import com.google.android.exoplayer.chunk.MediaChunk;
|
|||||||
import com.google.android.exoplayer.extractor.DefaultExtractorInput;
|
import com.google.android.exoplayer.extractor.DefaultExtractorInput;
|
||||||
import com.google.android.exoplayer.extractor.Extractor;
|
import com.google.android.exoplayer.extractor.Extractor;
|
||||||
import com.google.android.exoplayer.extractor.ExtractorInput;
|
import com.google.android.exoplayer.extractor.ExtractorInput;
|
||||||
import com.google.android.exoplayer.upstream.Aes128DataSource;
|
|
||||||
import com.google.android.exoplayer.upstream.DataSource;
|
import com.google.android.exoplayer.upstream.DataSource;
|
||||||
import com.google.android.exoplayer.upstream.DataSpec;
|
import com.google.android.exoplayer.upstream.DataSpec;
|
||||||
import com.google.android.exoplayer.util.Util;
|
import com.google.android.exoplayer.util.Util;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user