-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support ffmpeg 7 * you need assembler --------- Co-authored-by: pfeatherstone <pfeatherstone@pf>
- Loading branch information
1 parent
58b5055
commit 3ca155d
Showing
4 changed files
with
40 additions
and
3 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
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
3ca155d
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.
Modularize logic: Wrap the functionality into a function to improve reusability.
Add debug logs: Provide clarity during execution for debugging purposes.
Ensure compatibility: Check for necessary libraries and environment conditions.
def handle_channel_layout_conversion(src_channel_layout, dst_channel_layout, lib_version):
"""
Convert source and destination channel layouts if conditions are met.
Example usage
FF_API_OLD_CHANNEL_LAYOUT = True # Assume this is defined elsewhere
LIBSWRESAMPLE_VERSION_INT = (4, 5, 100) # Example version
AV_VERSION_INT = lambda major, minor, patch: (major, minor, patch) # Simplified version comparator
Example inputs
src_channel_layout = "stereo"
dst_channel_layout = "5.1"
Call the function
handle_channel_layout_conversion(src_channel_layout, dst_channel_layout, LIBSWRESAMPLE_VERSION_INT)