aboutsummaryrefslogtreecommitdiffstats
path: root/doc/outdevs.texi
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2013-11-24 20:13:27 +0100
committerLukasz Marek <lukasz.m.luki@gmail.com>2014-01-27 15:18:18 +0100
commitded6b3af41cd5d41f4df728ced4b194cf0426105 (patch)
tree64b281f178c850dc8ee2bf285573695c5e364bd0 /doc/outdevs.texi
parent102bd641687a6ec4704ce2b3f259e895b68d8e4b (diff)
downloadffmpeg-ded6b3af41cd5d41f4df728ced4b194cf0426105.tar.gz
lavd: add opengl device
It can render to OpenGL context provided by application or into SDL window Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'doc/outdevs.texi')
-rw-r--r--doc/outdevs.texi35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index a204f3264a..d2ccef216a 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -149,6 +149,41 @@ ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
+@section opengl
+OpenGL output device.
+
+To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
+
+Device allows to render to OpenGL context.
+Context may be provided by application or default SDL window is created.
+
+When device renders to external context, application must implement handlers for following messages:
+@code{AV_CTL_MESSAGE_CREATE_WINDOW_BUFFER} - create OpenGL context on current thread.
+@code{AV_CTL_MESSAGE_PREPARE_WINDOW_BUFFER} - make OpenGL context current.
+@code{AV_CTL_MESSAGE_DISPLAY_WINDOW_BUFFER} - swap buffers.
+@code{AV_CTL_MESSAGE_DESTROY_WINDOW_BUFFER} - destroy OpenGL context.
+Application is also required to inform a device about current resolution by sending @code{AV_DEVICE_WINDOW_RESIZED} message.
+
+@subsection Options
+@table @option
+
+@item background
+Set background color. Black is a default.
+@item no_window
+Disables default SDL window when set to non-zero value.
+Application must provide OpenGL context and both @code{window_size_cb} and @code{window_swap_buffers_cb} callbacks when set.
+@item window_title
+Set the SDL window title, if not specified default to the filename specified for the output device.
+Ignored when @option{no_window} is set.
+
+@end table
+
+@subsection Examples
+Play a file on SDL window using OpenGL rendering:
+@example
+ffmpeg -i INPUT -f opengl "window title"
+@end example
+
@section oss
OSS (Open Sound System) output device.