From ccfe4d64184ae4c2983ae6b099c7c7ebb3770d0f Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Apr 2015 23:05:52 +0200 Subject: client API: add MPV_FORMAT_BYTE_ARRAY type This will be used in the following commit, which adds screenshot_raw. The reasoning is that this will be better for binding scripting languages. One could special-case the screenshot_raw commit and define fixed semantics for passing through a pointer using the current API, like formatting a pointer as string. But that would be ridiculous and unclean. --- player/lua.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'player') diff --git a/player/lua.c b/player/lua.c index 43f549b4ed..51c0e1a752 100644 --- a/player/lua.c +++ b/player/lua.c @@ -860,6 +860,9 @@ static void pushnode(lua_State *L, mpv_node *node) lua_rawset(L, -3); } break; + case MPV_FORMAT_BYTE_ARRAY: + lua_pushlstring(L, node->u.ba->data, node->u.ba->size); + break; default: // unknown value - what do we do? // for now, set a unique dummy value -- cgit v1.2.3