Move files from gst-plugins-ugly into the "subprojects/gst-plugins-ugly/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-ugly / ext / x264 / gstencoderbitrateprofilemanager.h
1 /* GStreamer
2  * Copyright (C) 2019 Thibault Saunier <tsaunier@igalia.com>
3  *
4  * gstencoderbitrateprofilemanager.h
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #pragma once
23
24 #include <gst/gst.h>
25 #include <gst/video/video.h>
26
27 typedef struct _GstEncoderBitrateProfileManager GstEncoderBitrateProfileManager;
28
29 typedef struct _GstEncoderBitrateTargetForPixelsMap
30 {
31   guint n_pixels;
32   guint low_framerate_bitrate;
33   guint high_framerate_bitrate;
34
35   gpointer _gst_reserved[GST_PADDING_LARGE];
36 } GstEncoderBitrateTargetForPixelsMap;
37
38 void
39 gst_encoder_bitrate_profile_manager_add_profile(GstEncoderBitrateProfileManager* self,
40     const gchar* profile_name, const GstEncoderBitrateTargetForPixelsMap* map);
41 guint gst_encoder_bitrate_profile_manager_get_bitrate(GstEncoderBitrateProfileManager* self, GstVideoInfo* info);
42 void gst_encoder_bitrate_profile_manager_start_loading_preset (GstEncoderBitrateProfileManager* self);
43 void gst_encoder_bitrate_profile_manager_end_loading_preset(GstEncoderBitrateProfileManager* self, const gchar* preset);
44 void gst_encoder_bitrate_profile_manager_set_bitrate(GstEncoderBitrateProfileManager* self, guint bitrate);
45 GstEncoderBitrateProfileManager* gst_encoder_bitrate_profile_manager_new(guint default_bitrate);
46 void gst_encoder_bitrate_profile_manager_free(GstEncoderBitrateProfileManager* self);