-
Notifications
You must be signed in to change notification settings - Fork 6
Add fast xva_bridge.py script #350
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
base: master
Are you sure you want to change the base?
Conversation
6428f16
to
c67e179
Compare
import logging | ||
from xml.dom import minidom | ||
|
||
import libarchive |
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.
Should the readme mention this requirement? And/or the whole project's python requirements be updated so that everyone can use the script without having to discover the missing dependency at runtime?
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.
I wasn't sure about updating the repo-level requirements since it's not part of the tests, so I'll defer to your preference.
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.
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.
In my opinion, it should be added to the dev dependencies.
uv add --raw 'libarchive-c==5.3'
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.
Updated deps
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.
What to do with the old get_xva_bridge.sh
and set_xva_bridge.sh
? (and the readme which mentions them)
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.
I can update the readme. I think the scripts should stay for now.
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.
For what reason should they stay? The new script is not a full replacement?
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.
There's no reason, it's rather just in case someone needs them. I can also delete them, since personally I won't be using the old scripts.
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.
Deleted. But maybe @gduperrey will have a preference since he's the one using this daily?
e14f860
to
4292c9b
Compare
Signed-off-by: Tu Dinh <[email protected]>
Signed-off-by: Tu Dinh <[email protected]>
4292c9b
to
ea7e39a
Compare
Static binary builder using Nuitka is available here: https://github.com/dinhngtu/xva-bridge-builder |
Add a rewritten XVA bridge getter/setter script using libarchive bindings.
This script streams tar members directly instead of using temporary files, and thus processes XVAs faster than the existing shell scripts, without needing additional disk space (beyond that of the new XVA).
It also uses Python's DOM library to guarantee parsing of
ova.xml
.Tested on
libarchive-c==5.3
. Due to use of library internals, may not work on other versions of libarchive-c.Delete the old bash scripts for XVA editing.