/* gtuber-0.0.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "Gtuber", gir_namespace = "Gtuber", gir_version = "0.0", lower_case_cprefix = "gtuber_")]
namespace Gtuber {
	[CCode (cheader_filename = "gtuber/gtuber.h", type_id = "gtuber_adaptive_stream_get_type ()")]
	public class AdaptiveStream : Gtuber.Stream {
		[CCode (has_construct_function = false)]
		protected AdaptiveStream ();
		public bool get_index_range (out uint64 start, out uint64 end);
		public bool get_init_range (out uint64 start, out uint64 end);
		public Gtuber.AdaptiveStreamManifest get_manifest_type ();
		public Gtuber.AdaptiveStreamManifest manifest_type { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", type_id = "gtuber_client_get_type ()")]
	public class Client : GLib.Object {
		[CCode (has_construct_function = false)]
		public Client ();
		public Gtuber.MediaInfo fetch_media_info (string uri, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async Gtuber.MediaInfo fetch_media_info_async (string uri, GLib.Cancellable? cancellable) throws GLib.Error;
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", type_id = "gtuber_manifest_generator_get_type ()")]
	public class ManifestGenerator : GLib.Object {
		[CCode (has_construct_function = false)]
		public ManifestGenerator ();
		public uint get_indent ();
		public Gtuber.AdaptiveStreamManifest get_manifest_type ();
		public bool get_pretty ();
		public void set_filter_func (owned Gtuber.AdaptiveStreamFilter? filter);
		public void set_indent (uint indent);
		public void set_manifest_type (Gtuber.AdaptiveStreamManifest type);
		public void set_media_info (Gtuber.MediaInfo info);
		public void set_pretty (bool pretty);
		public string to_data ();
		public bool to_file (string filename) throws GLib.Error;
		public uint indent { get; set; }
		public Gtuber.AdaptiveStreamManifest manifest_type { get; set; }
		public bool pretty { get; set; }
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", type_id = "gtuber_media_info_get_type ()")]
	public class MediaInfo : GLib.Object {
		[CCode (has_construct_function = false)]
		protected MediaInfo ();
		public unowned GLib.GenericArray<Gtuber.AdaptiveStream> get_adaptive_streams ();
		public unowned GLib.HashTable<void*,void*> get_chapters ();
		public unowned string get_description ();
		public uint get_duration ();
		public bool get_has_adaptive_streams ();
		public bool get_has_streams ();
		public unowned string get_id ();
		public unowned GLib.HashTable<void*,void*> get_request_headers ();
		public unowned GLib.GenericArray<Gtuber.Stream> get_streams ();
		public unowned string get_title ();
		public string description { get; }
		public uint duration { get; }
		public bool has_adaptive_streams { get; }
		public bool has_streams { get; }
		public string id { get; }
		public string title { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", type_id = "gtuber_stream_get_type ()")]
	public class Stream : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Stream ();
		public unowned string get_audio_codec ();
		public uint get_bitrate ();
		public Gtuber.CodecFlags get_codec_flags ();
		public uint get_fps ();
		public uint get_height ();
		public uint get_itag ();
		public Gtuber.StreamMimeType get_mime_type ();
		public unowned string get_uri ();
		public unowned string get_video_codec ();
		public uint get_width ();
		public string obtain_codecs_string ();
		public string audio_codec { get; }
		public uint bitrate { get; }
		public Gtuber.CodecFlags codec_flags { get; }
		public uint fps { get; }
		public uint height { get; }
		public uint itag { get; }
		public Gtuber.StreamMimeType mime_type { get; }
		public string uri { get; }
		public string video_codec { get; }
		public uint width { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_ADAPTIVE_STREAM_MANIFEST_", type_id = "gtuber_adaptive_stream_manifest_get_type ()")]
	public enum AdaptiveStreamManifest {
		UNKNOWN,
		DASH,
		HLS
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_CODEC_", type_id = "gtuber_codec_flags_get_type ()")]
	[Flags]
	public enum CodecFlags {
		UNKNOWN_VIDEO,
		AVC,
		HEVC,
		VP9,
		AV1,
		UNKNOWN_AUDIO,
		MP4A,
		OPUS
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_FLOW_", type_id = "gtuber_flow_get_type ()")]
	public enum Flow {
		OK,
		ERROR,
		RESTART,
		RECONFIGURE
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_HEARTBEAT_ERROR_", type_id = "gtuber_heartbeat_error_get_type ()")]
	public enum HeartbeatError {
		PING_FAILED,
		PONG_FAILED,
		OTHER
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_STREAM_MIME_TYPE_", type_id = "gtuber_stream_mime_type_get_type ()")]
	public enum StreamMimeType {
		UNKNOWN,
		VIDEO_MP4,
		AUDIO_MP4,
		VIDEO_WEBM,
		AUDIO_WEBM
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_WEBSITE_ERROR_", type_id = "gtuber_website_error_get_type ()")]
	public enum WebsiteError {
		REQUEST_CREATE_FAILED,
		PARSE_FAILED,
		OTHER
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_CLIENT_ERROR_", type_id = "gtuber_client_error_get_type ()")]
	public errordomain ClientError {
		NO_PLUGIN,
		MISSING_INFO;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", cprefix = "GTUBER_MANIFEST_GENERATOR_ERROR_NO_", type_id = "gtuber_manifest_generator_error_get_type ()")]
	public errordomain ManifestGeneratorError {
		DATA;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber.h", instance_pos = 1.9)]
	public delegate bool AdaptiveStreamFilter (Gtuber.AdaptiveStream stream);
	[CCode (cheader_filename = "gtuber/gtuber.h", instance_pos = 2.9)]
	public delegate void Func (void* src, void* data);
	[CCode (cheader_filename = "gtuber/gtuber.h", cname = "GTUBER_MAJOR_VERSION")]
	public const int MAJOR_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber.h", cname = "GTUBER_MICRO_VERSION")]
	public const int MICRO_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber.h", cname = "GTUBER_MINOR_VERSION")]
	public const int MINOR_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber.h", cname = "GTUBER_VERSION_S")]
	public const string VERSION_S;
	[CCode (cheader_filename = "gtuber/gtuber.h")]
	[Version (replacement = "ClientError.quark")]
	public static GLib.Quark client_error_quark ();
	[CCode (array_length = false, array_null_terminated = true, cheader_filename = "gtuber/gtuber.h")]
	public static unowned string[] get_supported_schemes ();
	[CCode (cheader_filename = "gtuber/gtuber.h")]
	public static bool has_plugin_for_uri (string uri, out string filename);
	[CCode (cheader_filename = "gtuber/gtuber.h")]
	[Version (replacement = "ManifestGeneratorError.quark")]
	public static GLib.Quark manifest_generator_error_quark ();
}
