mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Add initial video playback support for Ogg Theora videos (resolves issue #66.)
The basic APIs are:
video = love.graphics.newVideo("myvideo.ogv")
love.graphics.draw(video, ...) -- Video objects are Drawables.
video:play(), video:pause()
video:getDuration(), video:tell(), video:rewind(), video:seek(seconds)
video:getSource()
video:getWidth(), video:getHeight(), video:setFilter(min, mag)
More advanced APIs include video:setSource(source), video:getStream(), and videostream:setSync.
To use a custom pixel shader when drawing a Video, call the new TexelVideo(texcoords) function instead of Texel(texture, texcoords) in order to get the pixel colors of a video frame.
This commit is contained in:
@@ -53,6 +53,7 @@ PKG_CHECK_MODULES([openal], [openal], [], [LOVE_MSG_ERROR([OpenAL])])
|
||||
PKG_CHECK_MODULES([libmodplug], [libmodplug], [], [LOVE_MSG_ERROR([libmodplug])])
|
||||
PKG_CHECK_MODULES([vorbisfile], [vorbisfile], [], [LOVE_MSG_ERROR([libvorbis and libvorbisfile])])
|
||||
PKG_CHECK_MODULES([zlib], [zlib], [], [LOVE_MSG_ERROR([zlib])])
|
||||
PKG_CHECK_MODULES([theora], [theoradec], [], [LOVE_MSG_ERROR([libtheora])])
|
||||
|
||||
# Other libraries
|
||||
AC_SEARCH_LIBS([sqrt], [m], [], [LOVE_MSG_ERROR([the C math library])])
|
||||
|
||||
@@ -114,7 +114,7 @@ cat > src/Makefile.am << EOF
|
||||
AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I$inc_libraries/enet/libenet/include \$(LOVE_INCLUDES) \$(FILE_OFFSET)\
|
||||
\$(SDL_CFLAGS) \$(lua_CFLAGS) \$(freetype2_CFLAGS)\
|
||||
\$(openal_CFLAGS) \$(zlib_CFLAGS) \$(libmodplug_CFLAGS)\
|
||||
\$(vorbisfile_CFLAGS)
|
||||
\$(vorbisfile_CFLAGS) \$(theora_CFLAGS)
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
SUBDIRS =
|
||||
SUFFIXES = .lua .lua.h
|
||||
@@ -146,7 +146,7 @@ liblove${love_amsuffix}_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS)
|
||||
liblove${love_amsuffix}_la_LIBADD = \
|
||||
\$(SDL_LIBS) \$(freetype2_LIBS) \$(lua_LIBS)\
|
||||
\$(openal_LIBS) \$(zlib_LIBS) \$(libmodplug_LIBS)\
|
||||
\$(vorbisfile_LIBS)
|
||||
\$(vorbisfile_LIBS) \$(theora_LIBS)
|
||||
EOF
|
||||
|
||||
genmodules >> src/Makefile.am
|
||||
|
||||
Reference in New Issue
Block a user