FFmpeg
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include "config.h"
#include <GL/gl.h>
#include <GL/glext.h>
#include "libavutil/common.h"
#include "libavutil/frame.h"
#include "libavutil/pixdesc.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavformat/mux.h"
#include "libavdevice/avdevice.h"
#include "opengl_enc_shaders.h"
Go to the source code of this file.
Data Structures | |
struct | FFOpenGLFunctions |
struct | OpenGLVertexInfo |
struct | OpenGLContext |
struct | OpenGLFormatDesc |
Macros | |
#define | APIENTRY |
#define | FF_GL_RED_COMPONENT 0x1903; |
#define | FF_GL_UNSIGNED_BYTE_3_3_2 0x8032 |
#define | FF_GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 |
#define | FF_GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 |
#define | FF_GL_UNPACK_ROW_LENGTH 0x0CF2 |
#define | FF_GL_ARRAY_BUFFER 0x8892 |
#define | FF_GL_ELEMENT_ARRAY_BUFFER 0x8893 |
#define | FF_GL_STATIC_DRAW 0x88E4 |
#define | FF_GL_FRAGMENT_SHADER 0x8B30 |
#define | FF_GL_VERTEX_SHADER 0x8B31 |
#define | FF_GL_COMPILE_STATUS 0x8B81 |
#define | FF_GL_LINK_STATUS 0x8B82 |
#define | FF_GL_INFO_LOG_LENGTH 0x8B84 |
#define | OPENGL_ERROR_CHECK(ctx) |
#define | LOAD_OPENGL_FUN(name, type) |
#define | FILL_COMPONENT(i) |
#define | LOAD_TEXTURE_DATA(comp_index, sub) |
#define | OFFSET(x) offsetof(OpenGLContext, x) |
#define | ENC AV_OPT_FLAG_ENCODING_PARAM |
Typedefs | |
typedef void(APIENTRY * | FF_PFNGLACTIVETEXTUREPROC) (GLenum texture) |
typedef void(APIENTRY * | FF_PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers) |
typedef void(APIENTRY * | FF_PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers) |
typedef void(APIENTRY * | FF_PFNGLBUFFERDATAPROC) (GLenum target, ptrdiff_t size, const GLvoid *data, GLenum usage) |
typedef void(APIENTRY * | FF_PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer) |
typedef GLint(APIENTRY * | FF_PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const char *name) |
typedef void(APIENTRY * | FF_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index) |
typedef void(APIENTRY * | FF_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t pointer) |
typedef GLint(APIENTRY * | FF_PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const char *name) |
typedef void(APIENTRY * | FF_PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0) |
typedef void(APIENTRY * | FF_PFNGLUNIFORM1IPROC) (GLint location, GLint v0) |
typedef void(APIENTRY * | FF_PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) |
typedef GLuint(APIENTRY * | FF_PFNGLCREATEPROGRAMPROC) (void) |
typedef void(APIENTRY * | FF_PFNGLDELETEPROGRAMPROC) (GLuint program) |
typedef void(APIENTRY * | FF_PFNGLUSEPROGRAMPROC) (GLuint program) |
typedef void(APIENTRY * | FF_PFNGLLINKPROGRAMPROC) (GLuint program) |
typedef void(APIENTRY * | FF_PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params) |
typedef void(APIENTRY * | FF_PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog) |
typedef void(APIENTRY * | FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader) |
typedef GLuint(APIENTRY * | FF_PFNGLCREATESHADERPROC) (GLenum type) |
typedef void(APIENTRY * | FF_PFNGLDELETESHADERPROC) (GLuint shader) |
typedef void(APIENTRY * | FF_PFNGLCOMPILESHADERPROC) (GLuint shader) |
typedef void(APIENTRY * | FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char **string, const GLint *length) |
typedef void(APIENTRY * | FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params) |
typedef void(APIENTRY * | FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog) |
Variables | |
static const GLushort | g_index [6] |
static const struct OpenGLFormatDesc | opengl_format_desc [] |
static const AVOption | options [] |
static const AVClass | opengl_class |
const FFOutputFormat | ff_opengl_muxer |
#define APIENTRY |
Definition at line 64 of file opengl_enc.c.
#define FF_GL_RED_COMPONENT 0x1903; |
Definition at line 79 of file opengl_enc.c.
#define FF_GL_UNSIGNED_BYTE_3_3_2 0x8032 |
Definition at line 83 of file opengl_enc.c.
#define FF_GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 |
Definition at line 84 of file opengl_enc.c.
#define FF_GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 |
Definition at line 85 of file opengl_enc.c.
#define FF_GL_UNPACK_ROW_LENGTH 0x0CF2 |
Definition at line 86 of file opengl_enc.c.
#define FF_GL_ARRAY_BUFFER 0x8892 |
Definition at line 89 of file opengl_enc.c.
#define FF_GL_ELEMENT_ARRAY_BUFFER 0x8893 |
Definition at line 90 of file opengl_enc.c.
#define FF_GL_STATIC_DRAW 0x88E4 |
Definition at line 91 of file opengl_enc.c.
#define FF_GL_FRAGMENT_SHADER 0x8B30 |
Definition at line 92 of file opengl_enc.c.
#define FF_GL_VERTEX_SHADER 0x8B31 |
Definition at line 93 of file opengl_enc.c.
#define FF_GL_COMPILE_STATUS 0x8B81 |
Definition at line 94 of file opengl_enc.c.
#define FF_GL_LINK_STATUS 0x8B82 |
Definition at line 95 of file opengl_enc.c.
#define FF_GL_INFO_LOG_LENGTH 0x8B84 |
Definition at line 96 of file opengl_enc.c.
#define OPENGL_ERROR_CHECK | ( | ctx | ) |
Definition at line 151 of file opengl_enc.c.
#define FILL_COMPONENT | ( | i | ) |
#define LOAD_TEXTURE_DATA | ( | comp_index, | |
sub | |||
) |
Definition at line 1169 of file opengl_enc.c.
#define OFFSET | ( | x | ) | offsetof(OpenGLContext, x) |
Definition at line 1293 of file opengl_enc.c.
#define ENC AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 1294 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLACTIVETEXTUREPROC) (GLenum texture) |
Definition at line 97 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers) |
Definition at line 98 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers) |
Definition at line 99 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLBUFFERDATAPROC) (GLenum target, ptrdiff_t size, const GLvoid *data, GLenum usage) |
Definition at line 100 of file opengl_enc.c.
Definition at line 101 of file opengl_enc.c.
Definition at line 102 of file opengl_enc.c.
Definition at line 103 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t pointer) |
Definition at line 104 of file opengl_enc.c.
Definition at line 105 of file opengl_enc.c.
Definition at line 106 of file opengl_enc.c.
Definition at line 107 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) |
Definition at line 108 of file opengl_enc.c.
typedef GLuint(APIENTRY * FF_PFNGLCREATEPROGRAMPROC) (void) |
Definition at line 109 of file opengl_enc.c.
Definition at line 110 of file opengl_enc.c.
Definition at line 111 of file opengl_enc.c.
Definition at line 112 of file opengl_enc.c.
Definition at line 113 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog) |
Definition at line 114 of file opengl_enc.c.
Definition at line 115 of file opengl_enc.c.
Definition at line 116 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLDELETESHADERPROC) (GLuint shader) |
Definition at line 117 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLCOMPILESHADERPROC) (GLuint shader) |
Definition at line 118 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char **string, const GLint *length) |
Definition at line 119 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params) |
Definition at line 120 of file opengl_enc.c.
typedef void(APIENTRY * FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog) |
Definition at line 121 of file opengl_enc.c.
|
static |
Definition at line 865 of file opengl_enc.c.
Referenced by opengl_resize(), and opengl_write_header().
|
static |
Definition at line 1207 of file opengl_enc.c.
Referenced by opengl_resize(), opengl_write_frame(), and opengl_write_packet().
|
static |
Definition at line 999 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 285 of file opengl_enc.c.
Referenced by opengl_write_trailer().
|
static |
Definition at line 311 of file opengl_enc.c.
Referenced by opengl_control_message().
|
static |
Definition at line 331 of file opengl_enc.c.
|
static |
Definition at line 492 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 547 of file opengl_enc.c.
Referenced by opengl_prepare_vertex().
|
static |
Definition at line 553 of file opengl_enc.c.
Referenced by opengl_prepare_vertex().
|
static |
Definition at line 573 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 633 of file opengl_enc.c.
Referenced by opengl_compile_shaders().
|
static |
Definition at line 643 of file opengl_enc.c.
Referenced by opengl_get_plane_pointer().
|
static |
Definition at line 659 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 671 of file opengl_enc.c.
Referenced by opengl_prepare_vertex().
|
static |
Definition at line 695 of file opengl_enc.c.
Referenced by opengl_configure_texture(), and opengl_prepare_vertex().
|
static |
Definition at line 713 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 745 of file opengl_enc.c.
Referenced by opengl_compile_shaders().
|
static |
Definition at line 776 of file opengl_enc.c.
Referenced by opengl_init_context().
|
static |
Definition at line 845 of file opengl_enc.c.
Referenced by opengl_init_context().
|
static |
Definition at line 910 of file opengl_enc.c.
Referenced by opengl_draw().
|
static |
Definition at line 935 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 968 of file opengl_enc.c.
Referenced by opengl_write_trailer().
|
static |
Definition at line 985 of file opengl_enc.c.
Referenced by opengl_write_header().
|
static |
Definition at line 1058 of file opengl_enc.c.
|
static |
Definition at line 1140 of file opengl_enc.c.
|
static |
Definition at line 1274 of file opengl_enc.c.
|
static |
Definition at line 1285 of file opengl_enc.c.
|
static |
Definition at line 167 of file opengl_enc.c.
Referenced by opengl_draw(), and opengl_init_context().
|
static |
Referenced by opengl_get_fragment_shader_code(), and opengl_get_texture_params().
|
static |
Definition at line 1295 of file opengl_enc.c.
|
static |
Definition at line 1303 of file opengl_enc.c.
const FFOutputFormat ff_opengl_muxer |
Definition at line 1311 of file opengl_enc.c.