Functions to encode a movie / render an image from the OpenGL rendering.
More...
#include "global.h"
#include "interface.h"
#include "project.h"
#include "glwindow.h"
#include "glview.h"
#include "movie.h"
Go to the source code of this file.
|
| void | convert_rgb_pixbuf_to_yuv (GdkPixbuf *pixbuf, AVFrame *picture, int w, int h) |
| | convert an RGB pixbuf to an YUV picture frame
|
| |
| void | fill_image (VideoStream *vs, int width, int height, glwin *view) |
| | render an image from an OpenGL rendering
|
| |
| AVCodecContext * | add_codec_context (AVFormatContext *fc, const AVCodec *vc, video_options *vopts) |
| | create a video codec context
|
| |
| VideoStream * | add_video_stream (AVFormatContext *fc, const AVCodec *vc, video_options *vopts) |
| | create video stream and the associated data buffers
|
| |
| void | set_old_cmap (image *img, int stp, int id) |
| | preserve color map information
|
| |
| gboolean | check_to_update_shaders (glwin *view, image *img_a, image *img_b, int ogl_q) |
| | test if it is required to update the OpenGL shaders, and which one(s)
|
| |
| gboolean | create_movie (glwin *view, video_options *vopts, gchar *videofile) |
| | render a movie from the saved animation parameters
|
| |
| void | init_frame_buffer (int x, int y) |
| | init a frame buffer
|
| |
| void | close_frame_buffer () |
| | close the frame buffer
|
| |
| G_MODULE_EXPORT void | run_save_movie (GtkDialog *info, gint response_id, gpointer data) |
| | saving a movie - running the dialog
|
| |
| void | save_movie (glwin *view, video_options *vopts) |
| | saving a movie - prepare the dialog
|
| |
Functions to encode a movie / render an image from the OpenGL rendering.
- Author
- Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r
Definition in file movie.c.
◆ AV_ROUND_PASS_MINMAX
| #define AV_ROUND_PASS_MINMAX 8192 |
◆ AVIO_FLAG_READ
◆ AVIO_FLAG_READ_WRITE
◆ AVIO_FLAG_WRITE
| #define AVIO_FLAG_WRITE 2 |
◆ AVS_FRAME_ALIGN
| #define AVS_FRAME_ALIGN 16 |
◆ PIXEL_FORMAT
| #define PIXEL_FORMAT PIX_FMT_YUV420P |
◆ RGB_TO_U
| #define RGB_TO_U |
( |
| pixels, |
|
|
| loc ) |
Value:(-0.16874 * pixels[loc] - 0.33126 * pixels[loc+1] + 0.50000 * pixels[loc+2]+128.0)
Definition at line 75 of file movie.c.
◆ RGB_TO_V
| #define RGB_TO_V |
( |
| pixels, |
|
|
| loc ) |
Value:(0.50000 * pixels[loc] - 0.41869 * pixels[loc+1] - 0.08131 * pixels[loc+2]+128.0)
Definition at line 76 of file movie.c.
◆ RGB_TO_Y
| #define RGB_TO_Y |
( |
| pixels, |
|
|
| loc ) |
Value:(0.29900 * pixels[loc] + 0.58700 * pixels[loc+1] + 0.11400 * pixels[loc+2])
Definition at line 74 of file movie.c.
◆ URL_WRONLY
◆ add_codec_context()
| AVCodecContext * add_codec_context |
( |
AVFormatContext * | fc, |
|
|
const AVCodec * | vc, |
|
|
video_options * | vopts ) |
create a video codec context
- Parameters
-
| fc | the format context |
| vc | the codec |
| vopts | the video encoding options |
Definition at line 396 of file movie.c.
◆ add_video_stream()
create video stream and the associated data buffers
- Parameters
-
| fc | the format context |
| vc | the codec |
| vopts | the video encoding options |
Definition at line 451 of file movie.c.
◆ check_to_update_shaders()
| gboolean check_to_update_shaders |
( |
glwin * | view, |
|
|
image * | img_a, |
|
|
image * | img_b, |
|
|
int | ogl_q ) |
test if it is required to update the OpenGL shaders, and which one(s)
- Parameters
-
| view | the target glwin |
| img_a | the previous image |
| img_b | the next image |
| ogl_q | OpenGL quality |
Definition at line 519 of file movie.c.
◆ close_frame_buffer()
| void close_frame_buffer |
( |
| ) |
|
close the frame buffer
Definition at line 1205 of file movie.c.
◆ convert_rgb_pixbuf_to_yuv()
| void convert_rgb_pixbuf_to_yuv |
( |
GdkPixbuf * | pixbuf, |
|
|
AVFrame * | picture, |
|
|
int | w, |
|
|
int | h ) |
convert an RGB pixbuf to an YUV picture frame
- Parameters
-
| pixbuf | the Gdk RGB pixbuf to convert |
| picture | the AVFrame to store the data |
| w | image width |
| h | image height |
Definition at line 138 of file movie.c.
◆ create_movie()
render a movie from the saved animation parameters
- Parameters
-
| view | the target glwin |
| vopts | the video encoding options |
| videofile | video file name |
Definition at line 1002 of file movie.c.
◆ fill_image()
render an image from an OpenGL rendering
- Parameters
-
| vs | the video stream |
| width | image width |
| height | image height |
| view | the target glwin |
Definition at line 273 of file movie.c.
◆ init_frame_buffer()
| void init_frame_buffer |
( |
int | x, |
|
|
int | y ) |
init a frame buffer
- Parameters
-
| x | x size - image width |
| y | y size - image height |
Definition at line 1177 of file movie.c.
◆ run_save_movie()
| G_MODULE_EXPORT void run_save_movie |
( |
GtkDialog * | info, |
|
|
gint | response_id, |
|
|
gpointer | data ) |
saving a movie - running the dialog
- Parameters
-
| info | the GtkDialog sending the signal |
| response_id | the response id |
| data | the associated data pointer |
Definition at line 1235 of file movie.c.
◆ save_movie()
saving a movie - prepare the dialog
- Parameters
-
| view | the target glwin |
| vopts | the video encoding options |
Definition at line 1290 of file movie.c.
◆ set_old_cmap()
| void set_old_cmap |
( |
image * | img, |
|
|
int | stp, |
|
|
int | id ) |
preserve color map information
- Parameters
-
| img | the target image |
| stp | MD step |
| id | color map id (0 = atom(s), 1 = polyhedra) |
Definition at line 504 of file movie.c.
◆ codec_id
Initial value:= {CODEC_ID_MPEG2VIDEO,
CODEC_ID_MPEG4,
CODEC_ID_H264,
CODEC_ID_THEORA,
CODEC_ID_FLV1}
Definition at line 109 of file movie.c.
◆ codec_list
Initial value:= {"mpeg",
"avi",
"mkv",
"ogv",
"flv"}
Definition at line 96 of file movie.c.
◆ codec_name
Initial value:= {"MPEG-1/2",
"MPEG-4",
"H264",
"Theora",
"Flash"}
Definition at line 90 of file movie.c.
◆ encoding_pb
◆ frame_start
◆ num_frames
◆ old_cmap
◆ pixbuf
◆ video_outbuf
◆ video_outbuf_size