-
Notifications
You must be signed in to change notification settings - Fork 0
transcoding_policy option #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
spec: | ||
:always | ||
| :if_needed | ||
| :never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks a bit off to me, having a transcoder with transcoding_policy: :never
:D Let's try thinking about
other option name, perhaps emphasising somehow that there are "heavy" operations and "light operations" would be helpful here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, my first idea was to add forbid_transcoding?
flag next to the force_transcoding?
, then I thought that transcoding_policy
will sound much better that these 2 combined. Do you propose any specific option name and values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option could be called something like :heavy_operations_policy
, or perhaps we should rename the bin since it not only does transcoding
lib/transcoder.ex
Outdated
* a boolean, | ||
* a function that receives the input stream format and returns a boolean. | ||
* an atom: `:always`, `:if_needed` (default) or `:never`, | ||
* a function that receives the input stream format and returns an atom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* a function that receives the input stream format and returns an atom. | |
* a function that receives the input stream format and returns the atom. |
or perhaps it would be even better if you listed all the atoms once again
If set to `:never`, the input media stream won't be neither decoded nor transcoded. | ||
Changing alignment, encapsulation or stream structure is still possible. This option | ||
is helpful when you want to ensure that #{inspect(__MODULE__)} will not use too much | ||
of resources, e.g. CPU or memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention that transcoder will fail if the output format doesn't match input.
lib/transcoder.ex
Outdated
stream format and the output stream format are different types. | ||
This is the default behavior. | ||
If set to `:never`, the input media stream won't be neither decoded nor transcoded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't be encoded
either, for instance in scenario with input: RawVideo
and output: H264
Co-authored-by: Łukasz Kita <[email protected]>
No description provided.