Files
rk_pve/mp4/frame.py
2025-10-03 18:08:00 +02:00

33 lines
1.1 KiB
Python

# 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.
#
# Foobar 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 Foobar.
# If not, see <https://www.gnu.org/licenses/>.
from . import libav
class Frame:
__slots__ = '_ref'
def __init__(self):
self._ref = libav.frame_alloc()
if not self._ref:
raise MemoryError
def __del__(self):
if self._ref:
libav.frame_free(self._ref)
@property
def _as_parameter_(self):
return self._ref