Files
rk_pve/pyav/codec.py
2025-10-04 14:52:27 +02:00

43 lines
1.4 KiB
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# People's Video Editor: high quality, GPU accelerated mp4 editor
# Copyright (C) 2025 Roz K <roz@rozk.net>
#
# This file is part of People's Video Editor.
#
# People's Video Editor is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# People's Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with People's Video Editor.
# If not, see <https://www.gnu.org/licenses/>.
class Codec:
__slots__ = '_ref'
def __init__(self, ref):
self._ref = ref
@property
def _as_parameter_(self):
return self._ref
@property
def name(self):
return self._ref.contents.name.decode("utf-8")
@property
def long_name(self):
return self._ref.contents.long_name.decode("utf-8")
@property
def wrapper_name(self):
if self._ref.contents.wrapper_name is not None:
return self._ref.contents.wrapper_name.decode("utf-8")
return "<None>"
def description(self):
return f"{self.name} / {self.long_name} / {self.wrapper_name}"