Browse Source

vdpau: add a constructor for AVVDPAUContext.

We will likely want to add new fields to it in the future, so this is
needed to avoid breaking ABI.
tags/n2.2-rc1
Anton Khirnov 11 years ago
parent
commit
728c465856
3 changed files with 18 additions and 0 deletions
  1. +2
    -0
      doc/APIchanges
  2. +5
    -0
      libavcodec/vdpau.c
  3. +11
    -0
      libavcodec/vdpau.h

+ 2
- 0
doc/APIchanges View File

@@ -15,6 +15,8 @@ API changes, most recent first:

2013-11-xx - xxxxxxx - lavc 55.26.0 - vdpau.h
Add av_vdpau_get_profile().
Add av_vdpau_alloc_context(). This function must from now on be
used for allocating AVVDPAUContext.

2013-11-xx - xxxxxxx - lavc 55.25.0 - avcodec.h
Add ITU-R BT.2020 and other not yet included values to color primaries,


+ 5
- 0
libavcodec/vdpau.c View File

@@ -133,4 +133,9 @@ do { \
return AVERROR(EINVAL);
}

AVVDPAUContext *av_vdpau_alloc_context(void)
{
return av_mallocz(sizeof(AVVDPAUContext));
}

/* @}*/

+ 11
- 0
libavcodec/vdpau.h View File

@@ -74,6 +74,10 @@ union AVVDPAUPictureInfo {
* during initialization or through each AVCodecContext.get_buffer()
* function call. In any case, they must be valid prior to calling
* decoding functions.
*
* The size of this structure is not a part of the public ABI and must not
* be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an
* AVVDPAUContext.
*/
typedef struct AVVDPAUContext {
/**
@@ -126,6 +130,13 @@ typedef struct AVVDPAUContext {
#endif
} AVVDPAUContext;

/**
* Allocate an AVVDPAUContext.
*
* @return Newly-allocated AVVDPAUContext or NULL on failure.
*/
AVVDPAUContext *av_vdpau_alloc_context(void);

/**
* Get a decoder profile that should be used for initializing a VDPAU decoder.
* Should be called from the AVCodecContext.get_format() callback.


Loading…
Cancel
Save