Skip to content

Commit

Permalink
Sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Nov 18, 2024
1 parent 0310a7c commit bcf60b2
Show file tree
Hide file tree
Showing 74 changed files with 1,295 additions and 985 deletions.
67 changes: 0 additions & 67 deletions .github/ISSUE_TEMPLATE/build-bug-report.md

This file was deleted.

62 changes: 0 additions & 62 deletions .github/ISSUE_TEMPLATE/ffmpeg-feature-request.md

This file was deleted.

32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/pyav-feature-request.md

This file was deleted.

66 changes: 0 additions & 66 deletions .github/ISSUE_TEMPLATE/runtime-bug-report.md

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: "3.12"

- name: Linters
run: make lint
Expand All @@ -34,9 +34,11 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, python: "3.9", ffmpeg: "7.1", extras: true}
- {os: ubuntu-latest, python: "3.12", ffmpeg: "7.1", extras: true}
- {os: ubuntu-latest, python: "3.9", ffmpeg: "7.0.2"}
- {os: ubuntu-latest, python: pypy3.9, ffmpeg: "7.1"}
- {os: macos-14, python: "3.9", ffmpeg: "7.1"}
- {os: macos-14, python: "3.9", ffmpeg: "7.0.2"}

env:
PYAV_PYTHON: python${{ matrix.config.python }}
Expand All @@ -57,7 +59,7 @@ jobs:
ubuntu-latest)
sudo apt-get update
sudo apt-get install autoconf automake build-essential cmake \
libtool pkg-config yasm zlib1g-dev libvorbis-dev libx264-dev
libtool pkg-config nasm zlib1g-dev libvorbis-dev libx264-dev
if [[ "${{ matrix.config.extras }}" ]]; then
sudo apt-get install doxygen wget
fi
Expand Down Expand Up @@ -109,7 +111,8 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, python: "3.10", ffmpeg: "7.1"}
- {os: windows-latest, python: "3.9", ffmpeg: "7.1"}
- {os: windows-latest, python: "3.9", ffmpeg: "7.0"}

steps:
- name: Checkout
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.9"
- name: Build source package
run: |
pip install cython
Expand All @@ -32,6 +32,8 @@ jobs:
arch: arm64
- os: macos-13
arch: x86_64
- os: ubuntu-latest
arch: aarch64
- os: ubuntu-latest
arch: i686
- os: ubuntu-latest
Expand All @@ -42,23 +44,25 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.9"
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v3
- name: Install packages
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
if: matrix.os == 'macos-13'
run: |
brew update
brew install pkg-config
- name: Set deployment target
- name: Set Minimum MacOS Target
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
run: echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV
run: |
echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV
- name: Build wheels
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb
CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
CIBW_BEFORE_BUILD_MACOS: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-7.1.json C:\cibw\vendor
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LDFLAGS ?= ""
CFLAGS ?= "-O0 -Wno-incompatible-function-pointer-types"
CFLAGS ?= "-O0 -Wno-incompatible-pointer-types -Wno-unreachable-code"

PYAV_PYTHON ?= python
PYAV_PIP ?= pip
Expand All @@ -13,7 +13,7 @@ default: build


build:
$(PIP) install --upgrade cython
$(PIP) install -U cython setuptools
CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(PYTHON) setup.py build_ext --inplace --debug

clean:
Expand All @@ -28,7 +28,7 @@ fate-suite:
rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/assets/fate-suite/

lint:
$(PIP) install -U black isort flake8 flake8-pyproject pillow numpy mypy==1.11.2 pytest
$(PIP) install -U black isort flake8 flake8-pyproject pillow numpy mypy==1.13.0 pytest
black --check av examples tests setup.py
flake8 av
isort --check-only --diff av examples tests
Expand Down
3 changes: 0 additions & 3 deletions av/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
from av.video.frame import VideoFrame
from av.video.stream import VideoStream

# Backwards compatibility
AVError = FFmpegError # noqa: F405

__all__ = (
"__version__",
"time_base",
Expand Down
2 changes: 1 addition & 1 deletion av/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "13.1.0"
__version__ = "14.0.0rc1"
4 changes: 4 additions & 0 deletions av/audio/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .frame import AudioFrame
from .stream import AudioStream

__all__ = ("AudioFrame", "AudioStream")
5 changes: 0 additions & 5 deletions av/audio/codeccontext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ cdef class AudioCodecContext(CodecContext):
cdef _init(self, lib.AVCodecContext *ptr, const lib.AVCodec *codec):
CodecContext._init(self, ptr, codec)

cdef _set_default_time_base(self):
self.ptr.time_base.num = 1
self.ptr.time_base.den = self.ptr.sample_rate

cdef _prepare_frames_for_encode(self, Frame input_frame):

cdef AudioFrame frame = input_frame

cdef bint allow_var_frame_size = self.ptr.codec.capabilities & lib.AV_CODEC_CAP_VARIABLE_FRAME_SIZE

# Note that the resampler will simply return an input frame if there is
Expand Down
Loading

0 comments on commit bcf60b2

Please sign in to comment.