Skip to content
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

Expose bits_per_coded_sample on VideoCodecContext #1203

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions av/video/codeccontext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ cdef class VideoCodecContext(CodecContext):
self.ptr.height = value
self._build_format()

property bits_per_coded_sample:
def __get__(self):
WyattBlue marked this conversation as resolved.
Show resolved Hide resolved
return self.ptr.bits_per_coded_sample

def __set__(self, unsigned int value):
WyattBlue marked this conversation as resolved.
Show resolved Hide resolved
self.ptr.bits_per_coded_sample = value
self._build_format()

property pix_fmt:
"""
The pixel format's name.
Expand Down
2 changes: 2 additions & 0 deletions include/libavcodec/avcodec.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ cdef extern from "libavcodec/avcodec.h" nogil:
int bit_rate_tolerance
int mb_decision

int bits_per_coded_sample

int global_quality
int compression_level

Expand Down
Loading