OpenShot Library | libopenshot
0.3.3
|
Source file for FFmpegWriter class. More...
#include <algorithm>
#include <iostream>
#include <cmath>
#include <ctime>
#include <unistd.h>
#include "FFmpegUtilities.h"
#include "FFmpegWriter.h"
#include "Exceptions.h"
#include "Frame.h"
#include "OpenMPUtilities.h"
#include "Settings.h"
#include "ZmqLogger.h"
Go to the source code of this file.
Functions | |
AV_COPY_PARAMS_FROM_CONTEXT (st, video_codec_ctx) | |
for (std::map< std::string, std::string >::iterator iter=info.metadata.begin();iter !=info.metadata.end();++iter) | |
if (!codec) codec | |
if (avcodec_open2(video_codec_ctx, codec, &opts)< 0) throw InvalidCodec("Could not open video codec" | |
if (hw_en_on &&hw_en_supported) | |
if (video_codec_ctx->max_b_frames &&video_codec_ctx->codec_id !=AV_CODEC_ID_MPEG4 &&video_codec_ctx->codec_id !=AV_CODEC_ID_MPEG1VIDEO &&video_codec_ctx->codec_id !=AV_CODEC_ID_MPEG2VIDEO) video_codec_ctx -> max_b_frames=0 | |
Variables | |
codec = avcodec_find_encoder_by_name(info.vcodec.c_str()) | |
AVHWDeviceType | hw_en_av_device_type = AV_HWDEVICE_TYPE_VAAPI |
AVPixelFormat | hw_en_av_pix_fmt = AV_PIX_FMT_NONE |
int | hw_en_on = 1 |
int | hw_en_supported = 0 |
AVFrame * | hw_frame = NULL |
AVDictionary * | mux_dict = NULL |
AVDictionary * | opts = NULL |
path | |
Source file for FFmpegWriter class.
This file is originally based on the Libavformat API example, and then modified by the libopenshot project.
Definition in file FFmpegWriter.cpp.
AV_COPY_PARAMS_FROM_CONTEXT | ( | st | , |
video_codec_ctx | |||
) |
for | ( | std::map< std::string, std::string >::iterator | iter = info.metadata.begin(); iter != info.metadata.end(); ++iter | ) |
Definition at line 1554 of file FFmpegWriter.cpp.
if | ( | ! | codec | ) |
Referenced by openshot::AudioLocation::is_near(), and openshot::VideoCacheThread::run().
if | ( | ) |
if | ( | hw_en_on && | hw_en_supported | ) |
Definition at line 1490 of file FFmpegWriter.cpp.
|
pure virtual |
codec = avcodec_find_encoder_by_name(info.vcodec.c_str()) |
Definition at line 1475 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegWriter::SetAudioOptions(), and openshot::FFmpegWriter::SetVideoOptions().
AVHWDeviceType hw_en_av_device_type = AV_HWDEVICE_TYPE_VAAPI |
Definition at line 40 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegWriter::SetVideoOptions().
AVPixelFormat hw_en_av_pix_fmt = AV_PIX_FMT_NONE |
Definition at line 39 of file FFmpegWriter.cpp.
Referenced by if(), and openshot::FFmpegWriter::SetVideoOptions().
int hw_en_on = 1 |
Definition at line 37 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegWriter::SetOption(), and openshot::FFmpegWriter::SetVideoOptions().
int hw_en_supported = 0 |
Definition at line 38 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegWriter::SetVideoOptions().
AVFrame* hw_frame = NULL |
Definition at line 42 of file FFmpegWriter.cpp.
AVDictionary* mux_dict = NULL |
Definition at line 34 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegWriter::SetOption(), and openshot::FFmpegWriter::WriteHeader().
av_dict_free & opts = NULL |
Definition at line 1486 of file FFmpegWriter.cpp.
Referenced by openshot::FFmpegReader::Open().
path |
Definition at line 1479 of file FFmpegWriter.cpp.
Referenced by openshot::ChunkReader::ChunkReader(), openshot::ChunkWriter::ChunkWriter(), openshot::Clip::Clip(), openshot::Caption::GetFrame(), openshot::ChunkReader::GetFrame(), openshot::FFmpegReader::GetFrame(), openshot::ChunkReader::JsonValue(), openshot::FFmpegReader::JsonValue(), openshot::FFmpegReader::Open(), openshot::Profile::Profile(), openshot::QtImageReader::QtImageReader(), openshot::Frame::Save(), openshot::ChunkReader::SetJsonValue(), openshot::FFmpegReader::SetJsonValue(), and openshot::Frame::Thumbnail().