]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '86e5056575f55f070609dd3926605302f7d2280e'
authorHendrik Leppkes <h.leppkes@gmail.com>
Sat, 5 Sep 2015 14:01:24 +0000 (16:01 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Sat, 5 Sep 2015 14:01:24 +0000 (16:01 +0200)
* commit '86e5056575f55f070609dd3926605302f7d2280e':
  lavfi: Drop deprecated public AVFilterPad struct

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/internal.h
libavfilter/version.h

index 843ac98919ec13022eee7a2d18deeef05d14d739,8ede145686ef51a5b3fb1aa567b991f3ae18cc3a..6fc3f3d904419906fcfe722a26a81806dd8621b9
@@@ -500,26 -297,11 +500,17 @@@ AVFilter *avfilter_get_by_name(const ch
  
  int avfilter_register(AVFilter *filter)
  {
 -    AVFilter **f = &first_filter;
 -    while (*f)
 -        f = &(*f)->next;
 -    *f = filter;
 +    AVFilter **f = last_filter;
-     int i;
 +
 +    /* the filter must select generic or internal exclusively */
 +    av_assert0((filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) != AVFILTER_FLAG_SUPPORT_TIMELINE);
 +
-     for(i=0; filter->inputs && filter->inputs[i].name; i++) {
-         const AVFilterPad *input = &filter->inputs[i];
- #if FF_API_AVFILTERPAD_PUBLIC
-         av_assert0(     !input->filter_frame
-                     || (!input->start_frame && !input->end_frame));
- #endif
-     }
      filter->next = NULL;
 +
 +    while(*f || avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter))
 +        f = &(*f)->next;
 +    last_filter = &filter->next;
 +
      return 0;
  }
  
index 584623f0b6c6a21311dc42fd56f88168d244b99f,af752ee9aaa5530ae8320974cf146882b762b837..6684ab5aa8bbee2310c279b8874cb2846c5d18e3
@@@ -234,167 -226,8 +234,14 @@@ void avfilter_unref_buffer(AVFilterBuff
   */
  attribute_deprecated
  void avfilter_unref_bufferp(AVFilterBufferRef **ref);
 +
 +/**
 + * Get the number of channels of a buffer reference.
 + */
 +attribute_deprecated
 +int avfilter_ref_get_channels(AVFilterBufferRef *ref);
  #endif
  
- #if FF_API_AVFILTERPAD_PUBLIC
- /**
-  * A filter pad used for either input or output.
-  *
-  * See doc/filter_design.txt for details on how to implement the methods.
-  *
-  * @warning this struct might be removed from public API.
-  * users should call avfilter_pad_get_name() and avfilter_pad_get_type()
-  * to access the name and type fields; there should be no need to access
-  * any other fields from outside of libavfilter.
-  */
- struct AVFilterPad {
-     /**
-      * Pad name. The name is unique among inputs and among outputs, but an
-      * input may have the same name as an output. This may be NULL if this
-      * pad has no need to ever be referenced by name.
-      */
-     const char *name;
-     /**
-      * AVFilterPad type.
-      */
-     enum AVMediaType type;
-     /**
-      * Input pads:
-      * Minimum required permissions on incoming buffers. Any buffer with
-      * insufficient permissions will be automatically copied by the filter
-      * system to a new buffer which provides the needed access permissions.
-      *
-      * Output pads:
-      * Guaranteed permissions on outgoing buffers. Any buffer pushed on the
-      * link must have at least these permissions; this fact is checked by
-      * asserts. It can be used to optimize buffer allocation.
-      */
-     attribute_deprecated int min_perms;
-     /**
-      * Input pads:
-      * Permissions which are not accepted on incoming buffers. Any buffer
-      * which has any of these permissions set will be automatically copied
-      * by the filter system to a new buffer which does not have those
-      * permissions. This can be used to easily disallow buffers with
-      * AV_PERM_REUSE.
-      *
-      * Output pads:
-      * Permissions which are automatically removed on outgoing buffers. It
-      * can be used to optimize buffer allocation.
-      */
-     attribute_deprecated int rej_perms;
-     /**
-      * @deprecated unused
-      */
-     int (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref);
-     /**
-      * Callback function to get a video buffer. If NULL, the filter system will
-      * use ff_default_get_video_buffer().
-      *
-      * Input video pads only.
-      */
-     AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h);
-     /**
-      * Callback function to get an audio buffer. If NULL, the filter system will
-      * use ff_default_get_audio_buffer().
-      *
-      * Input audio pads only.
-      */
-     AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples);
-     /**
-      * @deprecated unused
-      */
-     int (*end_frame)(AVFilterLink *link);
-     /**
-      * @deprecated unused
-      */
-     int (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir);
-     /**
-      * Filtering callback. This is where a filter receives a frame with
-      * audio/video data and should do its processing.
-      *
-      * Input pads only.
-      *
-      * @return >= 0 on success, a negative AVERROR on error. This function
-      * must ensure that frame is properly unreferenced on error if it
-      * hasn't been passed on to another filter.
-      */
-     int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
-     /**
-      * Frame poll callback. This returns the number of immediately available
-      * samples. It should return a positive value if the next request_frame()
-      * is guaranteed to return one frame (with no delay).
-      *
-      * Defaults to just calling the source poll_frame() method.
-      *
-      * Output pads only.
-      */
-     int (*poll_frame)(AVFilterLink *link);
-     /**
-      * Frame request callback. A call to this should result in at least one
-      * frame being output over the given link. This should return zero on
-      * success, and another value on error.
-      * See ff_request_frame() for the error codes with a specific
-      * meaning.
-      *
-      * Output pads only.
-      */
-     int (*request_frame)(AVFilterLink *link);
-     /**
-      * Link configuration callback.
-      *
-      * For output pads, this should set the following link properties:
-      * video: width, height, sample_aspect_ratio, time_base
-      * audio: sample_rate.
-      *
-      * This should NOT set properties such as format, channel_layout, etc which
-      * are negotiated between filters by the filter system using the
-      * query_formats() callback before this function is called.
-      *
-      * For input pads, this should check the properties of the link, and update
-      * the filter's internal state as necessary.
-      *
-      * For both input and output pads, this should return zero on success,
-      * and another value on error.
-      */
-     int (*config_props)(AVFilterLink *link);
-     /**
-      * The filter expects a fifo to be inserted on its input link,
-      * typically because it has a delay.
-      *
-      * input pads only.
-      */
-     int needs_fifo;
-     /**
-      * The filter expects writable frames from its input link,
-      * duplicating data buffers if needed.
-      *
-      * input pads only.
-      */
-     int needs_writable;
- };
- #endif
  /**
   * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.
   * AVFilter.inputs/outputs).
index 7dde2e133496f8f7dc3dc4cc09faf4b49dc0d2fa,9c330d7b9c1d2057552a0981e65d8a75b6fbc2e6..75c34360e435c9c6893915bc4e27d1c85913c5f3
  
  #include "libavutil/internal.h"
  #include "avfilter.h"
 +#include "avfiltergraph.h"
 +#include "formats.h"
  #include "thread.h"
  #include "version.h"
 +#include "video.h"
 +#include "libavcodec/avcodec.h"
 +
 +#if FF_API_AVFILTERBUFFER
 +#define POOL_SIZE 32
 +typedef struct AVFilterPool {
 +    AVFilterBufferRef *pic[POOL_SIZE];
 +    int count;
 +    int refcount;
 +    int draining;
 +} AVFilterPool;
 +#endif
 +
 +typedef struct AVFilterCommand {
 +    double time;                ///< time expressed in seconds
 +    char *command;              ///< command
 +    char *arg;                  ///< optional argument for the command
 +    int flags;
 +    struct AVFilterCommand *next;
 +} AVFilterCommand;
 +
 +/**
 + * Update the position of a link in the age heap.
 + */
 +void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link);
  
- #if !FF_API_AVFILTERPAD_PUBLIC
  /**
   * A filter pad used for either input or output.
   */
Simple merge