diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-19 00:28:17 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-19 00:28:17 +0300 |
commit | 3f215c9f8e4d5d95ac9b45376460391669906236 (patch) | |
tree | 1f675ef31908400c3411ace5182ca015c57000aa /TOOLS | |
parent | 82bbf1a1ab1affc675e9b69b93e33accfa2ed0b8 (diff) | |
parent | c2d0a9c8a78b20ed8e96ff5a7d3e8c936b82cae1 (diff) | |
download | mpv-3f215c9f8e4d5d95ac9b45376460391669906236.tar.bz2 mpv-3f215c9f8e4d5d95ac9b45376460391669906236.tar.xz |
Merge branch 'vdpau' into build
* vdpau: (22 commits)
VO: Prefer vo_vdpau over vo_xv again
vo_vdpau: Fix X event handling bugs
vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED
core/VO: Allow VO drivers to add/modify frames
video_out.h: Cosmetics
VO interface: Remove obsolete draw_frame() from new interface
vo_vdpau: Support recovering from VDPAU display preemption
vo_vdpau: Support updating OSD while paused
vo_vdpau.c: Reindent control() switch statement
vo_vdpau: Allocate one large surface for EOSD content
vo_vdpau.c: cosmetics
vo_vdpau: reindent after GUI code removal
vo_vpdau: Clean up uninit logic
vo_vdpau: Make CHECK_ST macro safer
vo_vdpau: Move all remaining static/global variables to context
vo_vdpau: Move things to context struct
vo_vdpau: Make info struct const
vo_vdpau: Replace global function table with context variable
vo_vdpau: Move VDPAU interface pointers into one struct
vo_vdpau: Add template file for VDPAU functions
...
Diffstat (limited to 'TOOLS')
-rw-r--r-- | TOOLS/vdpau_functions.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/TOOLS/vdpau_functions.py b/TOOLS/vdpau_functions.py new file mode 100644 index 0000000000..e628cb00c3 --- /dev/null +++ b/TOOLS/vdpau_functions.py @@ -0,0 +1,58 @@ +# Generate vdpau_template.c + +functions = """ +# get_error_string should be first, because the function lookup loop should +# have it available to print errors for other functions +get_error_string + +bitmap_surface_create +bitmap_surface_destroy +bitmap_surface_put_bits_native +bitmap_surface_query_capabilities +decoder_create +decoder_destroy +decoder_render +device_destroy +generate_csc_matrix GenerateCSCMatrix # CSC completely capitalized +output_surface_create +output_surface_destroy +output_surface_put_bits_indexed +output_surface_put_bits_native +output_surface_render_bitmap_surface +output_surface_render_output_surface +preemption_callback_register +presentation_queue_block_until_surface_idle +presentation_queue_create +presentation_queue_destroy +presentation_queue_display +presentation_queue_target_create_x11 +presentation_queue_target_destroy +video_mixer_create +video_mixer_destroy +video_mixer_render +video_mixer_set_attribute_values +video_mixer_set_feature_enables +video_surface_create +video_surface_destroy +video_surface_put_bits_y_cb_cr +""" + +print(""" +/* List the VDPAU functions used by MPlayer. + * Generated by vdpau_functions.py. + * First argument on each line is the VDPAU function type name, + * second macro name needed to get function address, + * third name MPlayer uses for the function. + */ +""") +for line in functions.splitlines(): + parts = line.split('#')[0].strip().split() + if not parts: + continue # empty/comment line + if len(parts) > 1: + mp_name, vdpau_name = parts + else: + mp_name = parts[0] + vdpau_name = ''.join(part.capitalize() for part in mp_name.split('_')) + macro_name = mp_name.upper() + print('VDP_FUNCTION(Vdp%s, VDP_FUNC_ID_%s, %s)' % (vdpau_name, macro_name, mp_name)) |