#include "FfmpegWriter.h"
#include "ffmpeg_api.h"
#include <yarp/os/all.h>
#include <yarp/sig/all.h>
#include <yarp/os/Log.h>
#include <yarp/os/LogComponent.h>
#include <cstdlib>
#include <cstring>
#include <cmath>
Go to the source code of this file.
|
static AVStream * | add_audio_stream (AVFormatContext *oc, AVCodecID codec_id) |
|
static void | open_audio (AVFormatContext *oc, AVStream *st) |
|
static void | get_audio_frame (int16_t *samples, int frame_size, int nb_channels) |
|
static void | make_audio_frame (AVCodecContext *c, AVFrame *&frame, void *&samples) |
|
static void | write_audio_frame (AVFormatContext *oc, AVStream *st) |
|
static void | write_audio_frame (AVFormatContext *oc, AVStream *st, Sound &snd) |
|
static void | close_audio (AVFormatContext *oc, AVStream *st) |
|
static AVStream * | add_video_stream (AVFormatContext *oc, AVCodecID codec_id, int w, int h, int framerate) |
|
static AVFrame * | alloc_picture (int pix_fmt, int width, int height) |
|
static void | fill_rgb_image (AVFrame *pict, int frame_index, int width, int height, ImageOf< PixelRgb > &img) |
|
◆ M_PI
#define M_PI 3.1415926535897931 |
◆ STREAM_FRAME_RATE
#define STREAM_FRAME_RATE 25 /* 25 images/s */ |
◆ STREAM_PIX_FMT
#define STREAM_PIX_FMT AV_PIX_FMT_YUV420P /* default pix_fmt */ |
◆ STREAM_PIX_WORK
#define STREAM_PIX_WORK AV_PIX_FMT_RGB24 |
◆ add_audio_stream()
static AVStream* add_audio_stream |
( |
AVFormatContext * |
oc, |
|
|
AVCodecID |
codec_id |
|
) |
| |
|
static |
◆ add_video_stream()
static AVStream* add_video_stream |
( |
AVFormatContext * |
oc, |
|
|
AVCodecID |
codec_id, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
framerate |
|
) |
| |
|
static |
◆ alloc_picture()
static AVFrame* alloc_picture |
( |
int |
pix_fmt, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
static |
◆ close_audio()
static void close_audio |
( |
AVFormatContext * |
oc, |
|
|
AVStream * |
st |
|
) |
| |
|
static |
◆ fill_rgb_image()
static void fill_rgb_image |
( |
AVFrame * |
pict, |
|
|
int |
frame_index, |
|
|
int |
width, |
|
|
int |
height, |
|
|
ImageOf< PixelRgb > & |
img |
|
) |
| |
|
static |
◆ get_audio_frame()
static void get_audio_frame |
( |
int16_t * |
samples, |
|
|
int |
frame_size, |
|
|
int |
nb_channels |
|
) |
| |
|
static |
◆ make_audio_frame()
static void make_audio_frame |
( |
AVCodecContext * |
c, |
|
|
AVFrame *& |
frame, |
|
|
void *& |
samples |
|
) |
| |
|
static |
◆ open_audio()
static void open_audio |
( |
AVFormatContext * |
oc, |
|
|
AVStream * |
st |
|
) |
| |
|
static |
◆ write_audio_frame() [1/2]
static void write_audio_frame |
( |
AVFormatContext * |
oc, |
|
|
AVStream * |
st |
|
) |
| |
|
static |
◆ write_audio_frame() [2/2]
static void write_audio_frame |
( |
AVFormatContext * |
oc, |
|
|
AVStream * |
st, |
|
|
Sound & |
snd |
|
) |
| |
|
static |
◆ audio_input_frame_size
int audio_input_frame_size |
◆ audio_outbuf
◆ audio_outbuf_size
◆ samples
◆ samples_at
◆ samples_channels
◆ samples_size
◆ tincr
◆ tincr2