forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow custom plugins for transmuxing (shaka-project#4854)
- Loading branch information
Showing
15 changed files
with
414 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ | |
+@manifests | ||
+@polyfill | ||
+@text | ||
+@transmuxer | ||
+@ui | ||
+@lcevc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Optional plugins related to transmuxer. | ||
|
||
+../../lib/transmuxer/muxjs_transmuxer.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* An interface for transmuxer plugins. | ||
* | ||
* @interface | ||
* @exportDoc | ||
*/ | ||
shaka.extern.Transmuxer = class { | ||
/** | ||
* Destroy | ||
*/ | ||
destroy() {} | ||
|
||
/** | ||
* Check if the mime type and the content type is supported. | ||
* @param {string} mimeType | ||
* @param {string=} contentType | ||
* @return {boolean} | ||
*/ | ||
isSupported(mimeType, contentType) {} | ||
|
||
/** | ||
* For any stream, convert its codecs to MP4 codecs. | ||
* @param {string} contentType | ||
* @param {string} mimeType | ||
* @return {string} | ||
*/ | ||
convertCodecs(contentType, mimeType) {} | ||
|
||
/** | ||
* Returns the original mimetype of the transmuxer. | ||
* @return {string} | ||
*/ | ||
getOrginalMimeType() {} | ||
|
||
/** | ||
* Transmux a input data to MP4. | ||
* @param {BufferSource} data | ||
* @return {!Promise.<!Uint8Array>} | ||
*/ | ||
transmux(data) {} | ||
}; | ||
|
||
|
||
/** | ||
* @typedef {function():!shaka.extern.Transmuxer} | ||
* @exportDoc | ||
*/ | ||
shaka.extern.TransmuxerPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.