Revision 664f6595

View differences:

libavfilter/avfilter.h
1 1
/*
2
 * Filter layer
2
 * filter layer
3 3
 * copyright (c) 2007 Bobby Bingham
4 4
 *
5 5
 * This file is part of FFmpeg.
......
35 35
/**
36 36
 * A reference-counted picture data type used by the filter system.  Filters
37 37
 * should not store pointers to this structure directly, but instead use the
38
 * AVFilterPicRef structure below
38
 * AVFilterPicRef structure below.
39 39
 */
40 40
typedef struct AVFilterPic
41 41
{
......
86 86

  
87 87
/**
88 88
 * Add a new reference to a picture.
89
 * @param ref   An existing reference to the picture
90
 * @param pmask A bitmask containing the allowable permissions in the new
89
 * @param ref   an existing reference to the picture
90
 * @param pmask a bitmask containing the allowable permissions in the new
91 91
 *              reference
92
 * @return      A new reference to the picture with the same properties as the
92
 * @return      a new reference to the picture with the same properties as the
93 93
 *              old, excluding any permissions denied by pmask
94 94
 */
95 95
AVFilterPicRef *avfilter_ref_pic(AVFilterPicRef *ref, int pmask);
......
97 97
/**
98 98
 * Remove a reference to a picture.  If this is the last reference to the
99 99
 * picture, the picture itself is also automatically freed.
100
 * @param ref Reference to the picture.
100
 * @param ref reference to the picture
101 101
 */
102 102
void avfilter_unref_pic(AVFilterPicRef *ref);
103 103

  
......
154 154
/**
155 155
 * Helper function to create a list of supported formats.  This is intended
156 156
 * for use in AVFilter->query_formats().
157
 * @param len The number of formats supported
158
 * @param ... A list of the supported formats
159
 * @return    The format list, with no existing references
157
 * @param len the number of formats supported
158
 * @param ... a list of the supported formats
159
 * @return    the format list, with no existing references
160 160
 */
161 161
AVFilterFormats *avfilter_make_format_list(int len, ...);
162 162

  
......
182 182

  
183 183
/**
184 184
 * Remove *ref as a reference to the format list it currently points to,
185
 * deallocate that list if this was the last reference, and set *ref to NULL
185
 * deallocate that list if this was the last reference, and set *ref to NULL.
186 186
 */
187 187
void avfilter_formats_unref(AVFilterFormats **ref);
188 188

  
189 189
int avfilter_poll_frame(AVFilterLink *link);
190 190

  
191 191
/**
192
 * A filter pad used for either input or output
192
 * A filter pad used for either input or output.
193 193
 */
194 194
struct AVFilterPad
195 195
{
......
362 362
/** An instance of a filter */
363 363
struct AVFilterContext
364 364
{
365
    AVClass *av_class;              ///< Needed for av_log()
365
    AVClass *av_class;              ///< needed for av_log()
366 366

  
367
    AVFilter *filter;               ///< The AVFilter of which this is an instance
367
    AVFilter *filter;               ///< the AVFilter of which this is an instance
368 368

  
369 369
    char *name;                     ///< name of this filter instance
370 370

  
......
380 380
};
381 381

  
382 382
/**
383
 * A links between two filters.  This contains pointers to the source and
383
 * A link between two filters.  This contains pointers to the source and
384 384
 * destination filters between which this link exists, and the indices of
385 385
 * the pads involved.  In addition, this link also contains the parameters
386 386
 * which have been negotiated and agreed upon between the filter, such as
......
416 416
    /**
417 417
     * The picture reference currently being sent across the link by the source
418 418
     * filter.  This is used internally by the filter system to allow
419
     * automatic copying of pictures which d not have sufficient permissions
419
     * automatic copying of pictures which do not have sufficient permissions
420 420
     * for the destination.  This should not be accessed directly by the
421 421
     * filters.
422 422
     */
......
427 427
};
428 428

  
429 429
/**
430
 * Link two filters together
431
 * @param src    The source filter
432
 * @param srcpad Index of the output pad on the source filter
433
 * @param dst    The destination filter
434
 * @param dstpad Index of the input pad on the destination filter
435
 * @return       Zero on success
430
 * Link two filters together.
431
 * @param src    the source filter
432
 * @param srcpad index of the output pad on the source filter
433
 * @param dst    the destination filter
434
 * @param dstpad index of the input pad on the destination filter
435
 * @return       zero on success
436 436
 */
437 437
int avfilter_link(AVFilterContext *src, unsigned srcpad,
438 438
                  AVFilterContext *dst, unsigned dstpad);
439 439

  
440 440
/**
441 441
 * Negotiate the colorspace, dimensions, etc of all inputs to a filter.
442
 * @param filter The filter to negotiate the properties for its inputs
443
 * @return       Zero on successful negotiation
442
 * @param filter the filter to negotiate the properties for its inputs
443
 * @return       zero on successful negotiation
444 444
 */
445 445
int avfilter_config_links(AVFilterContext *filter);
446 446

  
447 447
/**
448 448
 * Request a picture buffer with a specific set of permissions
449
 * @param link  The output link to the filter from which the picture will
449
 * @param link  the output link to the filter from which the picture will
450 450
 *              be requested
451
 * @param perms The required access permissions
451
 * @param perms the required access permissions
452 452
 * @return      A reference to the picture.  This must be unreferenced with
453 453
 *              avfilter_unref_pic when you are finished with it.
454 454
 */
......
456 456

  
457 457
/**
458 458
 * Request an input frame from the filter at the other end of the link.
459
 * @param link The input link
460
 * @return     Zero on success
459
 * @param link the input link
460
 * @return     zero on success
461 461
 */
462 462
int  avfilter_request_frame(AVFilterLink *link);
463 463

  
464 464
/**
465 465
 * Notify the next filter of the start of a frame.
466
 * @param link   The output link the frame will be sent over
466
 * @param link   the output link the frame will be sent over
467 467
 * @param picref A reference to the frame about to be sent.  The data for this
468 468
 *               frame need only be valid once draw_slice() is called for that
469 469
 *               portion.  The receiving filter will free this reference when
......
473 473

  
474 474
/**
475 475
 * Notify the next filter that the current frame has finished
476
 * @param link The output link the frame was sent over
476
 * @param link the output link the frame was sent over
477 477
 */
478 478
void avfilter_end_frame(AVFilterLink *link);
479 479

  
480 480
/**
481
 * Send a slice to the next filter
482
 * @param link The output link over which the frame is being sent
483
 * @param y    Offset in pixels from the top of the image for this slice
484
 * @param h    Height of this slice in pixels
481
 * Send a slice to the next filter.
482
 * @param link the output link over which the frame is being sent
483
 * @param y    offset in pixels from the top of the image for this slice
484
 * @param h    height of this slice in pixels
485 485
 */
486 486
void avfilter_draw_slice(AVFilterLink *link, int y, int h);
487 487

  
......
496 496
 * avfilter_get_by_name later to lookup the AVFilter structure by name. A
497 497
 * filter can still by instantiated with avfilter_open even if it is not
498 498
 * registered.
499
 * @param filter The filter to register
499
 * @param filter the filter to register
500 500
 */
501 501
void avfilter_register(AVFilter *filter);
502 502

  
503 503
/**
504
 * Gets a filter definition matching the given name
505
 * @param name The filter name to find
506
 * @return     The filter definition, if any matching one is registered.
504
 * Gets a filter definition matching the given name.
505
 * @param name the filter name to find
506
 * @return     the filter definition, if any matching one is registered.
507 507
 *             NULL if none found.
508 508
 */
509 509
AVFilter *avfilter_get_by_name(const char *name);
510 510

  
511 511
/**
512
 * Create a filter instance
513
 * @param filter    The filter to create an instance of
512
 * Create a filter instance.
513
 * @param filter    the filter to create an instance of
514 514
 * @param inst_name Name to give to the new instance.  Can be NULL for none.
515 515
 * @return          Pointer to the new instance on success.  NULL on failure.
516 516
 */
517 517
AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name);
518 518

  
519 519
/**
520
 * Initialize a filter
521
 * @param filter The filter to initialize
520
 * Initialize a filter.
521
 * @param filter the filter to initialize
522 522
 * @param args   A string of parameters to use when initializing the filter.
523 523
 *               The format and meaning of this string varies by filter.
524 524
 * @param opaque Any extra non-string data needed by the filter.  The meaning
525 525
 *               of this parameter varies by filter.
526
 * @return       Zero on success
526
 * @return       zero on success
527 527
 */
528 528
int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
529 529

  
530 530
/**
531
 * Destroy a filter
532
 * @param filter The filter to destroy
531
 * Destroy a filter.
532
 * @param filter the filter to destroy
533 533
 */
534 534
void avfilter_destroy(AVFilterContext *filter);
535 535

  
536 536
/**
537 537
 * Insert a filter in the middle of an existing link.
538
 * @param link The link into which the filter should be inserted
539
 * @param filt The filter to be inserted
540
 * @param in   The input pad on the filter to connect
541
 * @param out  The output pad on the filter to connect
542
 * @return     Zero on success
538
 * @param link the link into which the filter should be inserted
539
 * @param filt the filter to be inserted
540
 * @param in   the input pad on the filter to connect
541
 * @param out  the output pad on the filter to connect
542
 * @return     zero on success
543 543
 */
544 544
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
545 545
                           unsigned in, unsigned out);
546 546

  
547 547
/**
548
 * Insert a new pad
548
 * Insert a new pad.
549 549
 * @param idx Insertion point.  Pad is inserted at the end if this point
550 550
 *            is beyond the end of the list of pads.
551 551
 * @param count Pointer to the number of pads in the list

Also available in: Unified diff