OpenShot Library | libopenshot  0.2.0
Macros | Variables
FFmpegUtilities.h File Reference

Header file for FFmpegUtilities. More...

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavresample/avresample.h>
#include <libavutil/mathematics.h>
#include <libavutil/pixfmt.h>
#include <libavutil/pixdesc.h>
#include <libavcodec/opt.h>
#include "libavutil/imgutils.h"

Go to the source code of this file.

Macros

#define AUDIO_PACKET_ENCODING_SIZE   768000
 
#define AV_ALLOCATE_FRAME()   av_frame_alloc()
 
#define AV_ALLOCATE_IMAGE(av_frame, pix_fmt, width, height)   av_image_alloc(av_frame->data, av_frame->linesize, width, height, pix_fmt, 1)
 
#define AV_COPY_PARAMS_FROM_CONTEXT(av_stream, av_codec)   avcodec_parameters_from_context(av_stream->codecpar, av_codec);
 
#define AV_COPY_PICTURE_DATA(av_frame, buffer, pix_fmt, width, height)   av_image_fill_arrays(av_frame->data, av_frame->linesize, buffer, pix_fmt, width, height, 1)
 
#define av_err2str(errnum)   av_make_error_string(errnum).c_str()
 
#define AV_ERROR_MAX_STRING_SIZE   64
 
#define AV_FIND_DECODER_CODEC_ID(av_stream)   av_stream->codecpar->codec_id
 
#define AV_FORMAT_NEW_STREAM(oc, st_codec, av_codec, av_st)
 
#define AV_FREE_CONTEXT(av_context)   avcodec_free_context(&av_context)
 
#define AV_FREE_FRAME(av_frame)   av_frame_free(av_frame)
 
#define AV_FREE_PACKET(av_packet)   av_packet_unref(av_packet)
 
#define AV_GET_CODEC_ATTRIBUTES(av_stream, av_context)   av_stream->codecpar
 
#define AV_GET_CODEC_FROM_STREAM(av_stream, codec_in)
 
#define AV_GET_CODEC_PAR_CONTEXT(av_stream, av_codec)   av_codec;
 
#define AV_GET_CODEC_PIXEL_FORMAT(av_stream, av_context)   (AVPixelFormat) av_stream->codecpar->format
 
#define AV_GET_CODEC_TYPE(av_stream)   av_stream->codecpar->codec_type
 
#define AV_GET_IMAGE_SIZE(pix_fmt, width, height)   av_image_get_buffer_size(pix_fmt, width, height, 1)
 
#define AV_GET_SAMPLE_FORMAT(av_stream, av_context)   av_stream->codecpar->format
 
#define AV_OPTION_FIND(priv_data, name)   av_opt_find(priv_data, name, NULL, 0, 0)
 
#define AV_OPTION_SET(av_stream, priv_data, name, value, avcodec)   av_opt_set(priv_data, name, value, 0); avcodec_parameters_from_context(av_stream->codecpar, avcodec);
 
#define AV_OUTPUT_CONTEXT(output_context, path)   avformat_alloc_output_context2( output_context, NULL, NULL, path)
 
#define AV_RESET_FRAME(av_frame)   av_frame_unref(av_frame)
 
#define AVCODEC_MAX_AUDIO_FRAME_SIZE   192000
 
#define INT64_C(c)   (c ## LL)
 
#define IS_FFMPEG_3_2   (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101))
 
#define PIX_FMT_NONE   AV_PIX_FMT_NONE
 
#define PIX_FMT_RGB24   AV_PIX_FMT_RGB24
 
#define PIX_FMT_RGBA   AV_PIX_FMT_RGBA
 
#define PIX_FMT_YUV420P   AV_PIX_FMT_YUV420P
 
#define PixelFormat   AVPixelFormat
 
#define UINT64_C(c)   (c ## ULL)
 

Variables

auto AV_GET_CODEC_CONTEXT
 

Detailed Description

Header file for FFmpegUtilities.

Author
Jonathan Thomas jonat.nosp@m.han@.nosp@m.opens.nosp@m.hot..nosp@m.org

LICENSE

Copyright (c) 2008-2014 OpenShot Studios, LLC http://www.openshotstudios.com/. This file is part of OpenShot Library (libopenshot), an open-source project dedicated to delivering high quality video editing and animation solutions to the world. For more information visit http://www.openshot.org/.

OpenShot Library (libopenshot) 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 3 of the License, or (at your option) any later version.

OpenShot Library (libopenshot) 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 OpenShot Library. If not, see http://www.gnu.org/licenses/.

Definition in file FFmpegUtilities.h.

Macro Definition Documentation

#define AUDIO_PACKET_ENCODING_SIZE   768000

Definition at line 76 of file FFmpegUtilities.h.

#define AV_ALLOCATE_FRAME ( )    av_frame_alloc()

Definition at line 110 of file FFmpegUtilities.h.

#define AV_ALLOCATE_IMAGE (   av_frame,
  pix_fmt,
  width,
  height 
)    av_image_alloc(av_frame->data, av_frame->linesize, width, height, pix_fmt, 1)

Definition at line 111 of file FFmpegUtilities.h.

#define AV_COPY_PARAMS_FROM_CONTEXT (   av_stream,
  av_codec 
)    avcodec_parameters_from_context(av_stream->codecpar, av_codec);

Definition at line 139 of file FFmpegUtilities.h.

#define AV_COPY_PICTURE_DATA (   av_frame,
  buffer,
  pix_fmt,
  width,
  height 
)    av_image_fill_arrays(av_frame->data, av_frame->linesize, buffer, pix_fmt, width, height, 1)

Definition at line 129 of file FFmpegUtilities.h.

#define av_err2str (   errnum)    av_make_error_string(errnum).c_str()

Definition at line 90 of file FFmpegUtilities.h.

#define AV_ERROR_MAX_STRING_SIZE   64

Definition at line 73 of file FFmpegUtilities.h.

#define AV_FIND_DECODER_CODEC_ID (   av_stream)    av_stream->codecpar->codec_id

Definition at line 117 of file FFmpegUtilities.h.

#define AV_FORMAT_NEW_STREAM (   oc,
  st_codec,
  av_codec,
  av_st 
)
Value:
av_st = avformat_new_stream(oc, NULL);\
if (!av_st) \
throw OutOfMemory("Could not allocate memory for the video stream.", path); \
c = avcodec_alloc_context3(av_codec); \
st_codec = c; \
av_st->codecpar->codec_id = av_codec->id;

Definition at line 133 of file FFmpegUtilities.h.

#define AV_FREE_CONTEXT (   av_context)    avcodec_free_context(&av_context)

Definition at line 115 of file FFmpegUtilities.h.

#define AV_FREE_FRAME (   av_frame)    av_frame_free(av_frame)

Definition at line 113 of file FFmpegUtilities.h.

#define AV_FREE_PACKET (   av_packet)    av_packet_unref(av_packet)

Definition at line 114 of file FFmpegUtilities.h.

#define AV_GET_CODEC_ATTRIBUTES (   av_stream,
  av_context 
)    av_stream->codecpar

Definition at line 125 of file FFmpegUtilities.h.

#define AV_GET_CODEC_FROM_STREAM (   av_stream,
  codec_in 
)

Definition at line 124 of file FFmpegUtilities.h.

#define AV_GET_CODEC_PAR_CONTEXT (   av_stream,
  av_codec 
)    av_codec;

Definition at line 123 of file FFmpegUtilities.h.

#define AV_GET_CODEC_PIXEL_FORMAT (   av_stream,
  av_context 
)    (AVPixelFormat) av_stream->codecpar->format

Definition at line 126 of file FFmpegUtilities.h.

#define AV_GET_CODEC_TYPE (   av_stream)    av_stream->codecpar->codec_type

Definition at line 116 of file FFmpegUtilities.h.

#define AV_GET_IMAGE_SIZE (   pix_fmt,
  width,
  height 
)    av_image_get_buffer_size(pix_fmt, width, height, 1)

Definition at line 128 of file FFmpegUtilities.h.

#define AV_GET_SAMPLE_FORMAT (   av_stream,
  av_context 
)    av_stream->codecpar->format

Definition at line 127 of file FFmpegUtilities.h.

#define AV_OPTION_FIND (   priv_data,
  name 
)    av_opt_find(priv_data, name, NULL, 0, 0)

Definition at line 131 of file FFmpegUtilities.h.

#define AV_OPTION_SET (   av_stream,
  priv_data,
  name,
  value,
  avcodec 
)    av_opt_set(priv_data, name, value, 0); avcodec_parameters_from_context(av_stream->codecpar, avcodec);

Definition at line 132 of file FFmpegUtilities.h.

#define AV_OUTPUT_CONTEXT (   output_context,
  path 
)    avformat_alloc_output_context2( output_context, NULL, NULL, path)

Definition at line 130 of file FFmpegUtilities.h.

#define AV_RESET_FRAME (   av_frame)    av_frame_unref(av_frame)

Definition at line 112 of file FFmpegUtilities.h.

#define AVCODEC_MAX_AUDIO_FRAME_SIZE   192000

Definition at line 70 of file FFmpegUtilities.h.

#define INT64_C (   c)    (c ## LL)

Definition at line 33 of file FFmpegUtilities.h.

#define IS_FFMPEG_3_2   (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101))

Definition at line 38 of file FFmpegUtilities.h.

#define PIX_FMT_NONE   AV_PIX_FMT_NONE

Definition at line 100 of file FFmpegUtilities.h.

#define PIX_FMT_RGB24   AV_PIX_FMT_RGB24

Definition at line 103 of file FFmpegUtilities.h.

#define PIX_FMT_RGBA   AV_PIX_FMT_RGBA

Definition at line 97 of file FFmpegUtilities.h.

#define PIX_FMT_YUV420P   AV_PIX_FMT_YUV420P

Definition at line 106 of file FFmpegUtilities.h.

#define PixelFormat   AVPixelFormat

Definition at line 94 of file FFmpegUtilities.h.

#define UINT64_C (   c)    (c ## ULL)

Definition at line 34 of file FFmpegUtilities.h.

Variable Documentation

auto AV_GET_CODEC_CONTEXT
Initial value:
= [](AVStream* av_stream, AVCodec* av_codec) {
AVCodecContext *context = avcodec_alloc_context3(av_codec);
avcodec_parameters_to_context(context, av_stream->codecpar);
return context;
}

Definition at line 118 of file FFmpegUtilities.h.