History

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.

Anton Khirnov committed 13 years ago

Commit 728c4651 parent ca22d1d3 files · +18 −0Browse files

Unified · Split

3 files
  1. doc/APIchanges +2 −0
  2. libavcodec/vdpau.c +5 −0
  3. libavcodec/vdpau.h +11 −0
doc/APIchanges+2−0
@@ -15,6 +15,8 @@ API changes, most recent first: · 14 unmodified lines
1515
1616 2013-11-xx - xxxxxxx - lavc 55.26.0 - vdpau.h
1717 Add av_vdpau_get_profile().
18+ Add av_vdpau_alloc_context(). This function must from now on be
19+ used for allocating AVVDPAUContext.
1820
1921 2013-11-xx - xxxxxxx - lavc 55.25.0 - avcodec.h
2022 Add ITU-R BT.2020 and other not yet included values to color primaries,
libavcodec/vdpau.c+5−0
@@ -133,4 +133,9 @@ do { \ · 132 unmodified lines
133133 return AVERROR(EINVAL);
134134 }
135135
136+AVVDPAUContext *av_vdpau_alloc_context(void)
137+{
138+ return av_mallocz(sizeof(AVVDPAUContext));
139+}
140+
136141 /* @}*/
libavcodec/vdpau.h+11−0
@@ -74,6 +74,10 @@ union AVVDPAUPictureInfo { · 73 unmodified lines
7474 * during initialization or through each AVCodecContext.get_buffer()
7575 * function call. In any case, they must be valid prior to calling
7676 * decoding functions.
77+ *
78+ * The size of this structure is not a part of the public ABI and must not
79+ * be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an
80+ * AVVDPAUContext.
7781 */
7882 typedef struct AVVDPAUContext {
7983 /**
@@ -126,6 +130,13 @@ typedef struct AVVDPAUContext { · 46 unmodified lines
126130 #endif
127131 } AVVDPAUContext;
128132
133+/**
134+ * Allocate an AVVDPAUContext.
135+ *
136+ * @return Newly-allocated AVVDPAUContext or NULL on failure.
137+ */
138+AVVDPAUContext *av_vdpau_alloc_context(void);
139+
129140 /**
130141 * Get a decoder profile that should be used for initializing a VDPAU decoder.
131142 * Should be called from the AVCodecContext.get_format() callback.

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