History

Implement avfilter_graph_alloc().

Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit e15aeea1 parent a6fdd576 files · +16 −3Browse files

Unified · Split

6 files
  1. doc/APIchanges +3 −0
  2. ffmpeg.c +1 −1
  3. ffplay.c +1 −1
  4. libavfilter/avfilter.h +1 −1
  5. libavfilter/avfiltergraph.c +5 −0
  6. libavfilter/avfiltergraph.h +5 −0
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162010-11-04 - r25672 - lavfi 1.55.0 - avfilter_graph_alloc()
17 Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h.
18
162010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt()192010-11-02 - r25654 - lavcore 0.12.0 - av_get_bits_per_sample_fmt()
17 Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and20 Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and
18 deprecate av_get_bits_per_sample_format().21 deprecate av_get_bits_per_sample_format().
ffmpeg.c+1−1
@@ -345,7 +345,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) · 344 unmodified lines
345 char args[255];345 char args[255];
346 int ret;346 int ret;
347 347
348 graph = av_mallocz(sizeof(AVFilterGraph));348 graph = avfilter_graph_alloc();
349 349
350 if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0)350 if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0)
351 return ret;351 return ret;
ffplay.c+1−1
@@ -1795,7 +1795,7 @@ static int video_thread(void *arg) · 1794 unmodified lines
1795 char sws_flags_str[128];1795 char sws_flags_str[128];
1796 FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P };1796 FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P };
1797 AVFilterContext *filt_src = NULL, *filt_out = NULL;1797 AVFilterContext *filt_src = NULL, *filt_out = NULL;
1798 AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph));1798 AVFilterGraph *graph = avfilter_graph_alloc();
1799 snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);1799 snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
1800 graph->scale_sws_opts = av_strdup(sws_flags_str);1800 graph->scale_sws_opts = av_strdup(sws_flags_str);
1801 1801
libavfilter/avfilter.h+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
25#include "libavutil/avutil.h"25#include "libavutil/avutil.h"
26 26
27#define LIBAVFILTER_VERSION_MAJOR 127#define LIBAVFILTER_VERSION_MAJOR 1
28#define LIBAVFILTER_VERSION_MINOR 5428#define LIBAVFILTER_VERSION_MINOR 55
29#define LIBAVFILTER_VERSION_MICRO 029#define LIBAVFILTER_VERSION_MICRO 0
30 30
31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
libavfilter/avfiltergraph.c+5−0
@@ -26,6 +26,11 @@ · 25 unmodified lines
26#include "avfilter.h"26#include "avfilter.h"
27#include "avfiltergraph.h"27#include "avfiltergraph.h"
28 28
29AVFilterGraph *avfilter_graph_alloc(void)
30{
31 return av_mallocz(sizeof(AVFilterGraph));
32}
33
29void avfilter_graph_destroy(AVFilterGraph *graph)34void avfilter_graph_destroy(AVFilterGraph *graph)
30{35{
31 for(; graph->filter_count > 0; graph->filter_count --)36 for(; graph->filter_count > 0; graph->filter_count --)
libavfilter/avfiltergraph.h+5−0
@@ -31,6 +31,11 @@ typedef struct AVFilterGraph { · 30 unmodified lines
31 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters31 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
32} AVFilterGraph;32} AVFilterGraph;
33 33
34/**
35 * Allocate a filter graph.
36 */
37AVFilterGraph *avfilter_graph_alloc(void);
38
34/**39/**
35 * Get a filter instance with name name from graph.40 * Get a filter instance with name name from graph.
36 *41 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t