Skip to content

Commit

Permalink
Merge pull request #1091 from canalplus/misc/abr-no-rxjs
Browse files Browse the repository at this point in the history
Refacto RxJS-based `ABRManager` into a SharedReference-based `AdaptiveRepresentationSelector`
  • Loading branch information
peaBerberian committed Jun 8, 2022
2 parents 05e4958 + 83e09b3 commit f45bcce
Show file tree
Hide file tree
Showing 43 changed files with 1,549 additions and 1,329 deletions.
14 changes: 7 additions & 7 deletions FILES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ a single directory or subdirectory, in alphabetical order.
- [src/typings/: Typescript typings](#src-typings)
- [src/utils/: The utils](#src-utils)
- [src/core/: The core directory](#core)
- [src/core/abr/: The adaptive bitrate code](#core-abr)
- [src/core/adaptive/: The adaptive bitrate code](#core-abr)
- [src/core/api/: The API definition](#core-api)
- [src/core/stream/: Load the right segments](#core-stream)
- [src/core/decrypt/: Decryption management](#core-decrypt)
Expand Down Expand Up @@ -211,17 +211,17 @@ As this directory is versatile and complicated, it also deserves its own chapter


<a name="core-abr"></a>
### src/core/abr/: The adaptive bitrate code ###################################
### src/core/adaptive/: The adaptive bitrate code ##############################

Defines an ABRManager class which manages the adaptive streaming part of the
player.
Defines functions which manages the adaptive streaming part of the player.

This manager takes various observables/options as inputs to record the current
situation of the player, give an opinion about the best media tracks to choose,
and provide methods allowing to get/set various ABR-related options.
and provide methods allowing to get/set various adaptive-related options.

Despite containing several files and using several classes, only the ABRManager
defined in ``abr/index.js`` should be needed by the rest of the core.
Despite containing several files and using several classes, only the
`AdaptiveRepresentationSelector` exported in `adaptive/index.js` should be
needed by the rest of the core.
This allows to isolate this complex part and facilitate future refactoring and
improvements.

Expand Down
18 changes: 9 additions & 9 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ Stream (./core/stream) | ~
| | ~ | ~ | ~ | | ~
| (audio) v ~ (video) V ~ (text) v ~ | +--------------+ | ~
| +----------+ +----------+ +----------+ ---> | | | ~
| Create the right | | | | | | <~~~ | ABRManager | | ~
| Representation- |Adaptation|-+ |Adaptation|-+ |Adaptation|-+ | | (./core/abr) | | ~
| Stream depending | Stream | | | Stream | | | Stream | | | | | | ~
| Create the right | | | | | | <~~~ | ARS* | | ~
| Representation- |Adaptation|-+ |Adaptation|-+ |Adaptation|-+ | |(./core/adapti| | ~
| Stream depending | Stream | | | Stream | | | Stream | | | |ve) | | ~
| on the current | | | | | | | | | | +--------------+ | ~
| network, +----------+ | +----------+ | +----------+ | | Find the best | ~
| settings... | (./core/stream/adaptation) | | profile to play | ~
| +-----------+ +-----------+ +-----------+ | | ~
| | ^ | ^ | ^ | | ~
| | ~ | ~ | ~ | | ~
| | ~ | ~ | ~ | | ~
| network, +----------+ | +----------+ | +----------+ | | *Adaptive | ~
| settings... | (./core/stream/adaptation) | | Representation | ~
| +-----------+ +-----------+ +-----------+ | Selector: | ~
| | ^ | ^ | ^ | Find the best | ~
| | ~ | ~ | ~ | Representation | ~
| | ~ | ~ | ~ | to play | ~
| | ~ | ~ | ~ | | ~
| (audio) v ~ (video) V ~ (text) v ~ | | ~
| +----------+ +----------+ +----------+ ----> +------------+ | ~
Expand Down
Loading

0 comments on commit f45bcce

Please sign in to comment.