Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2020-05-15 01:42:32 +0300
committerMarvin Scholz <epirat07@gmail.com>2020-05-15 01:42:32 +0300
commite8fc62fc2ae012fafbd3d4f0e48d0f1a145fe8c5 (patch)
tree333a934c2830aa4c5150dad404ac66057e1a2d19 /examples/dp_renderer.h
parent41e0819960eb2eadc0bfeb550fa2a04f86467d73 (diff)
Dav1dPlay: Split renderers into different files
Diffstat (limited to 'examples/dp_renderer.h')
-rw-r--r--examples/dp_renderer.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/examples/dp_renderer.h b/examples/dp_renderer.h
new file mode 100644
index 0000000..b859802
--- /dev/null
+++ b/examples/dp_renderer.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright © 2020, VideoLAN and dav1d authors
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * Renderer info
+ */
+typedef struct rdr_info
+{
+ // Cookie passed to the renderer implementation callbacks
+ void *cookie;
+ // Callback to create the renderer
+ void* (*create_renderer)(void *data);
+ // Callback to destroy the renderer
+ void (*destroy_renderer)(void *cookie);
+ // Callback to the render function that renders a prevously sent frame
+ void (*render)(void *cookie, const Dav1dPlaySettings *settings);
+ // Callback to the send frame function
+ int (*update_frame)(void *cookie, Dav1dPicture *dav1d_pic,
+ const Dav1dPlaySettings *settings);
+ // Callback for alloc/release pictures (optional)
+ int (*alloc_pic)(Dav1dPicture *pic, void *cookie);
+ void (*release_pic)(Dav1dPicture *pic, void *cookie);
+} Dav1dPlayRenderInfo;
+
+#if defined(HAVE_PLACEBO_VULKAN) || defined(HAVE_PLACEBO_OPENGL)
+# include "dp_renderer_placebo.h"
+#else
+# include "dp_renderer_sdl.h"
+#endif