Browse Source

lavfi: add an accessor for ref->audio->channels.

tags/n1.1
Nicolas George 12 years ago
parent
commit
34de47aa35
4 changed files with 17 additions and 3 deletions
  1. +4
    -0
      doc/APIchanges
  2. +5
    -0
      libavfilter/audio.c
  3. +6
    -1
      libavfilter/avfilter.h
  4. +2
    -2
      libavfilter/version.h

+ 4
- 0
doc/APIchanges View File

@@ -15,6 +15,10 @@ libavutil: 2012-10-22

API changes, most recent first:

2012-12-20 - xxxxxxx - lavfi 3.28.100 - avfilter.h
Add AVFilterLink.channels, avfilter_link_get_channels()
and avfilter_ref_get_channels().

2012-12-15 - 2ada584d - lavc 54.80.100 - avcodec.h
Add pkt_size field to AVFrame.



+ 5
- 0
libavfilter/audio.c View File

@@ -27,6 +27,11 @@
#include "avfilter.h"
#include "internal.h"

int avfilter_ref_get_channels(AVFilterBufferRef *ref)
{
return ref->audio ? ref->audio->channels : 0;
}

AVFilterBufferRef *ff_null_get_audio_buffer(AVFilterLink *link, int perms,
int nb_samples)
{


+ 6
- 1
libavfilter/avfilter.h View File

@@ -128,7 +128,7 @@ typedef struct AVFilterBufferRefAudioProps {
uint64_t channel_layout; ///< channel layout of audio buffer
int nb_samples; ///< number of audio samples per channel
int sample_rate; ///< audio buffer sample rate
int channels; ///< number of channels
int channels; ///< number of channels (do not access directly)
} AVFilterBufferRefAudioProps;

/**
@@ -233,6 +233,11 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref);
*/
void avfilter_unref_bufferp(AVFilterBufferRef **ref);

/**
* Get the number of channels of a buffer reference.
*/
int avfilter_ref_get_channels(AVFilterBufferRef *ref);

#if FF_API_AVFILTERPAD_PUBLIC
/**
* A filter pad used for either input or output.


+ 2
- 2
libavfilter/version.h View File

@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"

#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 28
#define LIBAVFILTER_VERSION_MICRO 102
#define LIBAVFILTER_VERSION_MINOR 29
#define LIBAVFILTER_VERSION_MICRO 100

#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \


Loading…
Cancel
Save