summaryrefslogtreecommitdiff
path: root/ext/x264/gstencoderbitrateprofilemanager.h
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2019-10-17 14:55:51 +0200
committerThibault Saunier <tsaunier@gnome.org>2020-01-07 21:21:42 +0000
commit9273903286b0fe7a9d8a5279c44a5e149e55ff24 (patch)
tree04f3e918d829c67157658b8ac6f1bfd317963a5a /ext/x264/gstencoderbitrateprofilemanager.h
parenta47b6b5f3c215e05f93617085db03b5a4a9ac72f (diff)
x264enc: Respect Youtube bitrate recommandation
Properly follow google recommendations[0] concerning bitrate when the user wants to use the youtube profile. [0]: https://support.google.com/youtube/answer/1722171?hl=en
Diffstat (limited to 'ext/x264/gstencoderbitrateprofilemanager.h')
-rw-r--r--ext/x264/gstencoderbitrateprofilemanager.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/ext/x264/gstencoderbitrateprofilemanager.h b/ext/x264/gstencoderbitrateprofilemanager.h
new file mode 100644
index 00000000..d6db733b
--- /dev/null
+++ b/ext/x264/gstencoderbitrateprofilemanager.h
@@ -0,0 +1,46 @@
+/* GStreamer
+ * Copyright (C) 2019 Thibault Saunier <tsaunier@igalia.com>
+ *
+ * gstencoderbitrateprofilemanager.h
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+typedef struct _GstEncoderBitrateProfileManager GstEncoderBitrateProfileManager;
+
+typedef struct _GstEncoderBitrateTargetForPixelsMap
+{
+ guint n_pixels;
+ guint low_framerate_bitrate;
+ guint high_framerate_bitrate;
+
+ gpointer _gst_reserved[GST_PADDING_LARGE];
+} GstEncoderBitrateTargetForPixelsMap;
+
+void
+gst_encoder_bitrate_profile_manager_add_profile(GstEncoderBitrateProfileManager* self,
+ const gchar* profile_name, const GstEncoderBitrateTargetForPixelsMap* map);
+guint gst_encoder_bitrate_profile_manager_get_bitrate(GstEncoderBitrateProfileManager* self, GstVideoInfo* info);
+void gst_encoder_bitrate_profile_manager_start_loading_preset (GstEncoderBitrateProfileManager* self);
+void gst_encoder_bitrate_profile_manager_end_loading_preset(GstEncoderBitrateProfileManager* self, const gchar* preset);
+void gst_encoder_bitrate_profile_manager_set_bitrate(GstEncoderBitrateProfileManager* self, guint bitrate);
+GstEncoderBitrateProfileManager* gst_encoder_bitrate_profile_manager_new(guint default_bitrate);
+void gst_encoder_bitrate_profile_manager_free(GstEncoderBitrateProfileManager* self); \ No newline at end of file