Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion include/libav.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include "libavutil/avutil.pxd"
include "libavutil/buffer.pxd"
include "libavutil/channel_layout.pxd"
include "libavutil/dict.pxd"
include "libavutil/error.pxd"
include "libavutil/frame.pxd"
Expand Down
119 changes: 6 additions & 113 deletions include/libavutil/avutil.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ cdef extern from "libavutil/rational.h" nogil:
cdef int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)

cdef extern from "libavutil/avutil.h" nogil:

cdef const char* av_version_info()
cdef int avutil_version()
cdef char* avutil_configuration()
Expand Down Expand Up @@ -107,13 +106,9 @@ cdef extern from "libavutil/avutil.h" nogil:
AVCOL_TRC_ARIB_STD_B67
AVCOL_TRC_NB

cdef double M_PI

cdef void* av_malloc(size_t size)
cdef void* av_mallocz(size_t size)
cdef void *av_calloc(size_t nmemb, size_t size)
cdef void *av_realloc(void *ptr, size_t size)

cdef void* av_realloc(void *ptr, size_t size)
cdef void av_free(void *ptr)
cdef void av_freep(void *ptr)

Expand All @@ -126,56 +121,15 @@ cdef extern from "libavutil/avutil.h" nogil:
AVSampleFormat sample_fmt,
int align
)

# See: http://ffmpeg.org/doxygen/trunk/structAVRational.html
ctypedef struct AVRational:
int num
int den

cdef AVRational AV_TIME_BASE_Q

# Rescales from one time base to another
cdef int64_t av_rescale_q(
int64_t a, # time stamp
AVRational bq, # source time base
AVRational cq # target time base
)

# Rescale a 64-bit integer with specified rounding.
# A simple a*b/c isn't possible as it can overflow
cdef int64_t av_rescale_rnd(
int64_t a,
int64_t b,
int64_t c,
int r # should be AVRounding, but then we can't use bitwise logic.
)

cdef int64_t av_rescale_q_rnd(
int64_t a,
AVRational bq,
AVRational cq,
int r # should be AVRounding, but then we can't use bitwise logic.
)

cdef int64_t av_rescale(
int64_t a,
int64_t b,
int64_t c
)

cdef char* av_strdup(char *s)

cdef int av_opt_set_int(
void *obj,
char *name,
int64_t value,
int search_flags
)

cdef int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
cdef int64_t av_rescale(int64_t a, int64_t b, int64_t c)
cdef const char* av_get_media_type_string(AVMediaType media_type)

cdef extern from "libavutil/pixdesc.h" nogil:

# See: http://ffmpeg.org/doxygen/trunk/structAVComponentDescriptor.html
cdef struct AVComponentDescriptor:
unsigned int plane
Expand Down Expand Up @@ -215,56 +169,25 @@ cdef extern from "libavutil/pixdesc.h" nogil:
int av_get_padded_bits_per_pixel(AVPixFmtDescriptor *pixdesc)


cdef extern from "libavutil/channel_layout.h" nogil:

# Layouts.
cdef uint64_t av_get_channel_layout(char* name)
cdef int av_get_channel_layout_nb_channels(uint64_t channel_layout)
cdef int64_t av_get_default_channel_layout(int nb_channels)

# Channels.
cdef uint64_t av_channel_layout_extract_channel(uint64_t layout, int index)
cdef char* av_get_channel_name(uint64_t channel)
cdef char* av_get_channel_description(uint64_t channel)


cdef extern from "libavutil/audio_fifo.h" nogil:

cdef struct AVAudioFifo:
pass

cdef void av_audio_fifo_free(AVAudioFifo *af)

cdef AVAudioFifo* av_audio_fifo_alloc(
AVSampleFormat sample_fmt,
int channels,
int nb_samples
AVSampleFormat sample_fmt, int channels, int nb_samples
)

cdef int av_audio_fifo_write(
AVAudioFifo *af,
void **data,
int nb_samples
)

cdef int av_audio_fifo_read(
AVAudioFifo *af,
void **data,
int nb_samples
)

cdef int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
cdef int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
cdef int av_audio_fifo_size(AVAudioFifo *af)
cdef int av_audio_fifo_space (AVAudioFifo *af)


cdef extern from "stdarg.h" nogil:
# For logging. Should really be in another PXD.
ctypedef struct va_list:
pass


cdef extern from "Python.h" nogil:
# For logging. See av/logging.pyx for an explanation.
cdef int Py_AddPendingCall(void *, void *)
void PyErr_PrintEx(int set_sys_last_vars)
int Py_IsInitialized()
Expand Down Expand Up @@ -310,7 +233,6 @@ cdef extern from "libavutil/opt.h" nogil:
AV_OPT_FLAG_FILTERING_PARAM

cdef struct AVOption:

const char *name
const char *help
AVOptionType type
Expand All @@ -325,7 +247,6 @@ cdef extern from "libavutil/opt.h" nogil:


cdef extern from "libavutil/imgutils.h" nogil:

cdef int av_image_alloc(
uint8_t *pointers[4],
int linesizes[4],
Expand All @@ -341,37 +262,12 @@ cdef extern from "libavutil/imgutils.h" nogil:
uint8_t *ptr,
const int linesizes[4]
)
cdef int av_image_fill_linesizes(
int linesizes[4],
AVPixelFormat pix_fmt,
int width,
)


cdef extern from "libavutil/log.h" nogil:

cdef enum AVClassCategory:
AV_CLASS_CATEGORY_NA
AV_CLASS_CATEGORY_INPUT
AV_CLASS_CATEGORY_OUTPUT
AV_CLASS_CATEGORY_MUXER
AV_CLASS_CATEGORY_DEMUXER
AV_CLASS_CATEGORY_ENCODER
AV_CLASS_CATEGORY_DECODER
AV_CLASS_CATEGORY_FILTER
AV_CLASS_CATEGORY_BITSTREAM_FILTER
AV_CLASS_CATEGORY_SWSCALER
AV_CLASS_CATEGORY_SWRESAMPLER
AV_CLASS_CATEGORY_NB

cdef struct AVClass:

const char *class_name
const char *(*item_name)(void*) nogil

AVClassCategory category
int parent_log_context_offset

const AVOption *option

cdef enum:
Expand All @@ -386,10 +282,7 @@ cdef extern from "libavutil/log.h" nogil:
AV_LOG_TRACE
AV_LOG_MAX_OFFSET

# Send a log.
void av_log(void *ptr, int level, const char *fmt, ...)

# Get the logs.
ctypedef void(*av_log_callback)(void *, int, const char *, va_list)
void av_log_default_callback(void *, int, const char *, va_list)
void av_log_set_callback (av_log_callback callback)
Expand Down
11 changes: 0 additions & 11 deletions include/libavutil/channel_layout.pxd

This file was deleted.

Loading