History

Make new VDPAU easier to use by adding context to callback.

Using VDPAU correctly means checking for preemption and possibly regenerating the context all the time. With the current API there is no context or other user-defined pointer and thus this in not possible during decoding unless using some hack like global variables. The need to reinitialize both surfaces and even function pointers makes handling preemption even more difficult. This patch introduces a new render2 function that gets both the AVCodecContext and AVFrame in addition, in both the user can store additional opaque data. This allows even advanced approaches like keeping a "generation counter" for the surfaces so they can be regenerated on the fly and efficiently. In addition, the function has a return value that will be passed through all the way instead of being silently ignored as for the current render function. Unfortunately the HWAccel API has no way of providing API/ABI compatibility, so a currently disallowed state (render pointer being NULL) is used to extend it.

Reimar Döffinger committed 13 years ago

Commit d404fe31 parent af05edc5 files · +29 −3Browse files

Showing the changes to doc/APIchanges (1 of 5 files). Show all

Unified · Split

doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2012-10-22 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2013-08-xx - xxxxxxx - lavc 55.27.100 - vdpau.h
19+ Add a render2 alternative to the render callback function.
20+
1821 2013-08-xx - xxxxxxx - lavc 55.26.100 - vdpau.h
1922 Add allocation function for AVVDPAUContext, allowing
2023 to extend it in the future without breaking ABI/API.

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