summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamerapool.h
blob: ce3bf60b1426d59f5ca050f8bf10a55715baeddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2020, Collabora Ltd.
 *     Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
 *
 * gstlibcamerapool.h - GStreamer Buffer Pool
 *
 * This is a partial implementation of GstBufferPool intended for internal use
 * only. This pool cannot be configured or activated.
 */

#pragma once

#include "gstlibcameraallocator.h"

#include <gst/gst.h>

#include <libcamera/stream.h>

#define GST_TYPE_LIBCAMERA_POOL gst_libcamera_pool_get_type()
G_DECLARE_FINAL_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_LIBCAMERA, POOL, GstBufferPool)

GstLibcameraPool *gst_libcamera_pool_new(GstLibcameraAllocator *allocator,
					 libcamera::Stream *stream);

libcamera::Stream *gst_libcamera_pool_get_stream(GstLibcameraPool *self);

libcamera::FrameBuffer *gst_libcamera_buffer_get_frame_buffer(GstBuffer *buffer);
0 #} {# TEMPLATE VAR SETTINGS #} {%- set url_root = pathto('', 1) %} {%- if url_root == '#' %}{% set url_root = '' %}{% endif %} {%- if not embedded and docstitle %} {%- set titlesuffix = " &mdash; "|safe + docstitle|e %} {%- else %} {%- set titlesuffix = "" %} {%- endif %} <!DOCTYPE html> <head> <meta charset="utf-8"> {{ metatags }} <meta name="viewport" content="width=device-width, initial-scale=1.0"> {% block htmltitle %} <title>{{ title|striptags|e }}{{ titlesuffix }}</title> {% endblock %} {# FAVICON #} {% if favicon %} <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> {% endif %} {# CSS #} {# OPENSEARCH #} {% if not embedded %} {% if use_opensearch %} <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/> {% endif %} {% endif %} {# RTD hosts this file, so just load on non RTD builds #} {% if not READTHEDOCS %} <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> {% endif %} {% for cssfile in css_files %} <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> {% endfor %} {% for cssfile in extra_css_files %} <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> {% endfor %} {%- block linktags %} {%- if hasdoc('about') %} <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}"/> {%- endif %} {%- if hasdoc('genindex') %} <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}"/> {%- endif %} {%- if hasdoc('search') %} <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/> {%- endif %} {%- if hasdoc('copyright') %} <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/> {%- endif %} <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/> {%- if parents %} <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/> {%- endif %} {%- if next %} <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/> {%- endif %} {%- if prev %} <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/> {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} </head> <body role="document"> <header> <div id="navbar"> <div class="navbar-brand"> <div class="navbar-logo"> _ +-/ \-+ | (o) | +-----+</div> <div class="navbar-name"><span class="text-light">lib</span>camera</div> </div> <div class="navbar"> {{ toctree(maxdepth=1) }} <div class="searchbox" role="search"> <form class="search" action="{{ pathto('search') }}" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> </div> </header> <div id="content"> {# PAGE CONTENT #} <div class="block"> {% block body %}{% endblock %} </div> </div> {% include "footer.html" %} </body> </html>