Stay organized with collections
Save and categorize content based on your preferences.
CasInfo
class CasInfo
Describes the conditional access system used to scramble a track.
Summary
Public methods |
ByteArray? |
Retrieves the private data in the CA_Descriptor associated with a track.
|
MediaCas.Session! |
Retrieves the MediaCas.Session associated with a track.
|
Int |
Retrieves the system id of the conditional access system.
|
Public methods
getPrivateData
fun getPrivateData(): ByteArray?
Retrieves the private data in the CA_Descriptor associated with a track. Some CAS systems may need this to initialize the CAS plugin object. This private data can only be retrieved before a valid MediaCas
object is set on the extractor.
Return |
ByteArray? |
a byte array containing the private data. A null return value indicates that the private data is unavailable. An empty array, on the other hand, indicates that the private data is empty (zero in length). |
getSession
fun getSession(): MediaCas.Session!
Retrieves the MediaCas.Session
associated with a track. The session is needed to initialize a descrambler in order to decode the scrambled track. The session object can only be retrieved after a valid MediaCas
object is set on the extractor.
getSystemId
fun getSystemId(): Int
Retrieves the system id of the conditional access system.
Return |
Int |
CA system id of the CAS used to scramble the track. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MediaExtractor.CasInfo\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCasInfo\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaExtractor.CasInfo \"View this page in Java\") \n\n```\nclass CasInfo\n```\n\n|---|-------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.MediaExtractor.CasInfo](#) |\n\nDescribes the conditional access system used to scramble a track.\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | [getPrivateData](#getPrivateData())`()` Retrieves the private data in the CA_Descriptor associated with a track. |\n| [MediaCas.Session](/reference/kotlin/android/media/MediaCas.Session)! | [getSession](#getSession())`()` Retrieves the [MediaCas.Session](/reference/kotlin/android/media/MediaCas.Session) associated with a track. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSystemId](#getSystemId())`()` Retrieves the system id of the conditional access system. |\n\nPublic methods\n--------------\n\n### getPrivateData\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getPrivateData(): ByteArray?\n```\n\nRetrieves the private data in the CA_Descriptor associated with a track. Some CAS systems may need this to initialize the CAS plugin object. This private data can only be retrieved before a valid [MediaCas](/reference/kotlin/android/media/MediaCas) object is set on the extractor.\n\n\u003cbr /\u003e\n\n| Return ||\n|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)? | a byte array containing the private data. A null return value indicates that the private data is unavailable. An empty array, on the other hand, indicates that the private data is empty (zero in length). |\n\n**See Also**\n\n- [android.media.MediaExtractor#setMediaCas](/reference/kotlin/android/media/MediaExtractor#setMediaCas(android.media.MediaCas)) \n\n### getSession\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSession(): MediaCas.Session!\n```\n\nRetrieves the [MediaCas.Session](/reference/kotlin/android/media/MediaCas.Session) associated with a track. The session is needed to initialize a descrambler in order to decode the scrambled track. The session object can only be retrieved after a valid [MediaCas](/reference/kotlin/android/media/MediaCas) object is set on the extractor.\n\n\u003cbr /\u003e\n\n| Return ||\n|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [MediaCas.Session](/reference/kotlin/android/media/MediaCas.Session)! | a [MediaCas.Session](/reference/kotlin/android/media/MediaCas.Session) object associated with a track. |\n\n**See Also**\n\n- [android.media.MediaExtractor#setMediaCas](/reference/kotlin/android/media/MediaExtractor#setMediaCas(android.media.MediaCas))\n- [android.media.MediaDescrambler#setMediaCasSession](/reference/kotlin/android/media/MediaDescrambler#setMediaCasSession(android.media.MediaCas.Session)) \n\n### getSystemId\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSystemId(): Int\n```\n\nRetrieves the system id of the conditional access system.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | CA system id of the CAS used to scramble the track. |"]]