Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master: lavd: add opengl device lavd: add avdevice_dev_to_app_control_message API lavd: add avdevice_app_to_dev_control_message API Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
c94ed2a729
@ -21,6 +21,7 @@ version <next>
|
||||
- framepack filter
|
||||
- XYZ12 rawvideo support in NUT
|
||||
- Exif metadata support in WebP decoder
|
||||
- OpenGL device
|
||||
|
||||
|
||||
version 2.1:
|
||||
|
13
configure
vendored
13
configure
vendored
@ -251,6 +251,7 @@ External library support:
|
||||
--enable-libzvbi enable teletext support via libzvbi [no]
|
||||
--enable-openal enable OpenAL 1.1 capture support [no]
|
||||
--enable-opencl enable OpenCL code
|
||||
--enable-opengl enable OpenGL rendering [no]
|
||||
--enable-openssl enable openssl [no]
|
||||
--enable-x11grab enable X11 grabbing [no]
|
||||
--disable-zlib disable zlib [autodetect]
|
||||
@ -1311,6 +1312,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libzvbi
|
||||
openal
|
||||
opencl
|
||||
opengl
|
||||
openssl
|
||||
x11grab
|
||||
zlib
|
||||
@ -1554,6 +1556,7 @@ HAVE_LIST="
|
||||
dxva_h
|
||||
ebp_available
|
||||
ebx_available
|
||||
ES2_gl_h
|
||||
fast_64bit
|
||||
fast_clz
|
||||
fast_cmov
|
||||
@ -1570,6 +1573,7 @@ HAVE_LIST="
|
||||
getservbyport
|
||||
gettimeofday
|
||||
glob
|
||||
glXGetProcAddress
|
||||
gnu_as
|
||||
gnu_windres
|
||||
gsm_h
|
||||
@ -1603,6 +1607,7 @@ HAVE_LIST="
|
||||
mprotect
|
||||
nanosleep
|
||||
openjpeg_1_5_openjpeg_h
|
||||
OpenGL_gl3_h
|
||||
PeekNamedPipe
|
||||
perl
|
||||
pod2man
|
||||
@ -1656,6 +1661,7 @@ HAVE_LIST="
|
||||
vdpau_x11
|
||||
vfp_args
|
||||
VirtualAlloc
|
||||
wglGetProcAddress
|
||||
windows_h
|
||||
winsock2_h
|
||||
xform_asm
|
||||
@ -2262,6 +2268,7 @@ libcdio_indev_deps="libcdio"
|
||||
libdc1394_indev_deps="libdc1394"
|
||||
libv4l2_indev_deps="libv4l2"
|
||||
openal_indev_deps="openal"
|
||||
opengl_outdev_deps="opengl"
|
||||
oss_indev_deps_any="soundcard_h sys_soundcard_h"
|
||||
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
|
||||
pulse_indev_deps="libpulse"
|
||||
@ -4498,6 +4505,12 @@ enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl
|
||||
{ check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
|
||||
check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
|
||||
die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
|
||||
enabled opengl && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
|
||||
check_lib2 windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
|
||||
check_lib2 OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
|
||||
check_lib2 ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
|
||||
die "ERROR: opengl not found."
|
||||
}
|
||||
enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
|
||||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
|
||||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
|
||||
|
@ -149,6 +149,41 @@ ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
|
||||
|
||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
||||
|
||||
@section opengl
|
||||
OpenGL output device.
|
||||
|
||||
To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
|
||||
|
||||
Device allows to render to OpenGL context.
|
||||
Context may be provided by application or default SDL window is created.
|
||||
|
||||
When device renders to external context, application must implement handlers for following messages:
|
||||
@code{AV_CTL_MESSAGE_CREATE_WINDOW_BUFFER} - create OpenGL context on current thread.
|
||||
@code{AV_CTL_MESSAGE_PREPARE_WINDOW_BUFFER} - make OpenGL context current.
|
||||
@code{AV_CTL_MESSAGE_DISPLAY_WINDOW_BUFFER} - swap buffers.
|
||||
@code{AV_CTL_MESSAGE_DESTROY_WINDOW_BUFFER} - destroy OpenGL context.
|
||||
Application is also required to inform a device about current resolution by sending @code{AV_DEVICE_WINDOW_RESIZED} message.
|
||||
|
||||
@subsection Options
|
||||
@table @option
|
||||
|
||||
@item background
|
||||
Set background color. Black is a default.
|
||||
@item no_window
|
||||
Disables default SDL window when set to non-zero value.
|
||||
Application must provide OpenGL context and both @code{window_size_cb} and @code{window_swap_buffers_cb} callbacks when set.
|
||||
@item window_title
|
||||
Set the SDL window title, if not specified default to the filename specified for the output device.
|
||||
Ignored when @option{no_window} is set.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
Play a file on SDL window using OpenGL rendering:
|
||||
@example
|
||||
ffmpeg -i INPUT -f opengl "window title"
|
||||
@end example
|
||||
|
||||
@section oss
|
||||
|
||||
OSS (Open Sound System) output device.
|
||||
|
@ -29,6 +29,7 @@ OBJS-$(CONFIG_IEC61883_INDEV) += iec61883.o
|
||||
OBJS-$(CONFIG_JACK_INDEV) += jack_audio.o timefilter.o
|
||||
OBJS-$(CONFIG_LAVFI_INDEV) += lavfi.o
|
||||
OBJS-$(CONFIG_OPENAL_INDEV) += openal-dec.o
|
||||
OBJS-$(CONFIG_OPENGL_OUTDEV) += opengl_enc.o
|
||||
OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o
|
||||
OBJS-$(CONFIG_OSS_OUTDEV) += oss_audio.o
|
||||
OBJS-$(CONFIG_PULSE_INDEV) += pulse_audio_dec.o \
|
||||
|
@ -56,6 +56,7 @@ void avdevice_register_all(void)
|
||||
REGISTER_INDEV (JACK, jack);
|
||||
REGISTER_INDEV (LAVFI, lavfi);
|
||||
REGISTER_INDEV (OPENAL, openal);
|
||||
REGISTER_OUTDEV (OPENGL, opengl);
|
||||
REGISTER_INOUTDEV(OSS, oss);
|
||||
REGISTER_INOUTDEV(PULSE, pulse);
|
||||
REGISTER_OUTDEV (SDL, sdl);
|
||||
|
@ -36,3 +36,19 @@ const char * avdevice_license(void)
|
||||
#define LICENSE_PREFIX "libavdevice license: "
|
||||
return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
|
||||
}
|
||||
|
||||
int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,
|
||||
void *data, size_t data_size)
|
||||
{
|
||||
if (!s->oformat || !s->oformat->control_message)
|
||||
return AVERROR(ENOSYS);
|
||||
return s->oformat->control_message(s, type, data, data_size);
|
||||
}
|
||||
|
||||
int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type,
|
||||
void *data, size_t data_size)
|
||||
{
|
||||
if (!s->control_message_cb)
|
||||
return AVERROR(ENOSYS);
|
||||
return s->control_message_cb(s, type, data, data_size);
|
||||
}
|
||||
|
@ -66,4 +66,124 @@ const char *avdevice_license(void);
|
||||
*/
|
||||
void avdevice_register_all(void);
|
||||
|
||||
typedef struct AVDeviceRect {
|
||||
int x; /**< x coordinate of top left corner */
|
||||
int y; /**< y coordinate of top left corner */
|
||||
int width; /**< width */
|
||||
int height; /**< height */
|
||||
} AVDeviceRect;
|
||||
|
||||
/**
|
||||
* Message types used by avdevice_app_to_dev_control_message().
|
||||
*/
|
||||
enum AVAppToDevMessageType {
|
||||
/**
|
||||
* Dummy message.
|
||||
*/
|
||||
AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
|
||||
|
||||
/**
|
||||
* Window size change message.
|
||||
*
|
||||
* Message is sent to the device every time the application changes the size
|
||||
* of the window device renders to.
|
||||
* Message should also be sent right after window is created.
|
||||
*
|
||||
* data: AVDeviceRect: new window size.
|
||||
*/
|
||||
AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
|
||||
|
||||
/**
|
||||
* Repaint request message.
|
||||
*
|
||||
* Message is sent to the device when window have to be rapainted.
|
||||
*
|
||||
* data: AVDeviceRect: area required to be repainted.
|
||||
* NULL: whole area is required to be repainted.
|
||||
*/
|
||||
AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A')
|
||||
};
|
||||
|
||||
/**
|
||||
* Message types used by avdevice_dev_to_app_control_message().
|
||||
*/
|
||||
enum AVDevToAppMessageType {
|
||||
/**
|
||||
* Dummy message.
|
||||
*/
|
||||
AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
|
||||
|
||||
/**
|
||||
* Create window buffer message.
|
||||
*
|
||||
* Device requests to create a window buffer. Exact meaning is device-
|
||||
* and application-dependent. Message is sent before rendering first
|
||||
* frame and all one-shot initializations should be done here.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),
|
||||
|
||||
/**
|
||||
* Prepare window buffer message.
|
||||
*
|
||||
* Device requests to prepare a window buffer for rendering.
|
||||
* Exact meaning is device- and application-dependent.
|
||||
* Message is sent before rendering of each frame.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),
|
||||
|
||||
/**
|
||||
* Display window buffer message.
|
||||
*
|
||||
* Device requests to display a window buffer.
|
||||
* Message is sent when new frame is ready to be displyed.
|
||||
* Usually buffers need to be swapped in handler of this message.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),
|
||||
|
||||
/**
|
||||
* Destroy window buffer message.
|
||||
*
|
||||
* Device requests to destroy a window buffer.
|
||||
* Message is sent when device is about to be destroyed and window
|
||||
* buffer is not required anymore.
|
||||
*
|
||||
* data: NULL.
|
||||
*/
|
||||
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S')
|
||||
};
|
||||
|
||||
/**
|
||||
* Send control message from application to device.
|
||||
*
|
||||
* @param s device context.
|
||||
* @param type message type.
|
||||
* @param data message data. Exact type depends on message type.
|
||||
* @param data_size size of message data.
|
||||
* @return >= 0 on success, negative on error.
|
||||
* AVERROR(ENOSYS) when device doesn't implement handler of the message.
|
||||
*/
|
||||
int avdevice_app_to_dev_control_message(struct AVFormatContext *s,
|
||||
enum AVAppToDevMessageType type,
|
||||
void *data, size_t data_size);
|
||||
|
||||
/**
|
||||
* Send control message from device to application.
|
||||
*
|
||||
* @param s device context.
|
||||
* @param type message type.
|
||||
* @param data message data. Can be NULL.
|
||||
* @param data_size size of message data.
|
||||
* @return >= 0 on success, negative on error.
|
||||
* AVERROR(ENOSYS) when application doesn't implement handler of the message.
|
||||
*/
|
||||
int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
|
||||
enum AVDevToAppMessageType type,
|
||||
void *data, size_t data_size);
|
||||
|
||||
#endif /* AVDEVICE_AVDEVICE_H */
|
||||
|
1221
libavdevice/opengl_enc.c
Normal file
1221
libavdevice/opengl_enc.c
Normal file
File diff suppressed because it is too large
Load Diff
176
libavdevice/opengl_enc_shaders.h
Normal file
176
libavdevice/opengl_enc_shaders.h
Normal file
@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Lukasz Marek
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVDEVICE_OPENGL_SHADERS_H
|
||||
#define AVDEVICE_OPENGL_SHADERS_H
|
||||
|
||||
#include "libavutil/pixfmt.h"
|
||||
|
||||
const char *FF_OPENGL_VERTEX_SHADER =
|
||||
"uniform mat4 u_projectionMatrix;"
|
||||
"uniform mat4 u_modelViewMatrix;"
|
||||
|
||||
"attribute vec4 a_position;"
|
||||
"attribute vec2 a_textureCoords;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"gl_Position = u_projectionMatrix * (a_position * u_modelViewMatrix);"
|
||||
"texture_coordinate = a_textureCoords;"
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for packet RGBA formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform mat4 u_colorMap;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"gl_FragColor = texture2D(u_texture0, texture_coordinate) * u_colorMap;"
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for packet RGB formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform mat4 u_colorMap;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"gl_FragColor = vec4((texture2D(u_texture0, texture_coordinate) * u_colorMap).rgb, 1.0);"
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for planar RGBA formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform sampler2D u_texture1;"
|
||||
"uniform sampler2D u_texture2;"
|
||||
"uniform sampler2D u_texture3;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r,"
|
||||
"texture2D(u_texture1, texture_coordinate).r,"
|
||||
"texture2D(u_texture2, texture_coordinate).r,"
|
||||
"texture2D(u_texture3, texture_coordinate).r);"
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for planar RGB formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform sampler2D u_texture1;"
|
||||
"uniform sampler2D u_texture2;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r,"
|
||||
"texture2D(u_texture1, texture_coordinate).r,"
|
||||
"texture2D(u_texture2, texture_coordinate).r,"
|
||||
"1.0);"
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for planar YUV formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform sampler2D u_texture1;"
|
||||
"uniform sampler2D u_texture2;"
|
||||
"uniform float u_chroma_div_w;"
|
||||
"uniform float u_chroma_div_h;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"vec3 yuv;"
|
||||
|
||||
"yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;"
|
||||
"yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
|
||||
"yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
|
||||
|
||||
"gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643,"
|
||||
"0.0, -0.39173, 2.0170,"
|
||||
"1.5958, -0.81290, 0.0) * yuv, 1.0), 0.0, 1.0);"
|
||||
|
||||
"}";
|
||||
|
||||
/**
|
||||
* Fragment shader for planar YUVA formats.
|
||||
*/
|
||||
const char *FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR =
|
||||
#if defined(GL_ES_VERSION_2_0)
|
||||
"precision mediump float;"
|
||||
#endif
|
||||
"uniform sampler2D u_texture0;"
|
||||
"uniform sampler2D u_texture1;"
|
||||
"uniform sampler2D u_texture2;"
|
||||
"uniform sampler2D u_texture3;"
|
||||
"uniform float u_chroma_div_w;"
|
||||
"uniform float u_chroma_div_h;"
|
||||
|
||||
"varying vec2 texture_coordinate;"
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
"vec3 yuv;"
|
||||
|
||||
"yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;"
|
||||
"yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
|
||||
"yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
|
||||
|
||||
"gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643,"
|
||||
"0.0, -0.39173, 2.0170,"
|
||||
"1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);"
|
||||
"}";
|
||||
|
||||
#endif /* AVDEVICE_OPENGL_SHADERS_H */
|
@ -28,8 +28,8 @@
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MAJOR 55
|
||||
#define LIBAVDEVICE_VERSION_MINOR 5
|
||||
#define LIBAVDEVICE_VERSION_MICRO 102
|
||||
#define LIBAVDEVICE_VERSION_MINOR 7
|
||||
#define LIBAVDEVICE_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
|
@ -453,6 +453,11 @@ typedef struct AVOutputFormat {
|
||||
|
||||
void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
|
||||
int64_t *dts, int64_t *wall);
|
||||
/**
|
||||
* Allows sending messages from application to device.
|
||||
*/
|
||||
int (*control_message)(struct AVFormatContext *s, int type,
|
||||
void *data, size_t data_size);
|
||||
} AVOutputFormat;
|
||||
/**
|
||||
* @}
|
||||
@ -947,6 +952,13 @@ typedef struct AVChapter {
|
||||
} AVChapter;
|
||||
|
||||
|
||||
/**
|
||||
* Callback used by devices to communicate with application.
|
||||
*/
|
||||
typedef int (*av_format_control_message)(struct AVFormatContext *s, int type,
|
||||
void *data, size_t data_size);
|
||||
|
||||
|
||||
/**
|
||||
* The duration of a video can be estimated through various ways, and this enum can be used
|
||||
* to know how the duration was estimated.
|
||||
@ -1355,6 +1367,19 @@ typedef struct AVFormatContext {
|
||||
* Muxing: Set by user via av_format_set_metadata_header_padding.
|
||||
*/
|
||||
int metadata_header_padding;
|
||||
|
||||
/**
|
||||
* User data.
|
||||
* This is a place for some private data of the user.
|
||||
* Mostly usable with control_message_cb or any future callbacks in device's context.
|
||||
*/
|
||||
void *opaque;
|
||||
|
||||
/**
|
||||
* Callback used by devices to communicate with application.
|
||||
*/
|
||||
av_format_control_message control_message_cb;
|
||||
|
||||
} AVFormatContext;
|
||||
|
||||
int av_format_get_probe_score(const AVFormatContext *s);
|
||||
@ -1366,6 +1391,10 @@ AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s);
|
||||
void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c);
|
||||
int av_format_get_metadata_header_padding(const AVFormatContext *s);
|
||||
void av_format_set_metadata_header_padding(AVFormatContext *s, int c);
|
||||
void * av_format_get_opaque(const AVFormatContext *s);
|
||||
void av_format_set_opaque(AVFormatContext *s, void *opaque);
|
||||
av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);
|
||||
void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);
|
||||
|
||||
/**
|
||||
* Returns the method used to set ctx->duration.
|
||||
|
@ -107,6 +107,8 @@ MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
|
||||
|
||||
static AVCodec *find_decoder(AVFormatContext *s, AVStream *st, enum AVCodecID codec_id)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "libavutil/version.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 55
|
||||
#define LIBAVFORMAT_VERSION_MINOR 26
|
||||
#define LIBAVFORMAT_VERSION_MINOR 28
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user