diff options
Diffstat (limited to 'main/vapi')
| -rw-r--r-- | main/vapi/gpg-error.vapi | 445 | ||||
| -rw-r--r-- | main/vapi/gpgme.vapi | 673 | ||||
| -rw-r--r-- | main/vapi/gstreamer-base-1.0.vapi | 1011 | ||||
| -rw-r--r-- | main/vapi/gstreamer-rtp-1.0.vapi | 724 | ||||
| -rw-r--r-- | main/vapi/gstreamer-video-1.0.vapi | 2339 | ||||
| -rw-r--r-- | main/vapi/libgcrypt.vapi | 0 | ||||
| -rw-r--r-- | main/vapi/libomemo-c.vapi | 692 | ||||
| -rw-r--r-- | main/vapi/libqrencode.vapi | 81 | ||||
| -rw-r--r-- | main/vapi/webrtc-audio-processing.vapi | 0 |
9 files changed, 5965 insertions, 0 deletions
diff --git a/main/vapi/gpg-error.vapi b/main/vapi/gpg-error.vapi new file mode 100644 index 00000000..3ad6c580 --- /dev/null +++ b/main/vapi/gpg-error.vapi @@ -0,0 +1,445 @@ +/* gcrypt.vapi + * + * Copyright: + * 2008 Jiqing Qiang + * 2008, 2010, 2012-2013 Evan Nemerson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Author: + * Jiqing Qiang <jiqing.qiang@gmail.com> + * Evan Nemerson <evan@coeus-group.com> + */ + + + +[CCode (cheader_filename = "gpg-error.h")] +namespace GPGError { + [CCode (cname = "gpg_err_source_t", cprefix = "GPG_ERR_SOURCE_")] + public enum ErrorSource { + UNKNOWN, + GCRYPT, + GPG, + GPGSM, + GPGAGENT, + PINENTRY, + SCD, + GPGME, + KEYBOX, + KSBA, + DIRMNGR, + GSTI, + ANY, + USER_1, + USER_2, + USER_3, + USER_4, + + /* This is one more than the largest allowed entry. */ + DIM + } + + [CCode (cname = "gpg_err_code_t", cprefix = "GPG_ERR_")] + public enum ErrorCode { + NO_ERROR, + GENERAL, + UNKNOWN_PACKET, + UNKNOWN_VERSION, + PUBKEY_ALGO, + DIGEST_ALGO, + BAD_PUBKEY, + BAD_SECKEY, + BAD_SIGNATURE, + NO_PUBKEY, + CHECKSUM, + BAD_PASSPHRASE, + CIPHER_ALGO, + KEYRING_OPEN, + INV_PACKET, + INV_ARMOR, + NO_USER_ID, + NO_SECKEY, + WRONG_SECKEY, + BAD_KEY, + COMPR_ALGO, + NO_PRIME, + NO_ENCODING_METHOD, + NO_ENCRYPTION_SCHEME, + NO_SIGNATURE_SCHEME, + INV_ATTR, + NO_VALUE, + NOT_FOUND, + VALUE_NOT_FOUND, + SYNTAX, + BAD_MPI, + INV_PASSPHRASE, + SIG_CLASS, + RESOURCE_LIMIT, + INV_KEYRING, + TRUSTDB, + BAD_CERT, + INV_USER_ID, + UNEXPECTED, + TIME_CONFLICT, + KEYSERVER, + WRONG_PUBKEY_ALGO, + TRIBUTE_TO_D_A, + WEAK_KEY, + INV_KEYLEN, + INV_ARG, + BAD_URI, + INV_URI, + NETWORK, + UNKNOWN_HOST, + SELFTEST_FAILED, + NOT_ENCRYPTED, + NOT_PROCESSED, + UNUSABLE_PUBKEY, + UNUSABLE_SECKEY, + INV_VALUE, + BAD_CERT_CHAIN, + MISSING_CERT, + NO_DATA, + BUG, + NOT_SUPPORTED, + INV_OP, + TIMEOUT, + INTERNAL, + EOF_GCRYPT, + INV_OBJ, + TOO_SHORT, + TOO_LARGE, + NO_OBJ, + NOT_IMPLEMENTED, + CONFLICT, + INV_CIPHER_MODE, + INV_FLAG, + INV_HANDLE, + TRUNCATED, + INCOMPLETE_LINE, + INV_RESPONSE, + NO_AGENT, + AGENT, + INV_DATA, + ASSUAN_SERVER_FAULT, + ASSUAN, + INV_SESSION_KEY, + INV_SEXP, + UNSUPPORTED_ALGORITHM, + NO_PIN_ENTRY, + PIN_ENTRY, + BAD_PIN, + INV_NAME, + BAD_DATA, + INV_PARAMETER, + WRONG_CARD, + NO_DIRMNGR, + DIRMNGR, + CERT_REVOKED, + NO_CRL_KNOWN, + CRL_TOO_OLD, + LINE_TOO_LONG, + NOT_TRUSTED, + CANCELED, + BAD_CA_CERT, + CERT_EXPIRED, + CERT_TOO_YOUNG, + UNSUPPORTED_CERT, + UNKNOWN_SEXP, + UNSUPPORTED_PROTECTION, + CORRUPTED_PROTECTION, + AMBIGUOUS_NAME, + CARD, + CARD_RESET, + CARD_REMOVED, + INV_CARD, + CARD_NOT_PRESENT, + NO_PKCS15_APP, + NOT_CONFIRMED, + CONFIGURATION, + NO_POLICY_MATCH, + INV_INDEX, + INV_ID, + NO_SCDAEMON, + SCDAEMON, + UNSUPPORTED_PROTOCOL, + BAD_PIN_METHOD, + CARD_NOT_INITIALIZED, + UNSUPPORTED_OPERATION, + WRONG_KEY_USAGE, + NOTHING_FOUND, + WRONG_BLOB_TYPE, + MISSING_VALUE, + HARDWARE, + PIN_BLOCKED, + USE_CONDITIONS, + PIN_NOT_SYNCED, + INV_CRL, + BAD_BER, + INV_BER, + ELEMENT_NOT_FOUND, + IDENTIFIER_NOT_FOUND, + INV_TAG, + INV_LENGTH, + INV_KEYINFO, + UNEXPECTED_TAG, + NOT_DER_ENCODED, + NO_CMS_OBJ, + INV_CMS_OBJ, + UNKNOWN_CMS_OBJ, + UNSUPPORTED_CMS_OBJ, + UNSUPPORTED_ENCODING, + UNSUPPORTED_CMS_VERSION, + UNKNOWN_ALGORITHM, + INV_ENGINE, + PUBKEY_NOT_TRUSTED, + DECRYPT_FAILED, + KEY_EXPIRED, + SIG_EXPIRED, + ENCODING_PROBLEM, + INV_STATE, + DUP_VALUE, + MISSING_ACTION, + MODULE_NOT_FOUND, + INV_OID_STRING, + INV_TIME, + INV_CRL_OBJ, + UNSUPPORTED_CRL_VERSION, + INV_CERT_OBJ, + UNKNOWN_NAME, + LOCALE_PROBLEM, + NOT_LOCKED, + PROTOCOL_VIOLATION, + INV_MAC, + INV_REQUEST, + UNKNOWN_EXTN, + UNKNOWN_CRIT_EXTN, + LOCKED, + UNKNOWN_OPTION, + UNKNOWN_COMMAND, + BUFFER_TOO_SHORT, + SEXP_INV_LEN_SPEC, + SEXP_STRING_TOO_LONG, + SEXP_UNMATCHED_PAREN, + SEXP_NOT_CANONICAL, + SEXP_BAD_CHARACTER, + SEXP_BAD_QUOTATION, + SEXP_ZERO_PREFIX, + SEXP_NESTED_DH, + SEXP_UNMATCHED_DH, + SEXP_UNEXPECTED_PUNC, + SEXP_BAD_HEX_CHAR, + SEXP_ODD_HEX_NUMBERS, + SEXP_BAD_OCT_CHAR, + ASS_GENERAL, + ASS_ACCEPT_FAILED, + ASS_CONNECT_FAILED, + ASS_INV_RESPONSE, + ASS_INV_VALUE, + ASS_INCOMPLETE_LINE, + ASS_LINE_TOO_LONG, + ASS_NESTED_COMMANDS, + ASS_NO_DATA_CB, + ASS_NO_INQUIRE_CB, + ASS_NOT_A_SERVER, + ASS_NOT_A_CLIENT, + ASS_SERVER_START, + ASS_READ_ERROR, + ASS_WRITE_ERROR, + ASS_TOO_MUCH_DATA, + ASS_UNEXPECTED_CMD, + ASS_UNKNOWN_CMD, + ASS_SYNTAX, + ASS_CANCELED, + ASS_NO_INPUT, + ASS_NO_OUTPUT, + ASS_PARAMETER, + ASS_UNKNOWN_INQUIRE, + USER_1, + USER_2, + USER_3, + USER_4, + USER_5, + USER_6, + USER_7, + USER_8, + USER_9, + USER_10, + USER_11, + USER_12, + USER_13, + USER_14, + USER_15, + USER_16, + MISSING_ERRNO, + UNKNOWN_ERRNO, + EOF, + + E2BIG, + EACCES, + EADDRINUSE, + EADDRNOTAVAIL, + EADV, + EAFNOSUPPORT, + EAGAIN, + EALREADY, + EAUTH, + EBACKGROUND, + EBADE, + EBADF, + EBADFD, + EBADMSG, + EBADR, + EBADRPC, + EBADRQC, + EBADSLT, + EBFONT, + EBUSY, + ECANCELED, + ECHILD, + ECHRNG, + ECOMM, + ECONNABORTED, + ECONNREFUSED, + ECONNRESET, + ED, + EDEADLK, + EDEADLOCK, + EDESTADDRREQ, + EDIED, + EDOM, + EDOTDOT, + EDQUOT, + EEXIST, + EFAULT, + EFBIG, + EFTYPE, + EGRATUITOUS, + EGREGIOUS, + EHOSTDOWN, + EHOSTUNREACH, + EIDRM, + EIEIO, + EILSEQ, + EINPROGRESS, + EINTR, + EINVAL, + EIO, + EISCONN, + EISDIR, + EISNAM, + EL2HLT, + EL2NSYNC, + EL3HLT, + EL3RST, + ELIBACC, + ELIBBAD, + ELIBEXEC, + ELIBMAX, + ELIBSCN, + ELNRNG, + ELOOP, + EMEDIUMTYPE, + EMFILE, + EMLINK, + EMSGSIZE, + EMULTIHOP, + ENAMETOOLONG, + ENAVAIL, + ENEEDAUTH, + ENETDOWN, + ENETRESET, + ENETUNREACH, + ENFILE, + ENOANO, + ENOBUFS, + ENOCSI, + ENODATA, + ENODEV, + ENOENT, + ENOEXEC, + ENOLCK, + ENOLINK, + ENOMEDIUM, + ENOMEM, + ENOMSG, + ENONET, + ENOPKG, + ENOPROTOOPT, + ENOSPC, + ENOSR, + ENOSTR, + ENOSYS, + ENOTBLK, + ENOTCONN, + ENOTDIR, + ENOTEMPTY, + ENOTNAM, + ENOTSOCK, + ENOTSUP, + ENOTTY, + ENOTUNIQ, + ENXIO, + EOPNOTSUPP, + EOVERFLOW, + EPERM, + EPFNOSUPPORT, + EPIPE, + EPROCLIM, + EPROCUNAVAIL, + EPROGMISMATCH, + EPROGUNAVAIL, + EPROTO, + EPROTONOSUPPORT, + EPROTOTYPE, + ERANGE, + EREMCHG, + EREMOTE, + EREMOTEIO, + ERESTART, + EROFS, + ERPCMISMATCH, + ESHUTDOWN, + ESOCKTNOSUPPORT, + ESPIPE, + ESRCH, + ESRMNT, + ESTALE, + ESTRPIPE, + ETIME, + ETIMEDOUT, + ETOOMANYREFS, + ETXTBSY, + EUCLEAN, + EUNATCH, + EUSERS, + EWOULDBLOCK, + EXDEV, + EXFULL, + + /* This is one more than the largest allowed entry. */ + CODE_DIM + } + + [CCode (cname = "gpg_err_code_t", cprefix = "gpg_err_")] + public struct Error : uint { + [CCode (cname = "gpg_err_make")] + public Error (ErrorSource source, ErrorCode code); + [CCode (cname = "gpg_err_make_from_errno")] + public Error.from_errno (ErrorSource source, int err); + public ErrorCode code { [CCode (cname = "gpg_err_code")] get; } + public ErrorSource source { [CCode (cname = "gpg_err_source")] get; } + } +} diff --git a/main/vapi/gpgme.vapi b/main/vapi/gpgme.vapi new file mode 100644 index 00000000..5976eb66 --- /dev/null +++ b/main/vapi/gpgme.vapi @@ -0,0 +1,673 @@ +/* libgpgme.vapi + * + * Copyright (C) 2009 Sebastian Reichel <sre@ring0.de> + * Copyright (C) 2022 Itay Grudev <itay+git2022@grudev.com> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +[CCode (lower_case_cprefix = "gpgme_", cheader_filename = "gpgme.h,src/plugins/openpgp/gpgme_fix.h")] +namespace GPG { + public static GLib.RecMutex global_mutex; + + [CCode (cname = "struct _gpgme_engine_info")] + public struct EngineInfo { + EngineInfo* next; + Protocol protocol; + string file_name; + string version; + string req_version; + string? home_dir; + } + + [Compact] + [CCode (cname = "struct _gpgme_key", ref_function = "gpgme_key_ref_vapi", unref_function = "gpgme_key_unref_vapi", free_function = "gpgme_key_release")] + public class Key { + public bool revoked; + public bool expired; + public bool disabled; + public bool invalid; + public bool can_encrypt; + public bool can_sign; + public bool can_certify; + public bool secret; + public bool can_authenticate; + public bool is_qualified; + public Protocol protocol; + public string issuer_serial; + public string issuer_name; + public string chain_id; + public Validity owner_trust; + [CCode (array_length = false, array_null_terminated = true)] + public SubKey[] subkeys; + [CCode (array_length = false, array_null_terminated = true)] + public UserID[] uids; + public KeylistMode keylist_mode; + public string fpr { get { return subkeys[0].fpr; } } + } + + [CCode (cname = "struct _gpgme_sig_notation")] + public struct SigNotation { + SigNotation* next; + string? name; + string value; + int name_len; + int value_len; + SigNotationFlags flags; + bool human_readable; + bool critical; + } + + [CCode (cname = "struct _gpgme_subkey")] + public struct SubKey { + SubKey* next; + bool revoked; + bool expired; + bool disabled; + bool invalid; + bool can_encrypt; + bool can_sign; + bool can_certify; + bool secret; + bool can_authenticate; + bool is_qualified; + bool is_cardkey; + PublicKeyAlgorithm algo; + uint length; + string keyid; + string fpr; + long timestamp; + long expires; + string? card_number; + } + + [CCode (cname = "struct _gpgme_key_sig")] + public struct KeySig { + KeySig* next; + bool revoked; + bool expired; + bool invalid; + bool exportable; + PublicKeyAlgorithm algo; + string keyid; + long timestamp; + long expires; + GPGError.Error status; + string uid; + string name; + string email; + string comment; + uint sig_class; + SigNotation notations; + } + + [CCode (cname = "struct _gpgme_user_id")] + public struct UserID { + UserID* next; + bool revoked; + bool invalid; + Validity validity; + string uid; + string name; + string email; + string comment; + KeySig signatures; + } + + [CCode (cname = "struct _gpgme_op_verify_result")] + public struct VerifyResult { + Signature* signatures; + string? file_name; + } + + [CCode (cname = "struct _gpgme_op_sign_result")] + public struct SignResult { + InvalidKey invalid_signers; + Signature* signatures; + } + + [CCode (cname = "struct _gpgme_op_encrypt_result")] + public struct EncryptResult { + InvalidKey invalid_signers; + } + + [CCode (cname = "struct _gpgme_op_decrypt_result")] + public struct DecryptResult { + string unsupported_algorithm; + bool wrong_key_usage; + Recipient recipients; + string file_name; + } + + [CCode (cname = "struct _gpgme_recipient")] + public struct Recipient { + Recipient *next; + string keyid; + PublicKeyAlgorithm pubkey_algo; + GPGError.Error status; + } + + [CCode (cname = "struct _gpgme_invalid_key")] + public struct InvalidKey { + InvalidKey *next; + string fpr; + GPGError.Error reason; + } + + [CCode (cname = "struct _gpgme_signature")] + public struct Signature { + Signature *next; + Sigsum summary; + string fpr; + GPGError.Error status; + SigNotation notations; + ulong timestamp; + ulong exp_timestamp; + bool wrong_key_usage; + PKAStatus pka_trust; + bool chain_model; + Validity validity; + GPGError.Error validity_reason; + PublicKeyAlgorithm pubkey_algo; + HashAlgorithm hash_algo; + string? pka_address; + } + + public enum PKAStatus { + NOT_AVAILABLE, + BAD, + OKAY, + RFU + } + + [CCode (cname = "gpgme_sigsum_t", cprefix = "GPGME_SIGSUM_")] + public enum Sigsum { + VALID, + GREEN, + RED, + KEY_REVOKED, + KEY_EXPIRED, + SIG_EXPIRED, + KEY_MISSING, + CRL_MISSING, + CRL_TOO_OLD, + BAD_POLICY, + SYS_ERROR + } + + [CCode (cname = "gpgme_data_encoding_t", cprefix = "GPGME_DATA_ENCODING_")] + public enum DataEncoding { + NONE, + BINARY, + BASE64, + ARMOR, + URL, + URLESC, + URL0 + } + + [CCode (cname = "gpgme_pubkey_algo_t", cprefix = "GPGME_PK_")] + public enum PublicKeyAlgorithm { + RSA, + RSA_E, + RSA_S, + ELG_E, + DSA, + ELG + } + + [CCode (cname = "gpgme_hash_algo_t", cprefix = "GPGME_MD_")] + public enum HashAlgorithm { + NONE, + MD5, + SHA1, + RMD160, + MD2, + TIGER, + HAVAL, + SHA256, + SHA384, + SHA512, + MD4, + CRC32, + CRC32_RFC1510, + CRC24_RFC2440 + } + + [CCode (cname = "gpgme_sig_mode_t", cprefix = "GPGME_SIG_MODE_")] + public enum SigMode { + NORMAL, + DETACH, + CLEAR + } + + [CCode (cname = "gpgme_validity_t", cprefix = "GPGME_VALIDITY_")] + public enum Validity { + UNKNOWN, + UNDEFINED, + NEVER, + MARGINAL, + FULL, + ULTIMATE + } + + [CCode (cname = "gpgme_protocol_t", cprefix = "GPGME_PROTOCOL_")] + public enum Protocol { + OpenPGP, + CMS, + GPGCONF, + ASSUAN, + UNKNOWN + } + + [CCode (cname = "gpgme_keylist_mode_t", cprefix = "GPGME_KEYLIST_MODE_")] + public enum KeylistMode { + LOCAL, + EXTERN, + SIGS, + SIG_NOTATIONS, + EPHEMERAL, + VALIDATE + } + + [CCode (cname = "gpgme_export_mode_t", cprefix = "GPGME_EXPORT_MODE_")] + public enum ExportMode { + EXTERN + } + + [CCode (cprefix = "GPGME_AUDITLOG_")] + public enum AuditLogFlag { + HTML, + WITH_HELP + } + + [CCode (cname = "gpgme_sig_notation_flags_t", cprefix = "GPGME_SIG_NOTATION_")] + public enum SigNotationFlags { + HUMAN_READABLE, + CRITICAL + } + + [CCode (cname = "gpgme_encrypt_flags_t", cprefix = "GPGME_ENCRYPT_")] + public enum EncryptFlags { + ALWAYS_TRUST, + NO_ENCRYPT_TO + } + + [CCode (cname = "gpgme_status_code_t", cprefix = "GPGME_STATUS_")] + public enum StatusCode { + EOF, + ENTER, + LEAVE, + ABORT, + GOODSIG, + BADSIG, + ERRSIG, + BADARMOR, + RSA_OR_IDEA, + KEYEXPIRED, + KEYREVOKED, + TRUST_UNDEFINED, + TRUST_NEVER, + TRUST_MARGINAL, + TRUST_FULLY, + TRUST_ULTIMATE, + SHM_INFO, + SHM_GET, + SHM_GET_BOOL, + SHM_GET_HIDDEN, + NEED_PASSPHRASE, + VALIDSIG, + SIG_ID, + SIG_TO, + ENC_TO, + NODATA, + BAD_PASSPHRASE, + NO_PUBKEY, + NO_SECKEY, + NEED_PASSPHRASE_SYM, + DECRYPTION_FAILED, + DECRYPTION_OKAY, + MISSING_PASSPHRASE, + GOOD_PASSPHRASE, + GOODMDC, + BADMDC, + ERRMDC, + IMPORTED, + IMPORT_OK, + IMPORT_PROBLEM, + IMPORT_RES, + FILE_START, + FILE_DONE, + FILE_ERROR, + BEGIN_DECRYPTION, + END_DECRYPTION, + BEGIN_ENCRYPTION, + END_ENCRYPTION, + DELETE_PROBLEM, + GET_BOOL, + GET_LINE, + GET_HIDDEN, + GOT_IT, + PROGRESS, + SIG_CREATED, + SESSION_KEY, + NOTATION_NAME, + NOTATION_DATA, + POLICY_URL, + BEGIN_STREAM, + END_STREAM, + KEY_CREATED, + USERID_HINT, + UNEXPECTED, + INV_RECP, + NO_RECP, + ALREADY_SIGNED, + SIGEXPIRED, + EXPSIG, + EXPKEYSIG, + TRUNCATED, + ERROR, + NEWSIG, + REVKEYSIG, + SIG_SUBPACKET, + NEED_PASSPHRASE_PIN, + SC_OP_FAILURE, + SC_OP_SUCCESS, + CARDCTRL, + BACKUP_KEY_CREATED, + PKA_TRUST_BAD, + PKA_TRUST_GOOD, + PLAINTEXT + } + + [Compact] + [CCode (cname = "struct gpgme_context", free_function = "gpgme_release", cprefix = "gpgme_")] + public class Context { + private static GPGError.Error new(out Context ctx); + + public static Context create() throws GLib.Error { + Context ctx; + throw_if_error(@new(out ctx)); + return ctx; + } + + public GPGError.Error set_protocol(Protocol p); + public Protocol get_protocol(); + + public void set_armor(bool yes); + public bool get_armor(); + + public void set_textmode(bool yes); + public bool get_textmode(); + + public GPGError.Error set_keylist_mode(KeylistMode mode); + public KeylistMode get_keylist_mode(); + + public void set_include_certs(int nr_of_certs = -256); + + public int get_include_certs(); + + public void set_passphrase_cb(passphrase_callback cb, void* hook_value = null); + + public void get_passphrase_cb(out passphrase_callback cb, out void* hook_value); + + public GPGError.Error set_locale(int category, string val); + + [CCode (cname = "gpgme_ctx_get_engine_info")] + public EngineInfo* get_engine_info(); + + [CCode (cname = "gpgme_ctx_set_engine_info")] + public GPGError.Error set_engine_info(Protocol proto, string file_name, string home_dir); + + public void signers_clear(); + + public GPGError.Error signers_add(Key key); + + public Key* signers_enum(int n); + + public void sig_notation_clear(); + + public GPGError.Error sig_notation_add(string name, string val, SigNotationFlags flags); + + public SigNotation* sig_notation_get(); + + [CCode (cname = "gpgme_get_key")] + private GPGError.Error get_key_(string fpr, out Key key, bool secret); + + [CCode (cname = "gpgme_get_key_")] + public Key get_key(string fpr, bool secret) throws GLib.Error { + Key key; + throw_if_error(get_key_(fpr, out key, secret)); + return key; + } + + public Context* wait(out GPGError.Error status, bool hang); + + public SignResult* op_sign_result(); + + [CCode (cname = "gpgme_op_sign")] + public GPGError.Error op_sign_(Data plain, Data sig, SigMode mode); + + [CCode (cname = "gpgme_op_sign_")] + public Data op_sign(Data plain, SigMode mode) throws GLib.Error { + Data sig = Data.create(); + throw_if_error(op_sign_(plain, sig, mode)); + return sig; + } + + public VerifyResult* op_verify_result(); + + [CCode (cname = "gpgme_op_verify")] + public GPGError.Error op_verify_(Data sig, Data signed_text, Data? plaintext); + + [CCode (cname = "gpgme_op_verify_")] + public Data op_verify(Data sig, Data signed_text) throws GLib.Error { + Data plaintext = Data.create(); + throw_if_error(op_verify_(sig, signed_text, plaintext)); + return plaintext; + } + + public EncryptResult* op_encrypt_result(); + + [CCode (cname = "gpgme_op_encrypt")] + public GPGError.Error op_encrypt_([CCode (array_length = false)] Key[] recp, EncryptFlags flags, Data plain, Data cipher); + + [CCode (cname = "gpgme_op_encrypt_")] + public Data op_encrypt(Key[] recp, EncryptFlags flags, Data plain) throws GLib.Error { + Data cipher = Data.create(); + throw_if_error(op_encrypt_(recp, flags, plain, cipher)); + return cipher; + } + + public DecryptResult* op_decrypt_result(); + + [CCode (cname = "gpgme_op_decrypt")] + public GPGError.Error op_decrypt_(Data cipher, Data plain); + + [CCode (cname = "gpgme_op_decrypt_")] + public Data op_decrypt(Data cipher) throws GLib.Error { + Data plain = Data.create(); + throw_if_error(op_decrypt_(cipher, plain)); + return plain; + } + + public GPGError.Error op_export(string? pattern, ExportMode mode, Data keydata); + + public GPGError.Error op_import(Data keydata); + + public unowned ImportResult op_import_result(); + + [CCode (cname = "gpgme_op_keylist_start")] + private GPGError.Error op_keylist_start_(string? pattern = null, int secret_only = 0); + + [CCode (cname = "gpgme_op_keylist_start_")] + public void op_keylist_start(string? pattern = null, int secret_only = 0) throws GLib.Error { + throw_if_error(op_keylist_start_(pattern, secret_only)); + } + + [CCode (cname = "gpgme_op_keylist_next")] + private GPGError.Error op_keylist_next_(out Key key); + + [CCode (cname = "gpgme_op_keylist_next_")] + public Key op_keylist_next() throws GLib.Error { + Key key; + throw_if_error(op_keylist_next_(out key)); + return key; + } + + [CCode (cname = "gpgme_op_keylist_end")] + private GPGError.Error op_keylist_end_(); + + [CCode (cname = "gpgme_op_keylist_end_")] + public void op_keylist_end() throws GLib.Error { + throw_if_error(op_keylist_end_()); + } + + public KeylistResult op_keylist_result(); + } + + [Flags] + [CCode (cname="unsigned int")] + public enum ImportStatusFlags { + [CCode (cname = "GPGME_IMPORT_NEW")] + NEW, + [CCode (cname = "GPGME_IMPORT_UID")] + UID, + [CCode (cname = "GPGME_IMPORT_SIG")] + SIG, + [CCode (cname = "GPGME_IMPORT_SUBKEY")] + SUBKEY, + [CCode (cname = "GPGME_IMPORT_SECRET")] + SECRET + } + + [Compact] + [CCode (cname = "struct _gpgme_import_status")] + public class ImportStatus { + public ImportStatus? next; + public string fpr; + public GPGError.Error result; + public ImportStatusFlags status; + } + + [Compact] + [CCode (cname = "struct _gpgme_op_import_result")] + public class ImportResult { + public int considered; + public int no_user_id; + public int imported; + public int imported_rsa; + public int unchanged; + public int new_user_ids; + public int new_sub_keys; + public int new_signatures; + public int new_revocations; + public int secret_read; + public int secret_imported; + public int secret_unchanged; + public int not_imported; + public ImportStatus imports; + } + + [Compact] + [CCode (cname = "struct _gpgme_op_keylist_result")] + public class KeylistResult { + uint truncated; + } + + [Compact] + [CCode (cname = "struct gpgme_data", free_function = "gpgme_data_release", cprefix = "gpgme_data_")] + public class Data { + + public static GPGError.Error new(out Data d); + + public static Data create() throws GLib.Error { + Data data; + throw_if_error(@new(out data)); + return data; + } + + [CCode (cname = "gpgme_data_new_from_mem")] + public static GPGError.Error new_from_memory(out Data d, char[] buffer, bool copy); + + public static Data create_from_memory(uint8[] buffer, bool copy) throws GLib.Error { + Data data; + throw_if_error(new_from_memory(out data, (char[]) buffer, copy)); + return data; + } + + [CCode (cname = "gpgme_data_new_from_file")] + public static GPGError.Error new_from_file(out Data d, string filename, int copy = 1); + + public static Data create_from_file(string filename, int copy = 1) throws GLib.Error { + Data data; + throw_if_error(new_from_file(out data, filename, copy)); + return data; + } + + [CCode (cname = "gpgme_data_release_and_get_mem")] + public string release_and_get_mem(out size_t len); + + public ssize_t read([CCode (array_length = false)] uint8[] buf, size_t len); + + public ssize_t write(uint8[] buf); + + public long seek(long offset, int whence=0); + + public GPGError.Error set_file_name(string file_name); + + public DataEncoding *get_encoding(); + + public GPGError.Error set_encoding(DataEncoding enc); + } + + [CCode (cname = "gpgme_get_protocol_name")] + public unowned string get_protocol_name(Protocol p); + + [CCode (cname = "gpgme_pubkey_algo_name")] + public unowned string get_public_key_algorithm_name(PublicKeyAlgorithm algo); + + [CCode (cname = "gpgme_hash_algo_name")] + public unowned string get_hash_algorithm_name(HashAlgorithm algo); + + [CCode (cname = "gpgme_passphrase_cb_t", has_target = false)] + public delegate GPGError.Error passphrase_callback(void* hook, string uid_hint, string passphrase_info, bool prev_was_bad, int fd); + + [CCode (cname = "gpgme_check_version")] + public unowned string check_version(string? required_version = null); + + [CCode (cname = "gpgme_engine_check_version")] + public GPGError.Error engine_check_version(Protocol proto); + + [CCode (cname = "gpgme_get_engine_info")] + public GPGError.Error get_engine_info(out EngineInfo? engine_info); + + [CCode (cname = "gpgme_strerror_r")] + public int strerror_r(GPGError.Error err, uint8[] buf); + + [CCode (cname = "gpgme_strerror")] + public unowned string strerror(GPGError.Error err); + + private void throw_if_error(GPGError.Error error) throws GLib.Error { + if (error.code != GPGError.ErrorCode.NO_ERROR) { + throw new GLib.Error(-1, error.code, "%s", error.to_string()); + } + } +} diff --git a/main/vapi/gstreamer-base-1.0.vapi b/main/vapi/gstreamer-base-1.0.vapi new file mode 100644 index 00000000..04045c69 --- /dev/null +++ b/main/vapi/gstreamer-base-1.0.vapi @@ -0,0 +1,1011 @@ +// Fixme: This is fetched from development code of Vala upstream which fixed a few bugs. +/* gstreamer-base-1.0.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Gst", gir_namespace = "GstBase", gir_version = "1.0", lower_case_cprefix = "gst_")] +namespace Gst { + namespace Base { + [CCode (cheader_filename = "gst/base/base.h", cname = "GstAdapter", lower_case_cprefix = "gst_adapter_", type_id = "gst_adapter_get_type ()")] + [GIR (name = "Adapter")] + public class Adapter : GLib.Object { + [CCode (has_construct_function = false)] + public Adapter (); + public size_t available (); + public size_t available_fast (); + public void clear (); + public void copy ([CCode (array_length_cname = "size", array_length_pos = 2.1, array_length_type = "gsize")] uint8[] dest, size_t offset); + [Version (since = "1.4")] + public GLib.Bytes copy_bytes (size_t offset, size_t size); + [Version (since = "1.10")] + public uint64 distance_from_discont (); + [Version (since = "1.10")] + public Gst.ClockTime dts_at_discont (); + public void flush (size_t flush); + [Version (since = "1.6")] + public Gst.Buffer? get_buffer (size_t nbytes); + [Version (since = "1.6")] + public Gst.Buffer? get_buffer_fast (size_t nbytes); + [Version (since = "1.6")] + public Gst.BufferList? get_buffer_list (size_t nbytes); + [Version (since = "1.6")] + public GLib.List<Gst.Buffer>? get_list (size_t nbytes); + [CCode (array_length = false)] + public unowned uint8[]? map (size_t size); + public ssize_t masked_scan_uint32 (uint32 mask, uint32 pattern, size_t offset, size_t size); + public ssize_t masked_scan_uint32_peek (uint32 mask, uint32 pattern, size_t offset, size_t size, out uint32 value); + [Version (since = "1.10")] + public uint64 offset_at_discont (); + public Gst.ClockTime prev_dts (out uint64 distance); + [Version (since = "1.2")] + public Gst.ClockTime prev_dts_at_offset (size_t offset, out uint64 distance); + [Version (since = "1.10")] + public uint64 prev_offset (out uint64 distance); + public Gst.ClockTime prev_pts (out uint64 distance); + [Version (since = "1.2")] + public Gst.ClockTime prev_pts_at_offset (size_t offset, out uint64 distance); + [Version (since = "1.10")] + public Gst.ClockTime pts_at_discont (); + public void push (owned Gst.Buffer buf); + [CCode (array_length = false)] + public uint8[]? take (size_t nbytes); + public Gst.Buffer? take_buffer (size_t nbytes); + [Version (since = "1.2")] + public Gst.Buffer? take_buffer_fast (size_t nbytes); + [Version (since = "1.6")] + public Gst.BufferList? take_buffer_list (size_t nbytes); + public GLib.List<Gst.Buffer>? take_list (size_t nbytes); + public void unmap (); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstAggregator", lower_case_cprefix = "gst_aggregator_", type_id = "gst_aggregator_get_type ()")] + [GIR (name = "Aggregator")] + [Version (since = "1.14")] + public abstract class Aggregator : Gst.Element { + public weak Gst.Pad srcpad; + [CCode (has_construct_function = false)] + protected Aggregator (); + [NoWrapper] + public virtual Gst.FlowReturn aggregate (bool timeout); + [NoWrapper] + public virtual Gst.Buffer clip (Gst.Base.AggregatorPad aggregator_pad, Gst.Buffer buf); + [NoWrapper] + public virtual bool decide_allocation (Gst.Query query); + public virtual Gst.FlowReturn finish_buffer (owned Gst.Buffer buffer); + [Version (since = "1.18")] + public virtual Gst.FlowReturn finish_buffer_list (owned Gst.BufferList bufferlist); + [NoWrapper] + public virtual Gst.Caps fixate_src_caps (Gst.Caps caps); + [NoWrapper] + public virtual Gst.FlowReturn flush (); + public void get_allocator (out Gst.Allocator? allocator, out unowned Gst.AllocationParams @params); + public Gst.BufferPool? get_buffer_pool (); + [Version (since = "1.20")] + public bool get_ignore_inactive_pads (); + public Gst.ClockTime get_latency (); + [NoWrapper] + public virtual Gst.ClockTime get_next_time (); + [Version (since = "1.18")] + public virtual bool negotiate (); + [NoWrapper] + public virtual bool negotiated_src_caps (Gst.Caps caps); + [Version (since = "1.18")] + public virtual Gst.Sample? peek_next_sample (Gst.Base.AggregatorPad aggregator_pad); + [NoWrapper] + public virtual bool propose_allocation (Gst.Base.AggregatorPad pad, Gst.Query decide_query, Gst.Query query); + [Version (since = "1.18")] + public void selected_samples (Gst.ClockTime pts, Gst.ClockTime dts, Gst.ClockTime duration, Gst.Structure? info); + [Version (since = "1.20")] + public void set_ignore_inactive_pads (bool ignore); + public void set_latency (Gst.ClockTime min_latency, Gst.ClockTime max_latency); + public void set_src_caps (Gst.Caps caps); + [Version (since = "1.16")] + public Gst.ClockTime simple_get_next_time (); + [NoWrapper] + public virtual bool sink_event (Gst.Base.AggregatorPad aggregator_pad, Gst.Event event); + [NoWrapper] + public virtual Gst.FlowReturn sink_event_pre_queue (Gst.Base.AggregatorPad aggregator_pad, Gst.Event event); + [NoWrapper] + public virtual bool sink_query (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query); + [NoWrapper] + public virtual bool sink_query_pre_queue (Gst.Base.AggregatorPad aggregator_pad, Gst.Query query); + [NoWrapper] + public virtual bool src_activate (Gst.PadMode mode, bool active); + [NoWrapper] + public virtual bool src_event (Gst.Event event); + [NoWrapper] + public virtual bool src_query (Gst.Query query); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [Version (since = "1.18")] + public void update_segment (Gst.Segment segment); + [NoWrapper] + public virtual Gst.FlowReturn update_src_caps (Gst.Caps caps, out Gst.Caps ret); + [NoAccessorMethod] + [Version (since = "1.18")] + public bool emit_signals { get; set; } + [NoAccessorMethod] + public uint64 latency { get; set; } + [NoAccessorMethod] + [Version (since = "1.16")] + public uint64 min_upstream_latency { get; set; } + [NoAccessorMethod] + public uint64 start_time { get; set; } + [NoAccessorMethod] + public Gst.Base.AggregatorStartTimeSelection start_time_selection { get; set; } + [Version (since = "1.18")] + public signal void samples_selected (Gst.Segment segment, uint64 pts, uint64 dts, uint64 duration, Gst.Structure? info); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstAggregatorPad", lower_case_cprefix = "gst_aggregator_pad_", type_id = "gst_aggregator_pad_get_type ()")] + [GIR (name = "AggregatorPad")] + [Version (since = "1.14")] + public class AggregatorPad : Gst.Pad { + public weak Gst.Segment segment; + [CCode (has_construct_function = false)] + protected AggregatorPad (); + public bool drop_buffer (); + [NoWrapper] + public virtual Gst.FlowReturn flush (Gst.Base.Aggregator aggregator); + [Version (since = "1.14.1")] + public bool has_buffer (); + public bool is_eos (); + [Version (since = "1.20")] + public bool is_inactive (); + public Gst.Buffer? peek_buffer (); + public Gst.Buffer? pop_buffer (); + [NoWrapper] + public virtual bool skip_buffer (Gst.Base.Aggregator aggregator, Gst.Buffer buffer); + [NoAccessorMethod] + [Version (since = "1.16")] + public bool emit_signals { get; set; } + public signal void buffer_consumed (Gst.Buffer object); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstBitReader", free_function = "gst_bit_reader_free", has_type_id = false)] + [Compact] + [GIR (name = "BitReader")] + public class BitReader { + public uint bit; + public uint byte; + [CCode (array_length_cname = "size", array_length_type = "guint")] + public weak uint8[] data; + public uint size; + [CCode (cname = "gst_bit_reader_new", has_construct_function = false)] + public BitReader ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_bit_reader_free")] + [DestroysInstance] + public void free (); + [CCode (cname = "gst_bit_reader_get_bits_uint16")] + public bool get_bits_uint16 (out uint16 val, uint nbits); + [CCode (cname = "gst_bit_reader_get_bits_uint32")] + public bool get_bits_uint32 (out uint32 val, uint nbits); + [CCode (cname = "gst_bit_reader_get_bits_uint64")] + public bool get_bits_uint64 (out uint64 val, uint nbits); + [CCode (cname = "gst_bit_reader_get_bits_uint8")] + public bool get_bits_uint8 (out uint8 val, uint nbits); + [CCode (cname = "gst_bit_reader_get_pos")] + public uint get_pos (); + [CCode (cname = "gst_bit_reader_get_remaining")] + public uint get_remaining (); + [CCode (cname = "gst_bit_reader_get_size")] + public uint get_size (); + [CCode (cname = "gst_bit_reader_init")] + public void init ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_bit_reader_peek_bits_uint16")] + public bool peek_bits_uint16 (out uint16 val, uint nbits); + [CCode (cname = "gst_bit_reader_peek_bits_uint32")] + public bool peek_bits_uint32 (out uint32 val, uint nbits); + [CCode (cname = "gst_bit_reader_peek_bits_uint64")] + public bool peek_bits_uint64 (out uint64 val, uint nbits); + [CCode (cname = "gst_bit_reader_peek_bits_uint8")] + public bool peek_bits_uint8 (out uint8 val, uint nbits); + [CCode (cname = "gst_bit_reader_set_pos")] + public bool set_pos (uint pos); + [CCode (cname = "gst_bit_reader_skip")] + public bool skip (uint nbits); + [CCode (cname = "gst_bit_reader_skip_to_byte")] + public bool skip_to_byte (); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstByteReader", free_function = "gst_byte_reader_free", has_type_id = false)] + [Compact] + [GIR (name = "ByteReader")] + public class ByteReader { + public uint byte; + [CCode (array_length_cname = "size", array_length_type = "guint")] + public weak uint8[] data; + public uint size; + [CCode (cname = "gst_byte_reader_new", has_construct_function = false)] + public ByteReader ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_byte_reader_dup_data")] + public bool dup_data (uint size, out uint8[] val); + [CCode (cname = "gst_byte_reader_dup_string_utf16")] + public bool dup_string_utf16 ([CCode (array_length = false, array_null_terminated = true)] out uint16[] str); + [CCode (cname = "gst_byte_reader_dup_string_utf32")] + public bool dup_string_utf32 ([CCode (array_length = false, array_null_terminated = true)] out uint32[] str); + [CCode (cname = "gst_byte_reader_dup_string_utf8")] + public bool dup_string_utf8 ([CCode (array_length = false, array_null_terminated = true)] out string[] str); + [CCode (cname = "gst_byte_reader_free")] + [DestroysInstance] + public void free (); + [CCode (cname = "gst_byte_reader_get_data")] + public bool get_data (uint size, out unowned uint8[] val); + [CCode (cname = "gst_byte_reader_get_float32_be")] + public bool get_float32_be (out float val); + [CCode (cname = "gst_byte_reader_get_float32_le")] + public bool get_float32_le (out float val); + [CCode (cname = "gst_byte_reader_get_float64_be")] + public bool get_float64_be (out double val); + [CCode (cname = "gst_byte_reader_get_float64_le")] + public bool get_float64_le (out double val); + [CCode (cname = "gst_byte_reader_get_int16_be")] + public bool get_int16_be (out int16 val); + [CCode (cname = "gst_byte_reader_get_int16_le")] + public bool get_int16_le (out int16 val); + [CCode (cname = "gst_byte_reader_get_int24_be")] + public bool get_int24_be (out int32 val); + [CCode (cname = "gst_byte_reader_get_int24_le")] + public bool get_int24_le (out int32 val); + [CCode (cname = "gst_byte_reader_get_int32_be")] + public bool get_int32_be (out int32 val); + [CCode (cname = "gst_byte_reader_get_int32_le")] + public bool get_int32_le (out int32 val); + [CCode (cname = "gst_byte_reader_get_int64_be")] + public bool get_int64_be (out int64 val); + [CCode (cname = "gst_byte_reader_get_int64_le")] + public bool get_int64_le (out int64 val); + [CCode (cname = "gst_byte_reader_get_int8")] + public bool get_int8 (out int8 val); + [CCode (cname = "gst_byte_reader_get_pos")] + public uint get_pos (); + [CCode (cname = "gst_byte_reader_get_remaining")] + public uint get_remaining (); + [CCode (cname = "gst_byte_reader_get_size")] + public uint get_size (); + [CCode (cname = "gst_byte_reader_get_string_utf8")] + public bool get_string_utf8 ([CCode (array_length = false, array_null_terminated = true)] out unowned string[] str); + [CCode (cname = "gst_byte_reader_get_uint16_be")] + public bool get_uint16_be (out uint16 val); + [CCode (cname = "gst_byte_reader_get_uint16_le")] + public bool get_uint16_le (out uint16 val); + [CCode (cname = "gst_byte_reader_get_uint24_be")] + public bool get_uint24_be (out uint32 val); + [CCode (cname = "gst_byte_reader_get_uint24_le")] + public bool get_uint24_le (out uint32 val); + [CCode (cname = "gst_byte_reader_get_uint32_be")] + public bool get_uint32_be (out uint32 val); + [CCode (cname = "gst_byte_reader_get_uint32_le")] + public bool get_uint32_le (out uint32 val); + [CCode (cname = "gst_byte_reader_get_uint64_be")] + public bool get_uint64_be (out uint64 val); + [CCode (cname = "gst_byte_reader_get_uint64_le")] + public bool get_uint64_le (out uint64 val); + [CCode (cname = "gst_byte_reader_get_uint8")] + public bool get_uint8 (out uint8 val); + [CCode (cname = "gst_byte_reader_init")] + public void init ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_byte_reader_masked_scan_uint32")] + public uint masked_scan_uint32 (uint32 mask, uint32 pattern, uint offset, uint size); + [CCode (cname = "gst_byte_reader_masked_scan_uint32_peek")] + [Version (since = "1.6")] + public uint masked_scan_uint32_peek (uint32 mask, uint32 pattern, uint offset, uint size, out uint32 value); + [CCode (cname = "gst_byte_reader_peek_data")] + public bool peek_data (uint size, out unowned uint8[] val); + [CCode (cname = "gst_byte_reader_peek_float32_be")] + public bool peek_float32_be (out float val); + [CCode (cname = "gst_byte_reader_peek_float32_le")] + public bool peek_float32_le (out float val); + [CCode (cname = "gst_byte_reader_peek_float64_be")] + public bool peek_float64_be (out double val); + [CCode (cname = "gst_byte_reader_peek_float64_le")] + public bool peek_float64_le (out double val); + [CCode (cname = "gst_byte_reader_peek_int16_be")] + public bool peek_int16_be (out int16 val); + [CCode (cname = "gst_byte_reader_peek_int16_le")] + public bool peek_int16_le (out int16 val); + [CCode (cname = "gst_byte_reader_peek_int24_be")] + public bool peek_int24_be (out int32 val); + [CCode (cname = "gst_byte_reader_peek_int24_le")] + public bool peek_int24_le (out int32 val); + [CCode (cname = "gst_byte_reader_peek_int32_be")] + public bool peek_int32_be (out int32 val); + [CCode (cname = "gst_byte_reader_peek_int32_le")] + public bool peek_int32_le (out int32 val); + [CCode (cname = "gst_byte_reader_peek_int64_be")] + public bool peek_int64_be (out int64 val); + [CCode (cname = "gst_byte_reader_peek_int64_le")] + public bool peek_int64_le (out int64 val); + [CCode (cname = "gst_byte_reader_peek_int8")] + public bool peek_int8 (out int8 val); + [CCode (cname = "gst_byte_reader_peek_string_utf8")] + public bool peek_string_utf8 ([CCode (array_length = false, array_null_terminated = true)] out unowned string[] str); + [CCode (cname = "gst_byte_reader_peek_uint16_be")] + public bool peek_uint16_be (out uint16 val); + [CCode (cname = "gst_byte_reader_peek_uint16_le")] + public bool peek_uint16_le (out uint16 val); + [CCode (cname = "gst_byte_reader_peek_uint24_be")] + public bool peek_uint24_be (out uint32 val); + [CCode (cname = "gst_byte_reader_peek_uint24_le")] + public bool peek_uint24_le (out uint32 val); + [CCode (cname = "gst_byte_reader_peek_uint32_be")] + public bool peek_uint32_be (out uint32 val); + [CCode (cname = "gst_byte_reader_peek_uint32_le")] + public bool peek_uint32_le (out uint32 val); + [CCode (cname = "gst_byte_reader_peek_uint64_be")] + public bool peek_uint64_be (out uint64 val); + [CCode (cname = "gst_byte_reader_peek_uint64_le")] + public bool peek_uint64_le (out uint64 val); + [CCode (cname = "gst_byte_reader_peek_uint8")] + public bool peek_uint8 (out uint8 val); + [CCode (cname = "gst_byte_reader_set_pos")] + public bool set_pos (uint pos); + [CCode (cname = "gst_byte_reader_skip")] + public bool skip (uint nbytes); + [CCode (cname = "gst_byte_reader_skip_string_utf16")] + public bool skip_string_utf16 (); + [CCode (cname = "gst_byte_reader_skip_string_utf32")] + public bool skip_string_utf32 (); + [CCode (cname = "gst_byte_reader_skip_string_utf8")] + public bool skip_string_utf8 (); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstByteWriter", free_function = "gst_byte_writer_free", has_type_id = false)] + [Compact] + [GIR (name = "ByteWriter")] + public class ByteWriter { + public uint alloc_size; + public bool fixed; + public bool @owned; + public weak Gst.Base.ByteReader parent; + [CCode (cname = "gst_byte_writer_new", has_construct_function = false)] + public ByteWriter (); + [CCode (cname = "gst_byte_writer_ensure_free_space")] + public bool ensure_free_space (uint size); + [CCode (cname = "gst_byte_writer_fill")] + public bool fill (uint8 value, uint size); + [CCode (cname = "gst_byte_writer_free")] + [DestroysInstance] + public void free (); + [CCode (cname = "gst_byte_writer_free_and_get_buffer")] + [DestroysInstance] + public Gst.Buffer free_and_get_buffer (); + [CCode (cname = "gst_byte_writer_free_and_get_data")] + [DestroysInstance] + public uint8 free_and_get_data (); + [CCode (cname = "gst_byte_writer_get_remaining")] + public uint get_remaining (); + [CCode (cname = "gst_byte_writer_init")] + public void init (); + [CCode (cname = "gst_byte_writer_init_with_data")] + public void init_with_data ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, bool initialized); + [CCode (cname = "gst_byte_writer_init_with_size")] + public void init_with_size (uint size, bool fixed); + [CCode (cname = "gst_byte_writer_put_buffer")] + public bool put_buffer (Gst.Buffer buffer, size_t offset, ssize_t size); + [CCode (cname = "gst_byte_writer_put_data")] + public bool put_data ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_byte_writer_put_float32_be")] + public bool put_float32_be (float val); + [CCode (cname = "gst_byte_writer_put_float32_le")] + public bool put_float32_le (float val); + [CCode (cname = "gst_byte_writer_put_float64_be")] + public bool put_float64_be (double val); + [CCode (cname = "gst_byte_writer_put_float64_le")] + public bool put_float64_le (double val); + [CCode (cname = "gst_byte_writer_put_int16_be")] + public bool put_int16_be (int16 val); + [CCode (cname = "gst_byte_writer_put_int16_le")] + public bool put_int16_le (int16 val); + [CCode (cname = "gst_byte_writer_put_int24_be")] + public bool put_int24_be (int32 val); + [CCode (cname = "gst_byte_writer_put_int24_le")] + public bool put_int24_le (int32 val); + [CCode (cname = "gst_byte_writer_put_int32_be")] + public bool put_int32_be (int32 val); + [CCode (cname = "gst_byte_writer_put_int32_le")] + public bool put_int32_le (int32 val); + [CCode (cname = "gst_byte_writer_put_int64_be")] + public bool put_int64_be (int64 val); + [CCode (cname = "gst_byte_writer_put_int64_le")] + public bool put_int64_le (int64 val); + [CCode (cname = "gst_byte_writer_put_int8")] + public bool put_int8 (int8 val); + [CCode (cname = "gst_byte_writer_put_string_utf16")] + public bool put_string_utf16 ([CCode (array_length = false, array_null_terminated = true)] uint16[] data); + [CCode (cname = "gst_byte_writer_put_string_utf32")] + public bool put_string_utf32 ([CCode (array_length = false, array_null_terminated = true)] uint32[] data); + [CCode (cname = "gst_byte_writer_put_string_utf8")] + public bool put_string_utf8 (string data); + [CCode (cname = "gst_byte_writer_put_uint16_be")] + public bool put_uint16_be (uint16 val); + [CCode (cname = "gst_byte_writer_put_uint16_le")] + public bool put_uint16_le (uint16 val); + [CCode (cname = "gst_byte_writer_put_uint24_be")] + public bool put_uint24_be (uint32 val); + [CCode (cname = "gst_byte_writer_put_uint24_le")] + public bool put_uint24_le (uint32 val); + [CCode (cname = "gst_byte_writer_put_uint32_be")] + public bool put_uint32_be (uint32 val); + [CCode (cname = "gst_byte_writer_put_uint32_le")] + public bool put_uint32_le (uint32 val); + [CCode (cname = "gst_byte_writer_put_uint64_be")] + public bool put_uint64_be (uint64 val); + [CCode (cname = "gst_byte_writer_put_uint64_le")] + public bool put_uint64_le (uint64 val); + [CCode (cname = "gst_byte_writer_put_uint8")] + public bool put_uint8 (uint8 val); + [CCode (cname = "gst_byte_writer_reset")] + public void reset (); + [CCode (cname = "gst_byte_writer_reset_and_get_buffer")] + public Gst.Buffer reset_and_get_buffer (); + [CCode (array_length = false, cname = "gst_byte_writer_reset_and_get_data")] + public uint8[] reset_and_get_data (); + [CCode (cname = "gst_byte_writer_new_with_data", has_construct_function = false)] + public ByteWriter.with_data ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint", type = "guint8*")] uint8[] data, bool initialized); + [CCode (cname = "gst_byte_writer_new_with_size", has_construct_function = false)] + public ByteWriter.with_size (uint size, bool fixed); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPads", lower_case_cprefix = "gst_collect_pads_", type_id = "gst_collect_pads_get_type ()")] + [GIR (name = "CollectPads")] + public class CollectPads : Gst.Object { + public weak GLib.SList<Gst.Base.CollectData?> data; + [CCode (has_construct_function = false)] + public CollectPads (); + public unowned Gst.Base.CollectData? add_pad (Gst.Pad pad, uint size, [CCode (scope = "async")] Gst.Base.CollectDataDestroyNotify destroy_notify, bool @lock); + public uint available (); + public Gst.FlowReturn clip_running_time (Gst.Base.CollectData cdata, Gst.Buffer buf, out Gst.Buffer outbuf, void* user_data); + public bool event_default (Gst.Base.CollectData data, Gst.Event event, bool discard); + public uint flush (Gst.Base.CollectData data, uint size); + public Gst.Buffer? peek (Gst.Base.CollectData data); + public Gst.Buffer? pop (Gst.Base.CollectData data); + public bool query_default (Gst.Base.CollectData data, Gst.Query query, bool discard); + public Gst.Buffer? read_buffer (Gst.Base.CollectData data, uint size); + public bool remove_pad (Gst.Pad pad); + public void set_buffer_function (Gst.Base.CollectPadsBufferFunction func); + public void set_clip_function (Gst.Base.CollectPadsClipFunction clipfunc); + public void set_compare_function (Gst.Base.CollectPadsCompareFunction func); + public void set_event_function (Gst.Base.CollectPadsEventFunction func); + [Version (since = "1.4")] + public void set_flush_function (Gst.Base.CollectPadsFlushFunction func); + public void set_flushing (bool flushing); + public void set_function (Gst.Base.CollectPadsFunction func); + public void set_query_function (Gst.Base.CollectPadsQueryFunction func); + public void set_waiting (Gst.Base.CollectData data, bool waiting); + [Version (since = "1.4")] + public bool src_event_default (Gst.Pad pad, Gst.Event event); + public void start (); + public void stop (); + public Gst.Buffer? take_buffer (Gst.Base.CollectData data, uint size); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstDataQueue", lower_case_cprefix = "gst_data_queue_", type_id = "gst_data_queue_get_type ()")] + [GIR (name = "DataQueue")] + public class DataQueue : GLib.Object { + [CCode (has_construct_function = false)] + protected DataQueue (); + [NoWrapper] + public virtual void empty (); + [NoWrapper] + public virtual void full (); + [NoAccessorMethod] + public uint current_level_bytes { get; } + [NoAccessorMethod] + public uint64 current_level_time { get; } + [NoAccessorMethod] + public uint current_level_visible { get; } + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstFlowCombiner", copy_function = "g_boxed_copy", free_function = "g_boxed_free", lower_case_cprefix = "gst_flow_combiner_", type_id = "gst_flow_combiner_get_type ()")] + [Compact] + [GIR (name = "FlowCombiner")] + [Version (since = "1.4")] + public class FlowCombiner { + [CCode (has_construct_function = false)] + public FlowCombiner (); + public void add_pad (Gst.Pad pad); + [Version (since = "1.6")] + public void clear (); + public void free (); + [Version (since = "1.12.1")] + public unowned Gst.Base.FlowCombiner @ref (); + public void remove_pad (Gst.Pad pad); + [Version (since = "1.6")] + public void reset (); + [Version (since = "1.12.1")] + public void unref (); + public Gst.FlowReturn update_flow (Gst.FlowReturn fret); + [Version (since = "1.6")] + public Gst.FlowReturn update_pad_flow (Gst.Pad pad, Gst.FlowReturn fret); + } + [CCode (cheader_filename = "gst/base/base.h", type_id = "gst_base_parse_get_type ()")] + [GIR (name = "BaseParse")] + public abstract class Parse : Gst.Element { + public uint flags; + public weak Gst.Segment segment; + public weak Gst.Pad sinkpad; + public weak Gst.Pad srcpad; + [CCode (has_construct_function = false)] + protected Parse (); + public bool add_index_entry (uint64 offset, Gst.ClockTime ts, bool key, bool force); + [NoWrapper] + public virtual bool convert (Gst.Format src_format, int64 src_value, Gst.Format dest_format, out int64 dest_value); + public bool convert_default (Gst.Format src_format, int64 src_value, Gst.Format dest_format, out int64 dest_value); + [NoWrapper] + public virtual Gst.FlowReturn detect (Gst.Buffer buffer); + [Version (since = "1.12")] + public void drain (); + public Gst.FlowReturn finish_frame (Gst.Base.ParseFrame frame, int size); + [NoWrapper] + public virtual Gst.Caps get_sink_caps (Gst.Caps filter); + [NoWrapper] + public virtual Gst.FlowReturn handle_frame (Gst.Base.ParseFrame frame, out int skipsize); + [Version (since = "1.6")] + public void merge_tags (Gst.TagList? tags, Gst.TagMergeMode mode); + [NoWrapper] + public virtual Gst.FlowReturn pre_push_frame (Gst.Base.ParseFrame frame); + public Gst.FlowReturn push_frame (Gst.Base.ParseFrame frame); + public void set_average_bitrate (uint bitrate); + public void set_duration (Gst.Format fmt, int64 duration, int interval); + public void set_frame_rate (uint fps_num, uint fps_den, uint lead_in, uint lead_out); + public void set_has_timing_info (bool has_timing); + public void set_infer_ts (bool infer_ts); + public void set_latency (Gst.ClockTime min_latency, Gst.ClockTime max_latency); + public void set_min_frame_size (uint min_size); + public void set_passthrough (bool passthrough); + public void set_pts_interpolation (bool pts_interpolate); + [NoWrapper] + public virtual bool set_sink_caps (Gst.Caps caps); + public void set_syncable (bool syncable); + [Version (since = "1.2")] + public void set_ts_at_offset (size_t offset); + [NoWrapper] + public virtual bool sink_event (Gst.Event event); + [NoWrapper] + public virtual bool sink_query (Gst.Query query); + [NoWrapper] + public virtual bool src_event (Gst.Event event); + [NoWrapper] + public virtual bool src_query (Gst.Query query); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [NoAccessorMethod] + public bool disable_passthrough { get; set; } + } + [CCode (cheader_filename = "gst/base/base.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_base_parse_frame_get_type ()")] + [Compact] + [GIR (name = "BaseParseFrame")] + public class ParseFrame { + public weak Gst.Buffer buffer; + public uint flags; + public uint64 offset; + public weak Gst.Buffer out_buffer; + public int overhead; + [CCode (has_construct_function = false)] + public ParseFrame (Gst.Buffer buffer, Gst.Base.ParseFrameFlags flags, int overhead); + [Version (since = "1.12.1")] + public Gst.Base.ParseFrame copy (); + public void free (); + public void init (); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstPushSrc", lower_case_cprefix = "gst_push_src_", type_id = "gst_push_src_get_type ()")] + [GIR (name = "PushSrc")] + public class PushSrc : Gst.Base.Src { + [CCode (has_construct_function = false)] + protected PushSrc (); + [NoWrapper] + public virtual Gst.FlowReturn alloc (out Gst.Buffer buf); + [NoWrapper] + public virtual Gst.FlowReturn create (out Gst.Buffer buf); + [NoWrapper] + public virtual Gst.FlowReturn fill (Gst.Buffer buf); + } + [CCode (cheader_filename = "gst/base/base.h", type_id = "gst_base_sink_get_type ()")] + [GIR (name = "BaseSink")] + public abstract class Sink : Gst.Element { + public bool can_activate_pull; + public bool can_activate_push; + public bool eos; + public bool have_newsegment; + public bool have_preroll; + public bool need_preroll; + public uint64 offset; + public Gst.PadMode pad_mode; + public bool playing_async; + public GLib.Cond preroll_cond; + public GLib.Mutex preroll_lock; + public weak Gst.Segment segment; + public weak Gst.Pad sinkpad; + [CCode (has_construct_function = false)] + protected Sink (); + [NoWrapper] + public virtual bool activate_pull (bool active); + public Gst.FlowReturn do_preroll (Gst.MiniObject obj); + [NoWrapper] + public virtual bool event (Gst.Event event); + [NoWrapper] + public virtual Gst.Caps fixate (Gst.Caps caps); + public uint get_blocksize (); + [NoWrapper] + public virtual Gst.Caps get_caps (Gst.Caps? filter); + [Version (since = "1.12")] + public bool get_drop_out_of_segment (); + public Gst.Sample? get_last_sample (); + public Gst.ClockTime get_latency (); + [Version (since = "1.2")] + public uint64 get_max_bitrate (); + public int64 get_max_lateness (); + [Version (since = "1.16")] + public Gst.ClockTime get_processing_deadline (); + public Gst.ClockTime get_render_delay (); + [Version (since = "1.18")] + public Gst.Structure get_stats (); + public bool get_sync (); + public uint64 get_throttle_time (); + [NoWrapper] + public virtual void get_times (Gst.Buffer buffer, out Gst.ClockTime start, out Gst.ClockTime end); + public Gst.ClockTimeDiff get_ts_offset (); + public bool is_async_enabled (); + public bool is_last_sample_enabled (); + public bool is_qos_enabled (); + [NoWrapper] + public virtual Gst.FlowReturn prepare (Gst.Buffer buffer); + [NoWrapper] + public virtual Gst.FlowReturn prepare_list (Gst.BufferList buffer_list); + [NoWrapper] + public virtual Gst.FlowReturn preroll (Gst.Buffer buffer); + [NoWrapper] + public virtual bool propose_allocation (Gst.Query query); + [NoWrapper] + public virtual bool query (Gst.Query query); + public bool query_latency (out bool live, out bool upstream_live, out Gst.ClockTime min_latency, out Gst.ClockTime max_latency); + [NoWrapper] + public virtual Gst.FlowReturn render (Gst.Buffer buffer); + [NoWrapper] + public virtual Gst.FlowReturn render_list (Gst.BufferList buffer_list); + public void set_async_enabled (bool enabled); + public void set_blocksize (uint blocksize); + [NoWrapper] + public virtual bool set_caps (Gst.Caps caps); + [Version (since = "1.12")] + public void set_drop_out_of_segment (bool drop_out_of_segment); + public void set_last_sample_enabled (bool enabled); + [Version (since = "1.2")] + public void set_max_bitrate (uint64 max_bitrate); + public void set_max_lateness (int64 max_lateness); + [Version (since = "1.16")] + public void set_processing_deadline (Gst.ClockTime processing_deadline); + public void set_qos_enabled (bool enabled); + public void set_render_delay (Gst.ClockTime delay); + public void set_sync (bool sync); + public void set_throttle_time (uint64 throttle); + public void set_ts_offset (Gst.ClockTimeDiff offset); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [NoWrapper] + public virtual bool @unlock (); + [NoWrapper] + public virtual bool unlock_stop (); + public Gst.FlowReturn wait (Gst.ClockTime time, out Gst.ClockTimeDiff jitter); + public Gst.ClockReturn wait_clock (Gst.ClockTime time, out Gst.ClockTimeDiff jitter); + [NoWrapper] + public virtual Gst.FlowReturn wait_event (Gst.Event event); + public Gst.FlowReturn wait_preroll (); + [NoAccessorMethod] + public bool @async { get; set; } + public uint blocksize { get; set; } + [NoAccessorMethod] + public bool enable_last_sample { get; set; } + public Gst.Sample last_sample { owned get; } + [Version (since = "1.2")] + public uint64 max_bitrate { get; set; } + public int64 max_lateness { get; set; } + [Version (since = "1.16")] + public uint64 processing_deadline { get; set; } + [NoAccessorMethod] + public bool qos { get; set; } + public uint64 render_delay { get; set; } + [Version (since = "1.18")] + public Gst.Structure stats { owned get; } + public bool sync { get; set; } + public uint64 throttle_time { get; set; } + public int64 ts_offset { get; set; } + } + [CCode (cheader_filename = "gst/base/base.h", type_id = "gst_base_src_get_type ()")] + [GIR (name = "BaseSrc")] + public abstract class Src : Gst.Element { + public bool can_activate_push; + public Gst.ClockID clock_id; + public GLib.Cond live_cond; + public GLib.Mutex live_lock; + public bool live_running; + public bool need_newsegment; + public int num_buffers_left; + public weak Gst.Event pending_seek; + public bool random_access; + public bool running; + public weak Gst.Segment segment; + public weak Gst.Pad srcpad; + [CCode (has_construct_function = false)] + protected Src (); + [NoWrapper] + public virtual Gst.FlowReturn alloc (uint64 offset, uint size, out Gst.Buffer buf); + [NoWrapper] + public virtual Gst.FlowReturn create (uint64 offset, uint size, ref Gst.Buffer buf); + [NoWrapper] + public virtual bool decide_allocation (Gst.Query query); + [NoWrapper] + public virtual bool do_seek (Gst.Segment segment); + [NoWrapper] + public virtual bool event (Gst.Event event); + [NoWrapper] + public virtual Gst.FlowReturn fill (uint64 offset, uint size, Gst.Buffer buf); + [NoWrapper] + public virtual Gst.Caps fixate (Gst.Caps caps); + public void get_allocator (out Gst.Allocator? allocator, out unowned Gst.AllocationParams @params); + public uint get_blocksize (); + public Gst.BufferPool? get_buffer_pool (); + [NoWrapper] + public virtual Gst.Caps get_caps (Gst.Caps? filter); + public bool get_do_timestamp (); + [NoWrapper] + public virtual bool get_size (out uint64 size); + [NoWrapper] + public virtual void get_times (Gst.Buffer buffer, out Gst.ClockTime start, out Gst.ClockTime end); + public bool is_async (); + [NoWrapper] + public virtual bool is_seekable (); + [Version (since = "1.18")] + public virtual bool negotiate (); + [Version (deprecated = true, deprecated_since = "1.18")] + public bool new_seamless_segment (int64 start, int64 stop, int64 time); + [Version (since = "1.18")] + public bool new_segment (Gst.Segment segment); + [NoWrapper] + public virtual bool prepare_seek_segment (Gst.Event seek, Gst.Segment segment); + [NoWrapper] + public virtual bool query (Gst.Query query); + public bool query_latency (out bool live, out Gst.ClockTime min_latency, out Gst.ClockTime max_latency); + public void set_async (bool @async); + [Version (since = "1.4")] + public void set_automatic_eos (bool automatic_eos); + public void set_blocksize (uint blocksize); + public virtual bool set_caps (Gst.Caps caps); + public void set_do_timestamp (bool timestamp); + public void set_dynamic_size (bool @dynamic); + public void set_format (Gst.Format format); + public void set_live (bool live); + [NoWrapper] + public virtual bool start (); + public void start_complete (Gst.FlowReturn ret); + public Gst.FlowReturn start_wait (); + [NoWrapper] + public virtual bool stop (); + [Version (since = "1.14")] + public void submit_buffer_list (owned Gst.BufferList buffer_list); + [NoWrapper] + public virtual bool @unlock (); + [NoWrapper] + public virtual bool unlock_stop (); + public Gst.FlowReturn wait_playing (); + public uint blocksize { get; set; } + public bool do_timestamp { get; set; } + [NoAccessorMethod] + public int num_buffers { get; set; } + [NoAccessorMethod] + public bool typefind { get; set; } + } + [CCode (cheader_filename = "gst/base/base.h", type_id = "gst_base_transform_get_type ()")] + [GIR (name = "BaseTransform")] + public abstract class Transform : Gst.Element { + public bool have_segment; + public weak Gst.Buffer queued_buf; + public weak Gst.Segment segment; + public weak Gst.Pad sinkpad; + public weak Gst.Pad srcpad; + [CCode (has_construct_function = false)] + protected Transform (); + [NoWrapper] + public virtual bool accept_caps (Gst.PadDirection direction, Gst.Caps caps); + [NoWrapper] + public virtual void before_transform (Gst.Buffer buffer); + [NoWrapper] + public virtual bool copy_metadata (Gst.Buffer input, Gst.Buffer outbuf); + [NoWrapper] + public virtual bool decide_allocation (Gst.Query query); + [NoWrapper] + public virtual bool filter_meta (Gst.Query query, GLib.Type api, Gst.Structure @params); + [NoWrapper] + public virtual Gst.Caps fixate_caps (Gst.PadDirection direction, Gst.Caps caps, owned Gst.Caps othercaps); + [NoWrapper] + public virtual Gst.FlowReturn generate_output (out Gst.Buffer outbuf); + public void get_allocator (out Gst.Allocator? allocator, out unowned Gst.AllocationParams @params); + public Gst.BufferPool? get_buffer_pool (); + [NoWrapper] + public virtual bool get_unit_size (Gst.Caps caps, out size_t size); + public bool is_in_place (); + public bool is_passthrough (); + public bool is_qos_enabled (); + [NoWrapper] + public virtual Gst.FlowReturn prepare_output_buffer (Gst.Buffer input, out Gst.Buffer outbuf); + [NoWrapper] + public virtual bool propose_allocation (Gst.Query decide_query, Gst.Query query); + [NoWrapper] + public virtual bool query (Gst.PadDirection direction, Gst.Query query); + [Version (since = "1.18")] + public bool reconfigure (); + public void reconfigure_sink (); + public void reconfigure_src (); + [NoWrapper] + public virtual bool set_caps (Gst.Caps incaps, Gst.Caps outcaps); + public void set_gap_aware (bool gap_aware); + public void set_in_place (bool in_place); + public void set_passthrough (bool passthrough); + [Version (since = "1.0.1")] + public void set_prefer_passthrough (bool prefer_passthrough); + public void set_qos_enabled (bool enabled); + [NoWrapper] + public virtual bool sink_event (owned Gst.Event event); + [NoWrapper] + public virtual bool src_event (owned Gst.Event event); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [NoWrapper] + public virtual Gst.FlowReturn submit_input_buffer (bool is_discont, Gst.Buffer input); + [NoWrapper] + public virtual Gst.FlowReturn transform (Gst.Buffer inbuf, Gst.Buffer outbuf); + [NoWrapper] + public virtual Gst.Caps transform_caps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps filter); + [NoWrapper] + public virtual Gst.FlowReturn transform_ip (Gst.Buffer buf); + [NoWrapper] + public virtual bool transform_meta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf); + [NoWrapper] + public virtual bool transform_size (Gst.PadDirection direction, Gst.Caps caps, size_t size, Gst.Caps othercaps, out size_t othersize); + public void update_qos (double proportion, Gst.ClockTimeDiff diff, Gst.ClockTime timestamp); + [Version (since = "1.6")] + public bool update_src_caps (Gst.Caps updated_caps); + [NoAccessorMethod] + public bool qos { get; set; } + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstBitWriter", has_type_id = false)] + [GIR (name = "BitWriter")] + [Version (since = "1.16")] + public struct BitWriter { + public uint8 data; + public uint bit_size; + [CCode (cname = "gst_bit_writer_align_bytes")] + public bool align_bytes (uint8 trailing_bit); + [CCode (cname = "gst_bit_writer_free")] + [DestroysInstance] + public void free (); + [CCode (cname = "gst_bit_writer_free_and_get_buffer")] + [DestroysInstance] + public Gst.Buffer free_and_get_buffer (); + [CCode (array_length = false, cname = "gst_bit_writer_free_and_get_data")] + [DestroysInstance] + public uint8[] free_and_get_data (); + [CCode (array_length = false, cname = "gst_bit_writer_get_data")] + public unowned uint8[] get_data (); + [CCode (cname = "gst_bit_writer_get_remaining")] + public uint get_remaining (); + [CCode (cname = "gst_bit_writer_get_size")] + public uint get_size (); + [CCode (cname = "gst_bit_writer_put_bits_uint16")] + public bool put_bits_uint16 (uint16 value, uint nbits); + [CCode (cname = "gst_bit_writer_put_bits_uint32")] + public bool put_bits_uint32 (uint32 value, uint nbits); + [CCode (cname = "gst_bit_writer_put_bits_uint64")] + public bool put_bits_uint64 (uint64 value, uint nbits); + [CCode (cname = "gst_bit_writer_put_bits_uint8")] + public bool put_bits_uint8 (uint8 value, uint nbits); + [CCode (cname = "gst_bit_writer_put_bytes")] + public bool put_bytes ([CCode (array_length_cname = "nbytes", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cname = "gst_bit_writer_reset")] + public void reset (); + [CCode (cname = "gst_bit_writer_reset_and_get_buffer")] + public Gst.Buffer reset_and_get_buffer (); + [CCode (array_length = false, cname = "gst_bit_writer_reset_and_get_data")] + public uint8[] reset_and_get_data (); + [CCode (cname = "gst_bit_writer_set_pos")] + public bool set_pos (uint pos); + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectData", has_type_id = false)] + [GIR (name = "CollectData")] + public struct CollectData { + public weak Gst.Base.CollectPads collect; + public weak Gst.Pad pad; + public weak Gst.Buffer buffer; + public uint pos; + public weak Gst.Segment segment; + [CCode (cname = "ABI.abi.dts")] + public int64 ABI_abi_dts; + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstAggregatorStartTimeSelection", cprefix = "GST_AGGREGATOR_START_TIME_SELECTION_", type_id = "gst_aggregator_start_time_selection_get_type ()")] + [GIR (name = "AggregatorStartTimeSelection")] + [Version (since = "1.18")] + public enum AggregatorStartTimeSelection { + ZERO, + FIRST, + SET + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsStateFlags", cprefix = "GST_COLLECT_PADS_STATE_", has_type_id = false)] + [Flags] + [GIR (name = "CollectPadsStateFlags")] + public enum CollectPadsStateFlags { + EOS, + FLUSHING, + NEW_SEGMENT, + WAITING, + LOCKED + } + [CCode (cheader_filename = "gst/base/base.h", cprefix = "GST_BASE_PARSE_FRAME_FLAG_", has_type_id = false)] + [Flags] + [GIR (name = "BaseParseFrameFlags")] + public enum ParseFrameFlags { + NONE, + NEW_FRAME, + NO_FRAME, + CLIP, + DROP, + QUEUE + } + [CCode (cheader_filename = "gst/base/base.h", cprefix = "GST_BASE_SRC_FLAG_", has_type_id = false)] + [Flags] + [GIR (name = "BaseSrcFlags")] + public enum SrcFlags { + STARTING, + STARTED, + LAST + } + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectDataDestroyNotify", has_target = false)] + public delegate void CollectDataDestroyNotify (Gst.Base.CollectData data); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsBufferFunction", instance_pos = 3.9)] + public delegate Gst.FlowReturn CollectPadsBufferFunction (Gst.Base.CollectPads pads, Gst.Base.CollectData data, owned Gst.Buffer buffer); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsClipFunction", instance_pos = 4.9)] + public delegate Gst.FlowReturn CollectPadsClipFunction (Gst.Base.CollectPads pads, Gst.Base.CollectData data, owned Gst.Buffer inbuffer, out Gst.Buffer outbuffer); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsCompareFunction", instance_pos = 5.9)] + public delegate int CollectPadsCompareFunction (Gst.Base.CollectPads pads, Gst.Base.CollectData data1, Gst.ClockTime timestamp1, Gst.Base.CollectData data2, Gst.ClockTime timestamp2); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsEventFunction", instance_pos = 3.9)] + public delegate bool CollectPadsEventFunction (Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Event event); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsFlushFunction", instance_pos = 1.9)] + [Version (since = "1.4")] + public delegate void CollectPadsFlushFunction (Gst.Base.CollectPads pads); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsFunction", instance_pos = 1.9)] + public delegate Gst.FlowReturn CollectPadsFunction (Gst.Base.CollectPads pads); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstCollectPadsQueryFunction", instance_pos = 3.9)] + public delegate bool CollectPadsQueryFunction (Gst.Base.CollectPads pads, Gst.Base.CollectData pad, Gst.Query query); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstDataQueueEmptyCallback", has_target = false)] + public delegate void DataQueueEmptyCallback (Gst.Base.DataQueue queue, void* checkdata); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstDataQueueFullCallback", has_target = false)] + public delegate void DataQueueFullCallback (Gst.Base.DataQueue queue, void* checkdata); + [CCode (cheader_filename = "gst/base/base.h", cname = "GstTypeFindHelperGetRangeFunction", has_target = false)] + public delegate Gst.FlowReturn TypeFindHelperGetRangeFunction (Gst.Object obj, Gst.Object? parent, uint64 offset, uint length, out Gst.Buffer buffer); + [CCode (cheader_filename = "gst/base/base.h", cname = "GST_BASE_PARSE_FLAG_DRAINING")] + public const int PARSE_FLAG_DRAINING; + [CCode (cheader_filename = "gst/base/base.h", cname = "GST_BASE_PARSE_FLAG_LOST_SYNC")] + public const int PARSE_FLAG_LOST_SYNC; + [CCode (cheader_filename = "gst/base/base.h", cname = "GST_BASE_TRANSFORM_SINK_NAME")] + public const string TRANSFORM_SINK_NAME; + [CCode (cheader_filename = "gst/base/base.h", cname = "GST_BASE_TRANSFORM_SRC_NAME")] + public const string TRANSFORM_SRC_NAME; + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper")] + public static Gst.Caps? type_find_helper (Gst.Pad src, uint64 size); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_for_buffer")] + public static Gst.Caps? type_find_helper_for_buffer (Gst.Object? obj, Gst.Buffer buf, out Gst.TypeFindProbability prob); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_for_buffer_with_extension")] + [Version (since = "1.16")] + public static Gst.Caps? type_find_helper_for_buffer_with_extension (Gst.Object? obj, Gst.Buffer buf, string? extension, out Gst.TypeFindProbability prob); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_for_data")] + public static Gst.Caps? type_find_helper_for_data (Gst.Object? obj, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, out Gst.TypeFindProbability prob); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_for_data_with_extension")] + [Version (since = "1.16")] + public static Gst.Caps? type_find_helper_for_data_with_extension (Gst.Object? obj, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, string? extension, out Gst.TypeFindProbability prob); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_for_extension")] + public static Gst.Caps? type_find_helper_for_extension (Gst.Object? obj, string extension); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_get_range")] + public static Gst.Caps? type_find_helper_get_range (Gst.Object obj, Gst.Object? parent, Gst.Base.TypeFindHelperGetRangeFunction func, uint64 size, string? extension, out Gst.TypeFindProbability prob); + [CCode (cheader_filename = "gst/base/base.h", cname = "gst_type_find_helper_get_range_full")] + [Version (since = "1.14.3")] + public static Gst.FlowReturn type_find_helper_get_range_full (Gst.Object obj, Gst.Object? parent, Gst.Base.TypeFindHelperGetRangeFunction func, uint64 size, string? extension, out Gst.Caps caps, out Gst.TypeFindProbability prob); + } +} diff --git a/main/vapi/gstreamer-rtp-1.0.vapi b/main/vapi/gstreamer-rtp-1.0.vapi new file mode 100644 index 00000000..35ad6619 --- /dev/null +++ b/main/vapi/gstreamer-rtp-1.0.vapi @@ -0,0 +1,724 @@ +// Fixme: This is fetched from development code of Vala upstream which fixed a few bugs. +/* gstreamer-rtp-1.0.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Gst", gir_namespace = "GstRtp", gir_version = "1.0", lower_case_cprefix = "gst_")] +namespace Gst { + namespace RTCP { + [CCode (cheader_filename = "gst/rtp/rtp.h", has_type_id = false)] + [GIR (name = "RTCPBuffer")] + public struct Buffer { + public weak Gst.Buffer buffer; + public bool add_packet (Gst.RTCP.Type type, Gst.RTCP.Packet packet); + public bool get_first_packet (Gst.RTCP.Packet packet); + public uint get_packet_count (); + public static bool map (Gst.Buffer buffer, Gst.MapFlags flags, out Gst.RTCP.Buffer rtcp); + public static Gst.Buffer @new (uint mtu); + public static Gst.Buffer new_copy_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + public static Gst.Buffer new_take_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] owned uint8[] data); + public bool unmap (); + public static bool validate (Gst.Buffer buffer); + public static bool validate_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [Version (since = "1.6")] + public static bool validate_data_reduced ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [Version (since = "1.6")] + public static bool validate_reduced (Gst.Buffer buffer); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", has_type_id = false)] + [GIR (name = "RTCPPacket")] + public struct Packet { + public weak Gst.RTCP.Buffer? rtcp; + public uint offset; + [Version (since = "1.10")] + public bool add_profile_specific_ext ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + public bool add_rb (uint32 ssrc, uint8 fractionlost, int32 packetslost, uint32 exthighestseq, uint32 jitter, uint32 lsr, uint32 dlsr); + [Version (since = "1.10")] + public uint8 app_get_data (); + [Version (since = "1.10")] + public uint16 app_get_data_length (); + [Version (since = "1.10")] + public unowned string app_get_name (); + [Version (since = "1.10")] + public uint32 app_get_ssrc (); + [Version (since = "1.10")] + public uint8 app_get_subtype (); + [Version (since = "1.10")] + public bool app_set_data_length (uint16 wordlen); + [Version (since = "1.10")] + public void app_set_name (string name); + [Version (since = "1.10")] + public void app_set_ssrc (uint32 ssrc); + [Version (since = "1.10")] + public void app_set_subtype (uint8 subtype); + public bool bye_add_ssrc (uint32 ssrc); + public bool bye_add_ssrcs ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint32[] ssrc); + public uint32 bye_get_nth_ssrc (uint nth); + public string bye_get_reason (); + public uint8 bye_get_reason_len (); + public uint bye_get_ssrc_count (); + public bool bye_set_reason (string reason); + [Version (since = "1.10")] + public bool copy_profile_specific_ext ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] out uint8[] data); + public uint8 fb_get_fci (); + public uint16 fb_get_fci_length (); + public uint32 fb_get_media_ssrc (); + public uint32 fb_get_sender_ssrc (); + public Gst.RTCP.FBType fb_get_type (); + public bool fb_set_fci_length (uint16 wordlen); + public void fb_set_media_ssrc (uint32 ssrc); + public void fb_set_sender_ssrc (uint32 ssrc); + public void fb_set_type (Gst.RTCP.FBType type); + public uint8 get_count (); + public uint16 get_length (); + public bool get_padding (); + [Version (since = "1.10")] + public bool get_profile_specific_ext ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] out unowned uint8[] data); + [Version (since = "1.10")] + public uint16 get_profile_specific_ext_length (); + public void get_rb (uint nth, out uint32 ssrc, out uint8 fractionlost, out int32 packetslost, out uint32 exthighestseq, out uint32 jitter, out uint32 lsr, out uint32 dlsr); + public uint get_rb_count (); + public Gst.RTCP.Type get_type (); + public bool move_to_next (); + public bool remove (); + public uint32 rr_get_ssrc (); + public void rr_set_ssrc (uint32 ssrc); + public bool sdes_add_entry (Gst.RTCP.SDESType type, [CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "guint8")] uint8[] data); + public bool sdes_add_item (uint32 ssrc); + public bool sdes_copy_entry (out Gst.RTCP.SDESType type, [CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "guint8")] out uint8[] data); + public bool sdes_first_entry (); + public bool sdes_first_item (); + public bool sdes_get_entry (out Gst.RTCP.SDESType type, [CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "guint8")] out unowned uint8[] data); + public uint sdes_get_item_count (); + public uint32 sdes_get_ssrc (); + public bool sdes_next_entry (); + public bool sdes_next_item (); + public void set_rb (uint nth, uint32 ssrc, uint8 fractionlost, int32 packetslost, uint32 exthighestseq, uint32 jitter, uint32 lsr, uint32 dlsr); + public void sr_get_sender_info (out uint32 ssrc, out uint64 ntptime, out uint32 rtptime, out uint32 packet_count, out uint32 octet_count); + public void sr_set_sender_info (uint32 ssrc, uint64 ntptime, uint32 rtptime, uint32 packet_count, uint32 octet_count); + [Version (since = "1.16")] + public bool xr_first_rb (); + [Version (since = "1.16")] + public uint16 xr_get_block_length (); + [Version (since = "1.16")] + public Gst.RTCP.XRType xr_get_block_type (); + [Version (since = "1.16")] + public bool xr_get_dlrr_block (uint nth, out uint32 ssrc, out uint32 last_rr, out uint32 delay); + [Version (since = "1.16")] + public bool xr_get_prt_by_seq (uint16 seq, out uint32 receipt_time); + [Version (since = "1.16")] + public bool xr_get_prt_info (out uint32 ssrc, out uint8 thinning, out uint16 begin_seq, out uint16 end_seq); + [Version (since = "1.16")] + public bool xr_get_rle_info (out uint32 ssrc, out uint8 thinning, out uint16 begin_seq, out uint16 end_seq, out uint32 chunk_count); + [Version (since = "1.16")] + public bool xr_get_rle_nth_chunk (uint nth, out uint16 chunk); + [Version (since = "1.16")] + public bool xr_get_rrt (out uint64 timestamp); + [Version (since = "1.16")] + public uint32 xr_get_ssrc (); + [Version (since = "1.16")] + public bool xr_get_summary_info (out uint32 ssrc, out uint16 begin_seq, out uint16 end_seq); + [Version (since = "1.16")] + public bool xr_get_summary_jitter (out uint32 min_jitter, out uint32 max_jitter, out uint32 mean_jitter, out uint32 dev_jitter); + [Version (since = "1.16")] + public bool xr_get_summary_pkt (out uint32 lost_packets, out uint32 dup_packets); + [Version (since = "1.16")] + public bool xr_get_summary_ttl (out bool is_ipv4, out uint8 min_ttl, out uint8 max_ttl, out uint8 mean_ttl, out uint8 dev_ttl); + [Version (since = "1.16")] + public bool xr_get_voip_burst_metrics (out uint8 burst_density, out uint8 gap_density, out uint16 burst_duration, out uint16 gap_duration); + [Version (since = "1.16")] + public bool xr_get_voip_configuration_params (out uint8 gmin, out uint8 rx_config); + [Version (since = "1.16")] + public bool xr_get_voip_delay_metrics (out uint16 roundtrip_delay, out uint16 end_system_delay); + [Version (since = "1.16")] + public bool xr_get_voip_jitter_buffer_params (out uint16 jb_nominal, out uint16 jb_maximum, out uint16 jb_abs_max); + [Version (since = "1.16")] + public bool xr_get_voip_metrics_ssrc (out uint32 ssrc); + [Version (since = "1.16")] + public bool xr_get_voip_packet_metrics (out uint8 loss_rate, out uint8 discard_rate); + [Version (since = "1.16")] + public bool xr_get_voip_quality_metrics (out uint8 r_factor, out uint8 ext_r_factor, out uint8 mos_lq, out uint8 mos_cq); + [Version (since = "1.16")] + public bool xr_get_voip_signal_metrics (out uint8 signal_level, out uint8 noise_level, out uint8 rerl, out uint8 gmin); + [Version (since = "1.16")] + public bool xr_next_rb (); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTCP_", type_id = "gst_rtcpfb_type_get_type ()")] + [GIR (name = "RTCPFBType")] + public enum FBType { + FB_TYPE_INVALID, + RTPFB_TYPE_NACK, + RTPFB_TYPE_TMMBR, + RTPFB_TYPE_TMMBN, + RTPFB_TYPE_RTCP_SR_REQ, + RTPFB_TYPE_TWCC, + PSFB_TYPE_PLI, + PSFB_TYPE_SLI, + PSFB_TYPE_RPSI, + PSFB_TYPE_AFB, + PSFB_TYPE_FIR, + PSFB_TYPE_TSTR, + PSFB_TYPE_TSTN, + PSFB_TYPE_VBCN + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTCP_SDES_", type_id = "gst_rtcpsdes_type_get_type ()")] + [GIR (name = "RTCPSDESType")] + public enum SDESType { + INVALID, + END, + CNAME, + NAME, + EMAIL, + PHONE, + LOC, + TOOL, + NOTE, + PRIV, + [Version (since = "1.20")] + H323_CADDR, + [Version (since = "1.20")] + APSI, + [Version (since = "1.20")] + RGRP, + [Version (since = "1.20")] + RTP_STREAM_ID, + [Version (since = "1.20")] + REPAIRED_RTP_STREAM_ID, + [Version (since = "1.20")] + CCID, + [Version (since = "1.20")] + MID; + [CCode (cname = "gst_rtcp_sdes_name_to_type")] + public static Gst.RTCP.SDESType from_string (string name); + [CCode (cname = "gst_rtcp_sdes_type_to_name")] + public unowned string to_string (); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTCP_TYPE_", type_id = "gst_rtcp_type_get_type ()")] + [GIR (name = "RTCPType")] + public enum Type { + INVALID, + SR, + RR, + SDES, + BYE, + APP, + RTPFB, + PSFB, + XR + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTCP_XR_TYPE_", type_id = "gst_rtcpxr_type_get_type ()")] + [GIR (name = "RTCPXRType")] + [Version (since = "1.16")] + public enum XRType { + INVALID, + LRLE, + DRLE, + PRT, + RRT, + DLRR, + SSUMM, + VOIP_METRICS + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_MAX_BYE_SSRC_COUNT")] + public const int MAX_BYE_SSRC_COUNT; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_MAX_RB_COUNT")] + public const int MAX_RB_COUNT; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_MAX_SDES")] + public const int MAX_SDES; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_MAX_SDES_ITEM_COUNT")] + public const int MAX_SDES_ITEM_COUNT; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_REDUCED_SIZE_VALID_MASK")] + public const int REDUCED_SIZE_VALID_MASK; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_VALID_MASK")] + public const int VALID_MASK; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_VALID_VALUE")] + public const int VALID_VALUE; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTCP_VERSION")] + public const int VERSION; + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.map")] + public static bool buffer_map (Gst.Buffer buffer, Gst.MapFlags flags, Gst.RTCP.Buffer rtcp); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.new")] + public static Gst.Buffer buffer_new (uint mtu); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.new_copy_data")] + public static Gst.Buffer buffer_new_copy_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.new_take_data")] + public static Gst.Buffer buffer_new_take_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.validate")] + public static bool buffer_validate (Gst.Buffer buffer); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.validate_data")] + public static bool buffer_validate_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.validate_data_reduced", since = "1.6")] + public static bool buffer_validate_data_reduced ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTCPBuffer.validate_reduced", since = "1.6")] + public static bool buffer_validate_reduced (Gst.Buffer buffer); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static uint64 ntp_to_unix (uint64 ntptime); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static uint64 unix_to_ntp (uint64 unixtime); + } + namespace RTP { + [CCode (cheader_filename = "gst/rtp/rtp.h", type_id = "gst_rtp_base_audio_payload_get_type ()")] + [GIR (name = "RTPBaseAudioPayload")] + public class BaseAudioPayload : Gst.RTP.BasePayload { + public Gst.ClockTime base_ts; + public int frame_duration; + public int frame_size; + public int sample_size; + [CCode (has_construct_function = false)] + protected BaseAudioPayload (); + public Gst.FlowReturn flush (uint payload_len, Gst.ClockTime timestamp); + public Gst.Base.Adapter get_adapter (); + public Gst.FlowReturn push ([CCode (array_length_cname = "payload_len", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, Gst.ClockTime timestamp); + public void set_frame_based (); + public void set_frame_options (int frame_duration, int frame_size); + public void set_sample_based (); + public void set_sample_options (int sample_size); + public void set_samplebits_options (int sample_size); + [NoAccessorMethod] + public bool buffer_list { get; set; } + } + [CCode (cheader_filename = "gst/rtp/rtp.h", type_id = "gst_rtp_base_depayload_get_type ()")] + [GIR (name = "RTPBaseDepayload")] + public abstract class BaseDepayload : Gst.Element { + public uint clock_rate; + public bool need_newsegment; + public weak Gst.Segment segment; + public weak Gst.Pad sinkpad; + public weak Gst.Pad srcpad; + [CCode (has_construct_function = false)] + protected BaseDepayload (); + [NoWrapper] + public virtual bool handle_event (Gst.Event event); + [Version (since = "1.16")] + public bool is_source_info_enabled (); + [NoWrapper] + public virtual bool packet_lost (Gst.Event event); + [NoWrapper] + public virtual Gst.Buffer process (Gst.Buffer @in); + [NoWrapper] + public virtual Gst.Buffer process_rtp_packet (Gst.RTP.Buffer rtp_buffer); + public Gst.FlowReturn push (Gst.Buffer out_buf); + public Gst.FlowReturn push_list (Gst.BufferList out_list); + [NoWrapper] + public virtual bool set_caps (Gst.Caps caps); + [Version (since = "1.16")] + public void set_source_info_enabled (bool enable); + [NoAccessorMethod] + [Version (since = "1.20")] + public bool auto_header_extension { get; set; } + [NoAccessorMethod] + [Version (since = "1.18")] + public int max_reorder { get; set; } + [NoAccessorMethod] + [Version (since = "1.16")] + public bool source_info { get; set; } + [NoAccessorMethod] + public Gst.Structure stats { owned get; } + [Version (since = "1.20")] + public signal void add_extension (owned Gst.RTP.HeaderExtension ext); + [Version (since = "1.20")] + public signal void clear_extensions (); + [Version (since = "1.20")] + public signal Gst.RTP.HeaderExtension request_extension (uint ext_id, string? ext_uri); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", type_id = "gst_rtp_base_payload_get_type ()")] + [GIR (name = "RTPBasePayload")] + public abstract class BasePayload : Gst.Element { + [CCode (has_construct_function = false)] + protected BasePayload (); + [Version (since = "1.16")] + public Gst.Buffer allocate_output_buffer (uint payload_len, uint8 pad_len, uint8 csrc_count); + [NoWrapper] + public virtual Gst.Caps get_caps (Gst.Pad pad, Gst.Caps filter); + [Version (since = "1.16")] + public uint get_source_count (Gst.Buffer buffer); + [NoWrapper] + public virtual Gst.FlowReturn handle_buffer (Gst.Buffer buffer); + public bool is_filled (uint size, Gst.ClockTime duration); + [Version (since = "1.16")] + public bool is_source_info_enabled (); + public Gst.FlowReturn push (owned Gst.Buffer buffer); + public Gst.FlowReturn push_list (owned Gst.BufferList list); + [NoWrapper] + public virtual bool query (Gst.Pad pad, Gst.Query query); + [NoWrapper] + public virtual bool set_caps (Gst.Caps caps); + public void set_options (string media, bool @dynamic, string encoding_name, uint32 clock_rate); + [Version (since = "1.20")] + public bool set_outcaps_structure (Gst.Structure? s); + [Version (since = "1.16")] + public void set_source_info_enabled (bool enable); + [NoWrapper] + public virtual bool sink_event (Gst.Event event); + [NoWrapper] + public virtual bool src_event (Gst.Event event); + [NoAccessorMethod] + [Version (since = "1.20")] + public bool auto_header_extension { get; set; } + [NoAccessorMethod] + public int64 max_ptime { get; set; } + [NoAccessorMethod] + public int64 min_ptime { get; set; } + [NoAccessorMethod] + public uint mtu { get; set; } + [NoAccessorMethod] + [Version (since = "1.16")] + public bool onvif_no_rate_control { get; set; } + [NoAccessorMethod] + public bool perfect_rtptime { get; set; } + [NoAccessorMethod] + public uint pt { get; set; } + [NoAccessorMethod] + public int64 ptime_multiple { get; set; } + [NoAccessorMethod] + [Version (since = "1.18")] + public bool scale_rtptime { get; set; } + [NoAccessorMethod] + public uint seqnum { get; } + [NoAccessorMethod] + public int seqnum_offset { get; set; } + [NoAccessorMethod] + [Version (since = "1.16")] + public bool source_info { get; set; } + [NoAccessorMethod] + public uint ssrc { get; set; } + [NoAccessorMethod] + public Gst.Structure stats { owned get; } + [NoAccessorMethod] + public uint timestamp { get; } + [NoAccessorMethod] + public uint timestamp_offset { get; set; } + [Version (since = "1.20")] + public signal void add_extension (owned Gst.RTP.HeaderExtension ext); + [Version (since = "1.20")] + public signal void clear_extensions (); + [Version (since = "1.20")] + public signal Gst.RTP.HeaderExtension request_extension (uint ext_id, string ext_uri); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", type_id = "gst_rtp_header_extension_get_type ()")] + [GIR (name = "RTPHeaderExtension")] + [Version (since = "1.20")] + public abstract class HeaderExtension : Gst.Element { + [CCode (has_construct_function = false)] + protected HeaderExtension (); + public static Gst.RTP.HeaderExtension? create_from_uri (string uri); + public Gst.RTP.HeaderExtensionDirection get_direction (); + public uint get_id (); + public virtual size_t get_max_size (Gst.Buffer input_meta); + public string get_sdp_caps_field_name (); + public virtual Gst.RTP.HeaderExtensionFlags get_supported_flags (); + public unowned string get_uri (); + public virtual bool read (Gst.RTP.HeaderExtensionFlags read_flags, [CCode (array_length_cname = "size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, Gst.Buffer buffer); + [NoWrapper] + public virtual bool set_attributes (Gst.RTP.HeaderExtensionDirection direction, string attributes); + public bool set_attributes_from_caps (Gst.Caps caps); + public virtual bool set_caps_from_attributes (Gst.Caps caps); + public bool set_caps_from_attributes_helper (Gst.Caps caps, string attributes); + public void set_direction (Gst.RTP.HeaderExtensionDirection direction); + public void set_id (uint ext_id); + public virtual bool set_non_rtp_sink_caps (Gst.Caps caps); + [CCode (cname = "gst_rtp_header_extension_class_set_uri")] + public class void set_uri (string uri); + public void set_wants_update_non_rtp_src_caps (bool state); + public virtual bool update_non_rtp_src_caps (Gst.Caps caps); + public bool wants_update_non_rtp_src_caps (); + public virtual ssize_t write (Gst.Buffer input_meta, Gst.RTP.HeaderExtensionFlags write_flags, Gst.Buffer output, [CCode (array_length_cname = "size", array_length_pos = 4.1, array_length_type = "gsize")] uint8[] data); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", has_type_id = false)] + [GIR (name = "RTPBuffer")] + public struct Buffer { + public weak Gst.Buffer buffer; + public uint state; + [CCode (array_length = false)] + public weak void* data[4]; + [CCode (array_length = false)] + public weak size_t size[4]; + public bool add_extension_onebyte_header (uint8 id, [CCode (array_length_cname = "size", array_length_pos = 2.1, array_length_type = "guint")] uint8[] data); + public bool add_extension_twobytes_header (uint8 appbits, uint8 id, [CCode (array_length_cname = "size", array_length_pos = 3.1, array_length_type = "guint")] uint8[] data); + public static void allocate_data (Gst.Buffer buffer, uint payload_len, uint8 pad_len, uint8 csrc_count); + public static uint calc_header_len (uint8 csrc_count); + public static uint calc_packet_len (uint payload_len, uint8 pad_len, uint8 csrc_count); + public static uint calc_payload_len (uint packet_len, uint8 pad_len, uint8 csrc_count); + public static int compare_seqnum (uint16 seqnum1, uint16 seqnum2); + public static uint32 default_clock_rate (uint8 payload_type); + public static uint64 ext_timestamp (ref uint64 exttimestamp, uint32 timestamp); + public uint32 get_csrc (uint8 idx); + public uint8 get_csrc_count (); + public bool get_extension (); + [Version (since = "1.2")] + public GLib.Bytes get_extension_bytes (out uint16 bits); + public bool get_extension_data (out uint16 bits, [CCode (array_length = false)] out unowned uint8[] data, out uint wordlen); + public bool get_extension_onebyte_header (uint8 id, uint nth, [CCode (array_length_cname = "size", array_length_pos = 3.1, array_length_type = "guint")] out unowned uint8[] data); + [Version (since = "1.18")] + public static bool get_extension_onebyte_header_from_bytes (GLib.Bytes bytes, uint16 bit_pattern, uint8 id, uint nth, [CCode (array_length_cname = "size", array_length_pos = 5.1, array_length_type = "guint")] out unowned uint8[] data); + public bool get_extension_twobytes_header (out uint8 appbits, uint8 id, uint nth, [CCode (array_length_cname = "size", array_length_pos = 4.1, array_length_type = "guint")] out unowned uint8[] data); + public uint get_header_len (); + public bool get_marker (); + public uint get_packet_len (); + public bool get_padding (); + [CCode (array_length = false)] + public unowned uint8[] get_payload (); + public Gst.Buffer get_payload_buffer (); + [Version (since = "1.2")] + public GLib.Bytes get_payload_bytes (); + public uint get_payload_len (); + public Gst.Buffer get_payload_subbuffer (uint offset, uint len); + public uint8 get_payload_type (); + public uint16 get_seq (); + public uint32 get_ssrc (); + public uint32 get_timestamp (); + public uint8 get_version (); + public static bool map (Gst.Buffer buffer, Gst.MapFlags flags, out Gst.RTP.Buffer rtp); + public static Gst.Buffer new_allocate (uint payload_len, uint8 pad_len, uint8 csrc_count); + public static Gst.Buffer new_allocate_len (uint packet_len, uint8 pad_len, uint8 csrc_count); + public static Gst.Buffer new_copy_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data); + public static Gst.Buffer new_take_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gsize")] owned uint8[] data); + public void pad_to (uint len); + [Version (since = "1.20")] + public void remove_extension_data (); + public void set_csrc (uint8 idx, uint32 csrc); + public void set_extension (bool extension); + public bool set_extension_data (uint16 bits, uint16 length); + public void set_marker (bool marker); + public void set_packet_len (uint len); + public void set_padding (bool padding); + public void set_payload_type (uint8 payload_type); + public void set_seq (uint16 seq); + public void set_ssrc (uint32 ssrc); + public void set_timestamp (uint32 timestamp); + public void set_version (uint8 version); + public void unmap (); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", has_type_id = false)] + [GIR (name = "RTPPayloadInfo")] + public struct PayloadInfo { + public uint8 payload_type; + public weak string media; + public weak string encoding_name; + public uint clock_rate; + public weak string encoding_parameters; + public uint bitrate; + public static unowned Gst.RTP.PayloadInfo? for_name (string media, string encoding_name); + public static unowned Gst.RTP.PayloadInfo? for_pt (uint8 payload_type); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", has_type_id = false)] + [GIR (name = "RTPSourceMeta")] + [Version (since = "1.16")] + public struct SourceMeta { + public Gst.Meta meta; + public uint32 ssrc; + public bool ssrc_valid; + [CCode (array_length = false)] + public weak uint32 csrc[15]; + public uint csrc_count; + public bool append_csrc ([CCode (array_length_cname = "csrc_count", array_length_pos = 1.1, array_length_type = "guint", type = "const guint32*")] uint32[] csrc); + public static unowned Gst.MetaInfo? get_info (); + public uint get_source_count (); + public bool set_ssrc (uint32? ssrc); + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_BUFFER_FLAG_", type_id = "gst_rtp_buffer_flags_get_type ()")] + [Flags] + [GIR (name = "RTPBufferFlags")] + [Version (since = "1.10")] + public enum BufferFlags { + RETRANSMISSION, + REDUNDANT, + LAST + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_BUFFER_MAP_FLAG_", type_id = "gst_rtp_buffer_map_flags_get_type ()")] + [Flags] + [GIR (name = "RTPBufferMapFlags")] + [Version (since = "1.6.1")] + public enum BufferMapFlags { + SKIP_PADDING, + LAST + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_HEADER_EXTENSION_DIRECTION_", type_id = "gst_rtp_header_extension_direction_get_type ()")] + [Flags] + [GIR (name = "RTPHeaderExtensionDirection")] + [Version (since = "1.20")] + public enum HeaderExtensionDirection { + INACTIVE, + SENDONLY, + RECVONLY, + SENDRECV, + INHERITED + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_HEADER_EXTENSION_", type_id = "gst_rtp_header_extension_flags_get_type ()")] + [Flags] + [GIR (name = "RTPHeaderExtensionFlags")] + [Version (since = "1.20")] + public enum HeaderExtensionFlags { + ONE_BYTE, + TWO_BYTE + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_PAYLOAD_", type_id = "gst_rtp_payload_get_type ()")] + [GIR (name = "RTPPayload")] + public enum Payload { + PCMU, + @1016, + G721, + GSM, + G723, + DVI4_8000, + DVI4_16000, + LPC, + PCMA, + G722, + L16_STEREO, + L16_MONO, + QCELP, + CN, + MPA, + G728, + DVI4_11025, + DVI4_22050, + G729, + CELLB, + JPEG, + NV, + H261, + MPV, + MP2T, + H263; + public const string @1016_STRING; + public const string CELLB_STRING; + public const string CN_STRING; + public const string DVI4_11025_STRING; + public const string DVI4_16000_STRING; + public const string DVI4_22050_STRING; + public const string DVI4_8000_STRING; + public const string DYNAMIC_STRING; + public const string G721_STRING; + public const string G722_STRING; + public const int G723_53; + public const string G723_53_STRING; + public const int G723_63; + public const string G723_63_STRING; + public const string G723_STRING; + public const string G728_STRING; + public const string G729_STRING; + public const string GSM_STRING; + public const string H261_STRING; + public const string H263_STRING; + public const string JPEG_STRING; + public const string L16_MONO_STRING; + public const string L16_STEREO_STRING; + public const string LPC_STRING; + public const string MP2T_STRING; + public const string MPA_STRING; + public const string MPV_STRING; + public const string NV_STRING; + public const string PCMA_STRING; + public const string PCMU_STRING; + public const string QCELP_STRING; + public const int TS41; + public const string TS41_STRING; + public const int TS48; + public const string TS48_STRING; + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cprefix = "GST_RTP_PROFILE_", type_id = "gst_rtp_profile_get_type ()")] + [GIR (name = "RTPProfile")] + [Version (since = "1.6")] + public enum Profile { + UNKNOWN, + AVP, + SAVP, + AVPF, + SAVPF + } + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_BASE")] + public const string HDREXT_BASE; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_ELEMENT_CLASS")] + [Version (since = "1.20")] + public const string HDREXT_ELEMENT_CLASS; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_NTP_56")] + public const string HDREXT_NTP_56; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_NTP_56_SIZE")] + public const int HDREXT_NTP_56_SIZE; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_NTP_64")] + public const string HDREXT_NTP_64; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HDREXT_NTP_64_SIZE")] + public const int HDREXT_NTP_64_SIZE; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_HEADER_EXTENSION_URI_METADATA_KEY")] + [Version (since = "1.20")] + public const string HEADER_EXTENSION_URI_METADATA_KEY; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_SOURCE_META_MAX_CSRC_COUNT")] + public const int SOURCE_META_MAX_CSRC_COUNT; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "GST_RTP_VERSION")] + public const int VERSION; + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "gst_buffer_add_rtp_source_meta")] + [Version (since = "1.16")] + public static unowned Gst.RTP.SourceMeta? buffer_add_rtp_source_meta (Gst.Buffer buffer, uint32? ssrc, uint32? csrc, uint csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.allocate_data")] + public static void buffer_allocate_data (Gst.Buffer buffer, uint payload_len, uint8 pad_len, uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.calc_header_len")] + public static uint buffer_calc_header_len (uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.calc_packet_len")] + public static uint buffer_calc_packet_len (uint payload_len, uint8 pad_len, uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.calc_payload_len")] + public static uint buffer_calc_payload_len (uint packet_len, uint8 pad_len, uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.compare_seqnum")] + public static int buffer_compare_seqnum (uint16 seqnum1, uint16 seqnum2); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.default_clock_rate")] + public static uint32 buffer_default_clock_rate (uint8 payload_type); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.ext_timestamp")] + public static uint64 buffer_ext_timestamp (ref uint64 exttimestamp, uint32 timestamp); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.get_extension_onebyte_header_from_bytes", since = "1.18")] + public static bool buffer_get_extension_onebyte_header_from_bytes (GLib.Bytes bytes, uint16 bit_pattern, uint8 id, uint nth, [CCode (array_length_cname = "size", array_length_pos = 5.1, array_length_type = "guint")] out unowned uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h", cname = "gst_buffer_get_rtp_source_meta")] + [Version (since = "1.16")] + public static unowned Gst.RTP.SourceMeta? buffer_get_rtp_source_meta (Gst.Buffer buffer); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.map")] + public static bool buffer_map (Gst.Buffer buffer, Gst.MapFlags flags, out Gst.RTP.Buffer rtp); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.new_allocate")] + public static Gst.Buffer buffer_new_allocate (uint payload_len, uint8 pad_len, uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.new_allocate_len")] + public static Gst.Buffer buffer_new_allocate_len (uint packet_len, uint8 pad_len, uint8 csrc_count); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.new_copy_data")] + public static Gst.Buffer buffer_new_copy_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPBuffer.new_take_data")] + public static Gst.Buffer buffer_new_take_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gsize")] owned uint8[] data); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (since = "1.20")] + public static GLib.List<Gst.ElementFactory> get_header_extension_list (); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static bool hdrext_get_ntp_56 ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, out uint64 ntptime); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static bool hdrext_get_ntp_64 ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, out uint64 ntptime); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static bool hdrext_set_ntp_56 (void* data, uint size, uint64 ntptime); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static bool hdrext_set_ntp_64 (void* data, uint size, uint64 ntptime); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPPayloadInfo.for_name")] + public static unowned Gst.RTP.PayloadInfo? payload_info_for_name (string media, string encoding_name); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPPayloadInfo.for_pt")] + public static unowned Gst.RTP.PayloadInfo? payload_info_for_pt (uint8 payload_type); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + public static GLib.Type source_meta_api_get_type (); + [CCode (cheader_filename = "gst/rtp/rtp.h")] + [Version (replacement = "RTPSourceMeta.get_info")] + public static unowned Gst.MetaInfo? source_meta_get_info (); + } +} diff --git a/main/vapi/gstreamer-video-1.0.vapi b/main/vapi/gstreamer-video-1.0.vapi new file mode 100644 index 00000000..c71a84aa --- /dev/null +++ b/main/vapi/gstreamer-video-1.0.vapi @@ -0,0 +1,2339 @@ +// Fixme: This is fetched from development code of Vala upstream which fixed a few bugs. +/* gstreamer-video-1.0.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Gst", gir_namespace = "GstVideo", gir_version = "1.0", lower_case_cprefix = "gst_")] +namespace Gst { + namespace Video { + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_aggregator_get_type ()")] + [GIR (name = "VideoAggregator")] + [Version (since = "1.16")] + public abstract class Aggregator : Gst.Base.Aggregator { + public weak Gst.Video.Info info; + [CCode (has_construct_function = false)] + protected Aggregator (); + [NoWrapper] + public virtual Gst.FlowReturn aggregate_frames (Gst.Buffer outbuffer); + [NoWrapper] + public virtual Gst.FlowReturn create_output_buffer (Gst.Buffer outbuffer); + [NoWrapper] + public virtual void find_best_format (Gst.Caps downstream_caps, Gst.Video.Info best_info, out bool at_least_one_alpha); + [Version (since = "1.20")] + public Gst.TaskPool get_execution_task_pool (); + [NoWrapper] + public virtual Gst.Caps update_caps (Gst.Caps caps); + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_aggregator_convert_pad_get_type ()")] + [GIR (name = "VideoAggregatorConvertPad")] + [Version (since = "1.16")] + public class AggregatorConvertPad : Gst.Video.AggregatorPad { + [CCode (has_construct_function = false)] + protected AggregatorConvertPad (); + [NoWrapper] + public virtual void create_conversion_info (Gst.Video.Aggregator agg, Gst.Video.Info conversion_info); + public void update_conversion_info (); + [NoAccessorMethod] + public Gst.Structure converter_config { owned get; set; } + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_aggregator_pad_get_type ()")] + [GIR (name = "VideoAggregatorPad")] + [Version (since = "1.16")] + public class AggregatorPad : Gst.Base.AggregatorPad { + public weak Gst.Video.Info info; + [CCode (has_construct_function = false)] + protected AggregatorPad (); + [NoWrapper] + public virtual void clean_frame (Gst.Video.Aggregator videoaggregator, Gst.Video.Frame prepared_frame); + public unowned Gst.Buffer get_current_buffer (); + public unowned Gst.Video.Frame? get_prepared_frame (); + public bool has_current_buffer (); + [NoWrapper] + public virtual bool prepare_frame (Gst.Video.Aggregator videoaggregator, Gst.Buffer buffer, Gst.Video.Frame prepared_frame); + [NoWrapper] + [Version (since = "1.20")] + public virtual void prepare_frame_finish (Gst.Video.Aggregator videoaggregator, Gst.Video.Frame prepared_frame); + [NoWrapper] + [Version (since = "1.20")] + public virtual void prepare_frame_start (Gst.Video.Aggregator videoaggregator, Gst.Buffer buffer, Gst.Video.Frame prepared_frame); + public void set_needs_alpha (bool needs_alpha); + [NoWrapper] + public virtual void update_conversion_info (); + [NoAccessorMethod] + public uint64 max_last_buffer_repeat { get; set; } + [NoAccessorMethod] + public bool repeat_after_eos { get; set; } + [NoAccessorMethod] + public uint zorder { get; set; } + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_aggregator_parallel_convert_pad_get_type ()")] + [GIR (name = "VideoAggregatorParallelConvertPad")] + [Version (since = "1.20")] + public class AggregatorParallelConvertPad : Gst.Video.AggregatorConvertPad { + [CCode (has_construct_function = false)] + protected AggregatorParallelConvertPad (); + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_buffer_pool_get_type ()")] + [GIR (name = "VideoBufferPool")] + public class BufferPool : Gst.BufferPool { + [CCode (has_construct_function = false, type = "GstBufferPool*")] + public BufferPool (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [Compact] + [GIR (name = "VideoChromaResample")] + public class ChromaResample { + [CCode (cname = "gst_video_chroma_resample_new", has_construct_function = false)] + public ChromaResample (Gst.Video.ChromaMethod method, Gst.Video.ChromaSite site, Gst.Video.ChromaFlags flags, Gst.Video.Format format, int h_factor, int v_factor); + public void free (); + public void get_info (out uint n_lines, out int offset); + [CCode (cname = "gst_video_chroma_resample")] + public void resample (void* lines, int width); + } + [CCode (cheader_filename = "gst/video/gstvideoutils.h", ref_function = "gst_video_codec_frame_ref", type_id = "gst_video_codec_frame_get_type ()", unref_function = "gst_video_codec_frame_unref")] + [Compact] + [GIR (name = "VideoCodecFrame")] + public class CodecFrame { + public Gst.ClockTime deadline; + public int distance_from_sync; + public Gst.ClockTime dts; + public Gst.ClockTime duration; + public weak Gst.Buffer input_buffer; + public weak Gst.Buffer output_buffer; + public Gst.ClockTime pts; + public uint32 system_frame_number; + [CCode (simple_generics = true)] + public T get_user_data<T> (); + public unowned Gst.Video.CodecFrame @ref (); + [CCode (simple_generics = true)] + public void set_user_data<T> (owned T user_data); + public void unref (); + } + [CCode (cheader_filename = "gst/video/video.h", ref_function = "gst_video_codec_state_ref", type_id = "gst_video_codec_state_get_type ()", unref_function = "gst_video_codec_state_unref")] + [Compact] + [GIR (name = "VideoCodecState")] + public class CodecState { + public weak Gst.Caps allocation_caps; + public weak Gst.Caps caps; + public weak Gst.Buffer codec_data; + [Version (since = "1.20")] + public Gst.Video.ContentLightLevel content_light_level; + public weak Gst.Video.Info info; + [Version (since = "1.20")] + public Gst.Video.MasteringDisplayInfo mastering_display_info; + public unowned Gst.Video.CodecState @ref (); + public void unref (); + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstColorBalanceChannel", lower_case_cprefix = "gst_color_balance_channel_", type_id = "gst_color_balance_channel_get_type ()")] + [GIR (name = "ColorBalanceChannel")] + public class ColorBalanceChannel : GLib.Object { + public weak string label; + public int max_value; + public int min_value; + [CCode (has_construct_function = false)] + protected ColorBalanceChannel (); + public virtual signal void value_changed (int value); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [Compact] + [GIR (name = "VideoConverter")] + public class Converter { + [Version (since = "1.6")] + public void frame (Gst.Video.Frame src, Gst.Video.Frame dest); + [Version (since = "1.20")] + public void frame_finish (); + [Version (since = "1.6")] + public void free (); + public unowned Gst.Structure get_config (); + [Version (since = "1.6")] + public bool set_config (owned Gst.Structure config); + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_decoder_get_type ()")] + [GIR (name = "VideoDecoder")] + public abstract class Decoder : Gst.Element { + [CCode (has_construct_function = false)] + protected Decoder (); + public void add_to_frame (int n_bytes); + public Gst.Buffer allocate_output_buffer (); + public Gst.FlowReturn allocate_output_frame (Gst.Video.CodecFrame frame); + [Version (since = "1.12")] + public Gst.FlowReturn allocate_output_frame_with_params (Gst.Video.CodecFrame frame, Gst.BufferPoolAcquireParams @params); + [NoWrapper] + public virtual bool close (); + [NoWrapper] + public virtual bool decide_allocation (Gst.Query query); + [NoWrapper] + public virtual Gst.FlowReturn drain (); + public Gst.FlowReturn drop_frame (owned Gst.Video.CodecFrame frame); + [Version (since = "1.20")] + public Gst.FlowReturn drop_subframe (owned Gst.Video.CodecFrame frame); + [NoWrapper] + public virtual Gst.FlowReturn finish (); + public Gst.FlowReturn finish_frame (owned Gst.Video.CodecFrame frame); + [Version (since = "1.20")] + public Gst.FlowReturn finish_subframe (owned Gst.Video.CodecFrame frame); + [NoWrapper] + public virtual bool flush (); + public void get_allocator (out Gst.Allocator allocator, out Gst.AllocationParams @params); + public Gst.BufferPool get_buffer_pool (); + public int get_estimate_rate (); + public Gst.Video.CodecFrame get_frame (int frame_number); + public GLib.List<Gst.Video.CodecFrame> get_frames (); + [Version (since = "1.20")] + public uint get_input_subframe_index (Gst.Video.CodecFrame frame); + public void get_latency (out Gst.ClockTime min_latency, out Gst.ClockTime max_latency); + public Gst.ClockTimeDiff get_max_decode_time (Gst.Video.CodecFrame frame); + public int get_max_errors (); + [Version (since = "1.4")] + public bool get_needs_format (); + [Version (since = "1.20")] + public bool get_needs_sync_point (); + public Gst.Video.CodecFrame get_oldest_frame (); + public Gst.Video.CodecState get_output_state (); + public bool get_packetized (); + [Version (since = "1.4")] + public size_t get_pending_frame_size (); + [Version (since = "1.20")] + public uint get_processed_subframe_index (Gst.Video.CodecFrame frame); + [Version (since = "1.0.3")] + public double get_qos_proportion (); + [Version (since = "1.20")] + public bool get_subframe_mode (); + [NoWrapper] + public virtual Gst.Caps getcaps (Gst.Caps filter); + [NoWrapper] + public virtual Gst.FlowReturn handle_frame (owned Gst.Video.CodecFrame frame); + [NoWrapper] + [Version (since = "1.20")] + public virtual bool handle_missing_data (Gst.ClockTime timestamp, Gst.ClockTime duration); + public Gst.FlowReturn have_frame (); + [Version (since = "1.20")] + public Gst.FlowReturn have_last_subframe (Gst.Video.CodecFrame frame); + public void merge_tags (Gst.TagList? tags, Gst.TagMergeMode mode); + public virtual bool negotiate (); + [NoWrapper] + public virtual bool open (); + [NoWrapper] + public virtual Gst.FlowReturn parse (Gst.Video.CodecFrame frame, Gst.Base.Adapter adapter, bool at_eos); + [NoWrapper] + public virtual bool propose_allocation (Gst.Query query); + [Version (since = "1.6")] + public Gst.Caps proxy_getcaps (Gst.Caps? caps, Gst.Caps? filter); + [Version (since = "1.2.2")] + public void release_frame (owned Gst.Video.CodecFrame frame); + [Version (since = "1.20")] + public void request_sync_point (Gst.Video.CodecFrame frame, Gst.Video.DecoderRequestSyncPointFlags flags); + [NoWrapper] + public virtual bool reset (bool hard); + public void set_estimate_rate (bool enabled); + [NoWrapper] + public virtual bool set_format (Gst.Video.CodecState state); + [Version (since = "1.16.")] + public Gst.Video.CodecState set_interlaced_output_state (Gst.Video.Format fmt, Gst.Video.InterlaceMode interlace_mode, uint width, uint height, Gst.Video.CodecState? reference); + public void set_latency (Gst.ClockTime min_latency, Gst.ClockTime max_latency); + public void set_max_errors (int num); + [Version (since = "1.4")] + public void set_needs_format (bool enabled); + [Version (since = "1.20")] + public void set_needs_sync_point (bool enabled); + public Gst.Video.CodecState set_output_state (Gst.Video.Format fmt, uint width, uint height, Gst.Video.CodecState? reference); + public void set_packetized (bool packetized); + [Version (since = "1.20")] + public void set_subframe_mode (bool subframe_mode); + [Version (since = "1.6")] + public void set_use_default_pad_acceptcaps (bool use); + [NoWrapper] + public virtual bool sink_event (Gst.Event event); + [NoWrapper] + public virtual bool sink_query (Gst.Query query); + [NoWrapper] + public virtual bool src_event (Gst.Event event); + [NoWrapper] + public virtual bool src_query (Gst.Query query); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [NoWrapper] + public virtual bool transform_meta (Gst.Video.CodecFrame frame, Gst.Meta meta); + [NoAccessorMethod] + [Version (since = "1.20")] + public Gst.Video.DecoderRequestSyncPointFlags automatic_request_sync_point_flags { get; set; } + [NoAccessorMethod] + [Version (since = "1.20")] + public bool automatic_request_sync_points { get; set; } + [NoAccessorMethod] + [Version (since = "1.20")] + public bool discard_corrupted_frames { get; set; } + [Version (since = "1.18")] + public int max_errors { get; set; } + [NoAccessorMethod] + [Version (since = "1.20")] + public uint64 min_force_key_unit_interval { get; set; } + [NoAccessorMethod] + [Version (since = "1.18")] + public bool qos { get; set; } + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [Compact] + [GIR (name = "VideoDither")] + public class Dither { + public void free (); + public void line (void* line, uint x, uint y, uint width); + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_encoder_get_type ()")] + [GIR (name = "VideoEncoder")] + public abstract class Encoder : Gst.Element, Gst.Preset { + [CCode (has_construct_function = false)] + protected Encoder (); + public Gst.Buffer allocate_output_buffer (size_t size); + public Gst.FlowReturn allocate_output_frame (Gst.Video.CodecFrame frame, size_t size); + [NoWrapper] + public virtual bool close (); + [NoWrapper] + public virtual bool decide_allocation (Gst.Query query); + [NoWrapper] + public virtual Gst.FlowReturn finish (); + public Gst.FlowReturn finish_frame (owned Gst.Video.CodecFrame frame); + [Version (since = "1.18")] + public Gst.FlowReturn finish_subframe (Gst.Video.CodecFrame frame); + [NoWrapper] + public virtual bool flush (); + public void get_allocator (out Gst.Allocator allocator, out Gst.AllocationParams @params); + public Gst.Video.CodecFrame get_frame (int frame_number); + public GLib.List<Gst.Video.CodecFrame> get_frames (); + public void get_latency (out Gst.ClockTime min_latency, out Gst.ClockTime max_latency); + [Version (since = "1.14")] + public Gst.ClockTimeDiff get_max_encode_time (Gst.Video.CodecFrame frame); + [Version (since = "1.18")] + public Gst.ClockTime get_min_force_key_unit_interval (); + public Gst.Video.CodecFrame get_oldest_frame (); + public Gst.Video.CodecState get_output_state (); + [NoWrapper] + public virtual Gst.Caps getcaps (Gst.Caps filter); + [NoWrapper] + public virtual Gst.FlowReturn handle_frame (Gst.Video.CodecFrame frame); + [Version (since = "1.14")] + public bool is_qos_enabled (); + public void merge_tags (Gst.TagList? tags, Gst.TagMergeMode mode); + public virtual bool negotiate (); + [NoWrapper] + public virtual bool open (); + [NoWrapper] + public virtual Gst.FlowReturn pre_push (Gst.Video.CodecFrame frame); + [NoWrapper] + public virtual bool propose_allocation (Gst.Query query); + public Gst.Caps proxy_getcaps (Gst.Caps? caps, Gst.Caps? filter); + [NoWrapper] + public virtual bool reset (bool hard); + [NoWrapper] + public virtual bool set_format (Gst.Video.CodecState state); + public void set_headers (owned GLib.List<Gst.Buffer> headers); + public void set_latency (Gst.ClockTime min_latency, Gst.ClockTime max_latency); + [Version (since = "1.18")] + public void set_min_force_key_unit_interval (Gst.ClockTime interval); + [Version (since = "1.6")] + public void set_min_pts (Gst.ClockTime min_pts); + public Gst.Video.CodecState set_output_state (owned Gst.Caps caps, Gst.Video.CodecState? reference); + [Version (since = "1.14")] + public void set_qos_enabled (bool enabled); + [NoWrapper] + public virtual bool sink_event (Gst.Event event); + [NoWrapper] + public virtual bool sink_query (Gst.Query query); + [NoWrapper] + public virtual bool src_event (Gst.Event event); + [NoWrapper] + public virtual bool src_query (Gst.Query query); + [NoWrapper] + public virtual bool start (); + [NoWrapper] + public virtual bool stop (); + [NoWrapper] + public virtual bool transform_meta (Gst.Video.CodecFrame frame, Gst.Meta meta); + [Version (since = "1.18")] + public uint64 min_force_key_unit_interval { get; set; } + [NoAccessorMethod] + public bool qos { get; set; } + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_filter_get_type ()")] + [GIR (name = "VideoFilter")] + public abstract class Filter : Gst.Base.Transform { + public weak Gst.Video.Info in_info; + public bool negotiated; + public weak Gst.Video.Info out_info; + [CCode (has_construct_function = false)] + protected Filter (); + [NoWrapper] + public virtual bool set_info (Gst.Caps incaps, Gst.Video.Info in_info, Gst.Caps outcaps, Gst.Video.Info out_info); + [NoWrapper] + public virtual Gst.FlowReturn transform_frame (Gst.Video.Frame inframe, Gst.Video.Frame outframe); + [NoWrapper] + public virtual Gst.FlowReturn transform_frame_ip (Gst.Video.Frame frame); + } + [CCode (cheader_filename = "gst/video/video.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_info_get_type ()")] + [Compact] + [GIR (name = "VideoInfo")] + public class Info { + [CCode (cname = "ABI.abi.field_order")] + public Gst.Video.FieldOrder ABI_abi_field_order; + [CCode (cname = "ABI.abi.multiview_flags")] + public Gst.Video.MultiviewFlags ABI_abi_multiview_flags; + [CCode (cname = "ABI.abi.multiview_mode")] + public Gst.Video.MultiviewMode ABI_abi_multiview_mode; + public Gst.Video.ChromaSite chroma_site; + public Gst.Video.Colorimetry colorimetry; + public weak Gst.Video.FormatInfo? finfo; + public Gst.Video.Flags flags; + public int fps_d; + public int fps_n; + public int height; + public Gst.Video.InterlaceMode interlace_mode; + [CCode (array_length = false)] + public weak size_t offset[4]; + public int par_d; + public int par_n; + public size_t size; + [CCode (array_length = false)] + public weak int stride[4]; + public int views; + public int width; + [CCode (has_construct_function = false)] + [Version (since = "1.6")] + public Info (); + public bool align (Gst.Video.Alignment align); + [Version (since = "1.18")] + public bool align_full (Gst.Video.Alignment align, out size_t plane_size); + public bool convert (Gst.Format src_format, int64 src_value, Gst.Format dest_format, out int64 dest_value); + [Version (since = "1.6")] + public Gst.Video.Info copy (); + [Version (since = "1.6")] + public void free (); + public bool from_caps (Gst.Caps caps); + public void init (); + public bool is_equal (Gst.Video.Info other); + public bool set_format (Gst.Video.Format format, uint width, uint height); + [Version (since = "1.16")] + public bool set_interlaced_format (Gst.Video.Format format, Gst.Video.InterlaceMode mode, uint width, uint height); + public Gst.Caps to_caps (); + [CCode (cname = "gst_video_info_new_from_caps", has_construct_function = false)] + [Version (since = "1.20")] + public Info.with_caps (Gst.Caps caps); + } + [CCode (cheader_filename = "gst/video/video.h", lower_case_cprefix = "gst_video_multiview_flagset_", type_id = "gst_video_multiview_flagset_get_type ()")] + [GIR (name = "VideoMultiviewFlagsSet")] + public class MultiviewFlagsSet : Gst.FlagSet { + [CCode (has_construct_function = false)] + protected MultiviewFlagsSet (); + } + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_composition_ref", type_id = "gst_video_overlay_composition_get_type ()", unref_function = "gst_video_overlay_composition_unref")] + [Compact] + [GIR (name = "VideoOverlayComposition")] + public class OverlayComposition : Gst.MiniObject { + [CCode (has_construct_function = false)] + public OverlayComposition (Gst.Video.OverlayRectangle? rectangle); + public void add_rectangle (Gst.Video.OverlayRectangle rectangle); + public bool blend (Gst.Video.Frame video_buf); + public Gst.Video.OverlayComposition copy (); + public unowned Gst.Video.OverlayRectangle get_rectangle (uint n); + public uint get_seqnum (); + [DestroysInstance] + [ReturnsModifiedPointer] + public Gst.Video.OverlayComposition make_writable (); + public uint n_rectangles (); + } + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_rectangle_ref", type_id = "gst_video_overlay_rectangle_get_type ()", unref_function = "gst_video_overlay_rectangle_unref")] + [Compact] + [GIR (name = "VideoOverlayRectangle")] + public class OverlayRectangle : Gst.MiniObject { + public Gst.Video.OverlayRectangle copy (); + public Gst.Video.OverlayFormatFlags get_flags (); + public float get_global_alpha (); + public unowned Gst.Buffer get_pixels_argb (Gst.Video.OverlayFormatFlags flags); + public unowned Gst.Buffer get_pixels_ayuv (Gst.Video.OverlayFormatFlags flags); + public unowned Gst.Buffer get_pixels_raw (Gst.Video.OverlayFormatFlags flags); + public unowned Gst.Buffer get_pixels_unscaled_argb (Gst.Video.OverlayFormatFlags flags); + public unowned Gst.Buffer get_pixels_unscaled_ayuv (Gst.Video.OverlayFormatFlags flags); + public unowned Gst.Buffer get_pixels_unscaled_raw (Gst.Video.OverlayFormatFlags flags); + public bool get_render_rectangle (out int render_x, out int render_y, out uint render_width, out uint render_height); + public uint get_seqnum (); + [CCode (has_construct_function = false)] + public OverlayRectangle.raw (Gst.Buffer pixels, int render_x, int render_y, uint render_width, uint render_height, Gst.Video.OverlayFormatFlags flags); + public void set_global_alpha (float global_alpha); + public void set_render_rectangle (int render_x, int render_y, uint render_width, uint render_height); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [Compact] + [GIR (name = "VideoScaler")] + public class Scaler { + public void @2d (Gst.Video.Scaler vscale, Gst.Video.Format format, void* src, int src_stride, void* dest, int dest_stride, uint x, uint y, uint width, uint height); + public void free (); + public double get_coeff (uint out_offset, out uint in_offset, out uint n_taps); + public uint get_max_taps (); + public void horizontal (Gst.Video.Format format, void* src, void* dest, uint dest_offset, uint width); + public void vertical (Gst.Video.Format format, void* src_lines, void* dest, uint dest_offset, uint width); + } + [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_sink_get_type ()")] + [GIR (name = "VideoSink")] + public class Sink : Gst.Base.Sink { + public int height; + public int width; + [CCode (has_construct_function = false)] + protected Sink (); + [Version (deprecated = true, deprecated_since = "1.20")] + public static void center_rect (Gst.Video.Rectangle src, Gst.Video.Rectangle dst, out Gst.Video.Rectangle result, bool scaling); + [NoWrapper] + [Version (since = "1.20")] + public virtual bool set_info (Gst.Caps caps, Gst.Video.Info info); + [NoWrapper] + public virtual Gst.FlowReturn show_frame (Gst.Buffer buf); + [NoAccessorMethod] + public bool show_preroll_frame { get; set construct; } + } + [CCode (cheader_filename = "gst/video/video.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_time_code_get_type ()")] + [Compact] + [GIR (name = "VideoTimeCode")] + [Version (since = "1.10")] + public class TimeCode { + public Gst.Video.TimeCodeConfig config; + public uint field_count; + public uint frames; + public uint hours; + public uint minutes; + public uint seconds; + [CCode (has_construct_function = false)] + public TimeCode (uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.TimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + public void add_frames (int64 frames); + [Version (since = "1.12")] + public Gst.Video.TimeCode? add_interval (Gst.Video.TimeCodeInterval tc_inter); + public void clear (); + public int compare (Gst.Video.TimeCode tc2); + public Gst.Video.TimeCode copy (); + [CCode (has_construct_function = false)] + public TimeCode.empty (); + public uint64 frames_since_daily_jam (); + public void free (); + [CCode (has_construct_function = false)] + [Version (since = "1.12")] + public TimeCode.from_date_time (uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.TimeCodeFlags flags, uint field_count); + [CCode (has_construct_function = false)] + [Version (since = "1.16")] + public TimeCode.from_date_time_full (uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.TimeCodeFlags flags, uint field_count); + [CCode (has_construct_function = false)] + [Version (since = "1.12")] + public TimeCode.from_string (string tc_str); + public void increment_frame (); + public void init (uint fps_n, uint fps_d, GLib.DateTime? latest_daily_jam, Gst.Video.TimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + [Version (since = "1.12")] + public void init_from_date_time (uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.TimeCodeFlags flags, uint field_count); + [Version (since = "1.16")] + public bool init_from_date_time_full (uint fps_n, uint fps_d, GLib.DateTime dt, Gst.Video.TimeCodeFlags flags, uint field_count); + public bool is_valid (); + public uint64 nsec_since_daily_jam (); + public GLib.DateTime? to_date_time (); + public string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_time_code_interval_get_type ()")] + [Compact] + [GIR (name = "VideoTimeCodeInterval")] + [Version (since = "1.12")] + public class TimeCodeInterval { + public uint frames; + public uint hours; + public uint minutes; + public uint seconds; + [CCode (has_construct_function = false)] + public TimeCodeInterval (uint hours, uint minutes, uint seconds, uint frames); + public void clear (); + public Gst.Video.TimeCodeInterval copy (); + public void free (); + [CCode (has_construct_function = false)] + public TimeCodeInterval.from_string (string tc_inter_str); + public void init (uint hours, uint minutes, uint seconds, uint frames); + } + [CCode (cheader_filename = "gst/video/video.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_vbi_encoder_get_type ()")] + [Compact] + [GIR (name = "VideoVBIEncoder")] + [Version (since = "1.16")] + public class VBIEncoder { + [CCode (has_construct_function = false)] + public VBIEncoder (Gst.Video.Format format, uint32 pixel_width); + public bool add_ancillary (bool composite, uint8 DID, uint8 SDID_block_number, [CCode (array_length_cname = "data_count", array_length_pos = 4.1, array_length_type = "guint")] uint8[] data); + public Gst.Video.VBIEncoder copy (); + public void free (); + public void write_line ([CCode (array_length = false, type = "guint8*")] uint8[] data); + } + [CCode (cheader_filename = "gst/video/video.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_vbi_parser_get_type ()")] + [Compact] + [GIR (name = "VideoVBIParser")] + [Version (since = "1.16")] + public class VBIParser { + [CCode (has_construct_function = false)] + public VBIParser (Gst.Video.Format format, uint32 pixel_width); + public void add_line ([CCode (array_length = false)] uint8[] data); + public Gst.Video.VBIParser copy (); + public void free (); + public Gst.Video.VBIParserResult get_ancillary (out Gst.Video.Ancillary anc); + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstColorBalance", lower_case_cprefix = "gst_color_balance_", type_cname = "GstColorBalanceInterface", type_id = "gst_color_balance_get_type ()")] + [GIR (name = "ColorBalance")] + public interface ColorBalance : GLib.Object { + public abstract Gst.Video.ColorBalanceType get_balance_type (); + public abstract int get_value (Gst.Video.ColorBalanceChannel channel); + public abstract unowned GLib.List<Gst.Video.ColorBalanceChannel> list_channels (); + public abstract void set_value (Gst.Video.ColorBalanceChannel channel, int value); + [HasEmitter] + public virtual signal void value_changed (Gst.Video.ColorBalanceChannel channel, int value); + } + [CCode (cheader_filename = "gst/video/video.h", type_cname = "GstVideoDirectionInterface", type_id = "gst_video_direction_get_type ()")] + [GIR (name = "VideoDirection")] + [Version (since = "1.10")] + public interface Direction : GLib.Object { + [NoAccessorMethod] + public abstract Gst.Video.OrientationMethod video_direction { get; set construct; } + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigation", lower_case_cprefix = "gst_navigation_", type_cname = "GstNavigationInterface", type_id = "gst_navigation_get_type ()")] + [GIR (name = "Navigation")] + public interface Navigation : GLib.Object { + [Version (since = "1.22")] + public static bool event_get_coordinates (Gst.Event event, out double x, out double y); + public static Gst.Video.NavigationEventType event_get_type (Gst.Event event); + [Version (since = "1.22")] + public static Gst.Event event_new_command (Gst.Video.NavigationCommand command); + [Version (since = "1.22")] + public static Gst.Event event_new_key_press (string key, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_key_release (string key, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_mouse_button_press (int button, double x, double y, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_mouse_button_release (int button, double x, double y, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_mouse_move (double x, double y, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_mouse_scroll (double x, double y, double delta_x, double delta_y, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_touch_cancel (Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_touch_down (uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_touch_frame (Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_touch_motion (uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state); + [Version (since = "1.22")] + public static Gst.Event event_new_touch_up (uint identifier, double x, double y, Gst.Video.NavigationModifierType state); + public static bool event_parse_command (Gst.Event event, out Gst.Video.NavigationCommand command); + public static bool event_parse_key_event (Gst.Event event, out unowned string key); + [Version (since = "1.22")] + public static bool event_parse_modifier_state (Gst.Event event, Gst.Video.NavigationModifierType state); + public static bool event_parse_mouse_button_event (Gst.Event event, out int button, out double x, out double y); + public static bool event_parse_mouse_move_event (Gst.Event event, out double x, out double y); + [Version (since = "1.18")] + public static bool event_parse_mouse_scroll_event (Gst.Event event, out double x, out double y, out double delta_x, out double delta_y); + [Version (since = "1.22")] + public static bool event_parse_touch_event (Gst.Event event, out uint identifier, out double x, out double y, out double pressure); + [Version (since = "1.22")] + public static bool event_parse_touch_up_event (Gst.Event event, out uint identifier, out double x, out double y); + [Version (since = "1.22")] + public static bool event_set_coordinates (Gst.Event event, double x, double y); + public static Gst.Video.NavigationMessageType message_get_type (Gst.Message message); + public static Gst.Message message_new_angles_changed (Gst.Object src, uint cur_angle, uint n_angles); + public static Gst.Message message_new_commands_changed (Gst.Object src); + [Version (since = "1.6")] + public static Gst.Message message_new_event (Gst.Object src, Gst.Event event); + public static Gst.Message message_new_mouse_over (Gst.Object src, bool active); + public static bool message_parse_angles_changed (Gst.Message message, out uint cur_angle, out uint n_angles); + [Version (since = "1.6")] + public static bool message_parse_event (Gst.Message message, out Gst.Event event); + public static bool message_parse_mouse_over (Gst.Message message, out bool active); + public static Gst.Video.NavigationQueryType query_get_type (Gst.Query query); + public static Gst.Query query_new_angles (); + public static Gst.Query query_new_commands (); + public static bool query_parse_angles (Gst.Query query, out uint cur_angle, out uint n_angles); + public static bool query_parse_commands_length (Gst.Query query, out uint n_cmds); + public static bool query_parse_commands_nth (Gst.Query query, uint nth, out Gst.Video.NavigationCommand cmd); + public static void query_set_angles (Gst.Query query, uint cur_angle, uint n_angles); + public static void query_set_commandsv (Gst.Query query, [CCode (array_length_cname = "n_cmds", array_length_pos = 1.5)] Gst.Video.NavigationCommand[] cmds); + public void send_command (Gst.Video.NavigationCommand command); + [Version (deprecated = true, deprecated_since = "1.22")] + public abstract void send_event (Gst.Structure structure); + [Version (since = "1.22")] + public abstract void send_event_simple (owned Gst.Event event); + public void send_key_event (string event, string key); + public void send_mouse_event (string event, int button, double x, double y); + [Version (since = "1.18")] + public void send_mouse_scroll_event (double x, double y, double delta_x, double delta_y); + } + [CCode (cheader_filename = "gst/video/video.h", type_cname = "GstVideoOrientationInterface", type_id = "gst_video_orientation_get_type ()")] + [GIR (name = "VideoOrientation")] + public interface Orientation : GLib.Object { + [Version (since = "1.20")] + public static bool from_tag (Gst.TagList taglist, out Gst.Video.OrientationMethod method); + public abstract bool get_hcenter (out int center); + public abstract bool get_hflip (out bool flip); + public abstract bool get_vcenter (out int center); + public abstract bool get_vflip (out bool flip); + public abstract bool set_hcenter (int center); + public abstract bool set_hflip (bool flip); + public abstract bool set_vcenter (int center); + public abstract bool set_vflip (bool flip); + } + [CCode (cheader_filename = "gst/video/video.h", type_cname = "GstVideoOverlayInterface", type_id = "gst_video_overlay_get_type ()")] + [GIR (name = "VideoOverlay")] + public interface Overlay : GLib.Object { + public abstract void expose (); + public void got_window_handle ([CCode (type = "guintptr")] uint* handle); + public abstract void handle_events (bool handle_events); + [Version (since = "1.14")] + public static void install_properties (GLib.ObjectClass oclass, int last_prop_id); + public void prepare_window_handle (); + [Version (since = "1.14")] + public static bool set_property (GLib.Object object, int last_prop_id, uint property_id, GLib.Value value); + [NoWrapper] + public virtual void set_render_rectangle (int x, int y, int width, int height); + public abstract void set_window_handle ([CCode (type = "guintptr")] uint* handle); + [CCode (cname = "gst_video_overlay_set_render_rectangle")] + public bool try_set_render_rectangle (int x, int y, int width, int height); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoAFDMeta")] + [Version (since = "1.18")] + public struct AFDMeta { + public Gst.Meta meta; + public uint8 field; + public Gst.Video.AFDSpec spec; + public Gst.Video.AFDValue afd; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoAffineTransformationMeta")] + [Version (since = "1.8")] + public struct AffineTransformationMeta { + public Gst.Meta meta; + [CCode (array_length = false)] + public weak float matrix[16]; + public void apply_matrix ([CCode (array_length = false)] float matrix[16]); + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoAlignment")] + public struct Alignment { + public uint padding_top; + public uint padding_bottom; + public uint padding_left; + public uint padding_right; + [CCode (array_length = false)] + public weak uint stride_align[4]; + public void reset (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoAncillary")] + [Version (since = "1.16")] + public struct Ancillary { + public uint8 DID; + public uint8 SDID_block_number; + public uint8 data_count; + [CCode (array_length_cname = "data_count", array_length_type = "guint8")] + public weak uint8[] data; + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoBarMeta")] + [Version (since = "1.18")] + public struct BarMeta { + public Gst.Meta meta; + public uint8 field; + public bool is_letterbox; + public uint bar_data1; + public uint bar_data2; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoCaptionMeta")] + [Version (since = "1.16")] + public struct CaptionMeta { + public Gst.Meta meta; + public Gst.Video.CaptionType caption_type; + [CCode (array_length_cname = "size", array_length_type = "gsize")] + public weak uint8[] data; + public size_t size; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoCodecAlphaMeta")] + [Version (since = "1.20")] + public struct CodecAlphaMeta { + public Gst.Meta meta; + public weak Gst.Buffer buffer; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoColorPrimariesInfo")] + [Version (since = "1.6")] + public struct ColorPrimariesInfo { + public Gst.Video.ColorPrimaries primaries; + public double Wx; + public double Wy; + public double Rx; + public double Ry; + public double Gx; + public double Gy; + public double Bx; + public double By; + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoColorimetry")] + public struct Colorimetry { + public Gst.Video.ColorRange range; + public Gst.Video.ColorMatrix matrix; + public Gst.Video.TransferFunction transfer; + public Gst.Video.ColorPrimaries primaries; + public bool from_string (string color); + [Version (since = "1.6")] + public bool is_equal (Gst.Video.Colorimetry other); + [Version (since = "1.22")] + public bool is_equivalent (uint bitdepth, Gst.Video.Colorimetry other, uint other_bitdepth); + public bool matches (string color); + public string? to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoContentLightLevel")] + [Version (since = "1.18")] + public struct ContentLightLevel { + public uint16 max_content_light_level; + public uint16 max_frame_average_light_level; + public bool add_to_caps (Gst.Caps caps); + public bool from_caps (Gst.Caps caps); + public bool from_string (string level); + public void init (); + [Version (since = "1.20")] + public bool is_equal (Gst.Video.ContentLightLevel other); + public string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoCropMeta")] + public struct CropMeta { + public Gst.Meta meta; + public uint x; + public uint y; + public uint width; + public uint height; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoFormatInfo")] + public struct FormatInfo { + public Gst.Video.Format format; + public weak string name; + public weak string description; + public Gst.Video.FormatFlags flags; + public uint bits; + public uint n_components; + [CCode (array_length = false)] + public weak uint shift[4]; + [CCode (array_length = false)] + public weak uint depth[4]; + [CCode (array_length = false)] + public weak int pixel_stride[4]; + public uint n_planes; + [CCode (array_length = false)] + public weak uint plane[4]; + [CCode (array_length = false)] + public weak uint poffset[4]; + [CCode (array_length = false)] + public weak uint w_sub[4]; + [CCode (array_length = false)] + public weak uint h_sub[4]; + public Gst.Video.Format unpack_format; + public weak Gst.Video.FormatUnpack unpack_func; + public int pack_lines; + public weak Gst.Video.FormatPack pack_func; + public Gst.Video.TileMode tile_mode; + public uint tile_ws; + public uint tile_hs; + [Version (since = "1.18")] + public void component (uint plane, out int components); + [Version (since = "1.22")] + public int extrapolate_stride (int plane, int stride); + [Version (since = "1.22")] + public uint get_tile_sizes (uint plane, uint? out_ws, uint? out_hs); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoFrame")] + public struct Frame { + public weak Gst.Video.Info info; + public Gst.Video.FrameFlags flags; + public weak Gst.Buffer buffer; + public void* meta; + public int id; + [CCode (array_length = false)] + public void* data[4]; + [CCode (array_length = false, cname = "map")] + public Gst.MapInfo map_info[4]; + public bool copy (Gst.Video.Frame src); + public bool copy_plane (Gst.Video.Frame src, uint plane); + public bool map (Gst.Video.Info info, Gst.Buffer buffer, Gst.MapFlags flags); + public bool map_id (Gst.Video.Info info, Gst.Buffer buffer, int id, Gst.MapFlags flags); + public void unmap (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoGLTextureUploadMeta")] + public struct GLTextureUploadMeta { + public Gst.Meta meta; + public Gst.Video.GLTextureOrientation texture_orientation; + public uint n_textures; + [CCode (array_length = false)] + public weak Gst.Video.GLTextureType texture_type[4]; + public static unowned Gst.MetaInfo? get_info (); + public bool upload (uint texture_id); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoMasteringDisplayInfo")] + [Version (since = "1.18")] + public struct MasteringDisplayInfo { + [CCode (array_length = false)] + public weak Gst.Video.MasteringDisplayInfoCoordinates display_primaries[3]; + public Gst.Video.MasteringDisplayInfoCoordinates white_point; + public uint32 max_display_mastering_luminance; + public uint32 min_display_mastering_luminance; + public bool add_to_caps (Gst.Caps caps); + public bool from_caps (Gst.Caps caps); + public bool from_string (string mastering); + public void init (); + public bool is_equal (Gst.Video.MasteringDisplayInfo other); + public string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoMasteringDisplayInfoCoordinates")] + [Version (since = "1.18")] + public struct MasteringDisplayInfoCoordinates { + public uint16 x; + public uint16 y; + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoMeta")] + public struct Meta { + public Gst.Meta meta; + public weak Gst.Buffer buffer; + public Gst.Video.FrameFlags flags; + public Gst.Video.Format format; + public int id; + public uint width; + public uint height; + public uint n_planes; + [CCode (array_length = false)] + public weak size_t offset[4]; + [CCode (array_length = false)] + public weak int stride[4]; + [CCode (cname = "map")] + public weak Gst.Video.MetaMapVFunc map_v; + [CCode (cname = "unmap")] + public weak Gst.Video.MetaUnmapVFunc unmap_v; + public Gst.Video.Alignment alignment; + public static unowned Gst.MetaInfo? get_info (); + [Version (since = "1.18")] + public bool get_plane_height ([CCode (array_length = false)] out unowned uint plane_height[4]); + [Version (since = "1.18")] + public bool get_plane_size ([CCode (array_length = false)] out unowned size_t plane_size[4]); + public bool map (uint plane, Gst.MapInfo info, out void* data, out int stride, Gst.MapFlags flags); + [Version (since = "1.18")] + public bool set_alignment (Gst.Video.Alignment alignment); + public bool unmap (uint plane, Gst.MapInfo info); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoMetaTransform")] + public struct MetaTransform { + public weak Gst.Video.Info in_info; + public weak Gst.Video.Info out_info; + public static GLib.Quark scale_get_quark (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoOverlayCompositionMeta")] + public struct OverlayCompositionMeta { + public Gst.Meta meta; + public weak Gst.Video.OverlayComposition overlay; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoRectangle")] + public struct Rectangle { + public int x; + public int y; + public int w; + public int h; + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoRegionOfInterestMeta")] + public struct RegionOfInterestMeta { + public Gst.Meta meta; + public GLib.Quark roi_type; + public int id; + public int parent_id; + public uint x; + public uint y; + public uint w; + public uint h; + public weak GLib.List<void*> @params; + [Version (since = "1.14")] + public void add_param (owned Gst.Structure s); + public static unowned Gst.MetaInfo? get_info (); + [Version (since = "1.14")] + public unowned Gst.Structure? get_param (string name); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoResampler")] + [Version (since = "1.6")] + public struct Resampler { + public int in_size; + public int out_size; + public uint max_taps; + public uint n_phases; + public uint32 offset; + public uint32 phase; + public uint32 n_taps; + public double taps; + public void clear (); + public bool init (Gst.Video.ResamplerMethod method, Gst.Video.ResamplerFlags flags, uint n_phases, uint n_taps, double shift, uint in_size, uint out_size, Gst.Structure options); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoSEIUserDataUnregisteredMeta")] + [Version (since = "1.22")] + public struct SEIUserDataUnregisteredMeta { + public Gst.Meta meta; + [CCode (array_length = false)] + public weak uint8 uuid[16]; + public uint8 data; + public size_t size; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoTimeCodeConfig")] + [Version (since = "1.10")] + public struct TimeCodeConfig { + public uint fps_n; + public uint fps_d; + public Gst.Video.TimeCodeFlags flags; + public weak GLib.DateTime latest_daily_jam; + } + [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] + [GIR (name = "VideoTimeCodeMeta")] + [Version (since = "1.10")] + public struct TimeCodeMeta { + public Gst.Meta meta; + public weak Gst.Video.TimeCode tc; + public static unowned Gst.MetaInfo? get_info (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_AFD_SPEC_", type_id = "gst_video_afd_spec_get_type ()")] + [GIR (name = "VideoAFDSpec")] + [Version (since = "1.18")] + public enum AFDSpec { + DVB_ETSI, + ATSC_A53, + SMPTE_ST2016_1 + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_AFD_", type_id = "gst_video_afd_value_get_type ()")] + [GIR (name = "VideoAFDValue")] + [Version (since = "1.18")] + public enum AFDValue { + UNAVAILABLE, + @16_9_TOP_ALIGNED, + @14_9_TOP_ALIGNED, + GREATER_THAN_16_9, + @4_3_FULL_16_9_FULL, + @4_3_FULL_4_3_PILLAR, + @16_9_LETTER_16_9_FULL, + @14_9_LETTER_14_9_PILLAR, + @4_3_FULL_14_9_CENTER, + @16_9_LETTER_14_9_CENTER, + @16_9_LETTER_4_3_CENTER + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_ALPHA_MODE_", type_id = "gst_video_alpha_mode_get_type ()")] + [GIR (name = "VideoAlphaMode")] + [Version (since = "1.6")] + public enum AlphaMode { + COPY, + SET, + MULT + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_ANCILLARY_DID_", type_id = "gst_video_ancillary_did_get_type ()")] + [GIR (name = "VideoAncillaryDID")] + [Version (since = "1.16")] + public enum AncillaryDID { + UNDEFINED, + DELETION, + HANC_3G_AUDIO_DATA_FIRST, + HANC_3G_AUDIO_DATA_LAST, + HANC_HDTV_AUDIO_DATA_FIRST, + HANC_HDTV_AUDIO_DATA_LAST, + HANC_SDTV_AUDIO_DATA_1_FIRST, + HANC_SDTV_AUDIO_DATA_1_LAST, + CAMERA_POSITION, + HANC_ERROR_DETECTION, + HANC_SDTV_AUDIO_DATA_2_FIRST, + HANC_SDTV_AUDIO_DATA_2_LAST + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_ANCILLARY_DID16_", type_id = "gst_video_ancillary_di_d16_get_type ()")] + [GIR (name = "VideoAncillaryDID16")] + [Version (since = "1.16")] + public enum AncillaryDID16 { + S334_EIA_708, + S334_EIA_608, + S2016_3_AFD_BAR + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_BUFFER_FLAG_", type_id = "gst_video_buffer_flags_get_type ()")] + [Flags] + [GIR (name = "VideoBufferFlags")] + public enum BufferFlags { + INTERLACED, + TFF, + RFF, + ONEFIELD, + MULTIPLE_VIEW, + FIRST_IN_BUNDLE, + TOP_FIELD, + BOTTOM_FIELD, + MARKER, + LAST + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CAPTION_TYPE_", type_id = "gst_video_caption_type_get_type ()")] + [GIR (name = "VideoCaptionType")] + [Version (since = "1.16")] + public enum CaptionType { + UNKNOWN, + CEA608_RAW, + CEA608_S334_1A, + CEA708_RAW, + CEA708_CDP; + public static Gst.Video.CaptionType from_caps (Gst.Caps caps); + public Gst.Caps to_caps (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CHROMA_FLAG_", type_id = "gst_video_chroma_flags_get_type ()")] + [Flags] + [GIR (name = "VideoChromaFlags")] + public enum ChromaFlags { + NONE, + INTERLACED + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CHROMA_METHOD_", type_id = "gst_video_chroma_method_get_type ()")] + [GIR (name = "VideoChromaMethod")] + public enum ChromaMethod { + NEAREST, + LINEAR + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CHROMA_MODE_", type_id = "gst_video_chroma_mode_get_type ()")] + [GIR (name = "VideoChromaMode")] + [Version (since = "1.6")] + public enum ChromaMode { + FULL, + UPSAMPLE_ONLY, + DOWNSAMPLE_ONLY, + NONE + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CHROMA_SITE_", type_id = "gst_video_chroma_site_get_type ()")] + [Flags] + [GIR (name = "VideoChromaSite")] + public enum ChromaSite { + UNKNOWN, + NONE, + H_COSITED, + V_COSITED, + ALT_LINE, + COSITED, + JPEG, + MPEG2, + DV; + [Version (since = "1.20")] + public static Gst.Video.ChromaSite from_string (string s); + [Version (since = "1.20")] + public string? to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_CODEC_FRAME_FLAG_", type_id = "gst_video_codec_frame_flags_get_type ()")] + [Flags] + [GIR (name = "VideoCodecFrameFlags")] + public enum CodecFrameFlags { + DECODE_ONLY, + SYNC_POINT, + FORCE_KEYFRAME, + FORCE_KEYFRAME_HEADERS, + [Version (since = "1.20")] + CORRUPTED + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstColorBalanceType", cprefix = "GST_COLOR_BALANCE_", type_id = "gst_color_balance_type_get_type ()")] + [GIR (name = "ColorBalanceType")] + public enum ColorBalanceType { + HARDWARE, + SOFTWARE + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_COLOR_MATRIX_", type_id = "gst_video_color_matrix_get_type ()")] + [GIR (name = "VideoColorMatrix")] + public enum ColorMatrix { + UNKNOWN, + RGB, + FCC, + BT709, + BT601, + SMPTE240M, + BT2020; + [Version (since = "1.18")] + public static Gst.Video.ColorMatrix from_iso (uint value); + [Version (since = "1.6")] + public bool get_Kr_Kb (out double Kr, out double Kb); + [Version (since = "1.18")] + public uint to_iso (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_COLOR_PRIMARIES_", type_id = "gst_video_color_primaries_get_type ()")] + [GIR (name = "VideoColorPrimaries")] + public enum ColorPrimaries { + UNKNOWN, + BT709, + BT470M, + BT470BG, + SMPTE170M, + SMPTE240M, + FILM, + BT2020, + ADOBERGB, + SMPTEST428, + SMPTERP431, + SMPTEEG432, + EBU3213; + [Version (since = "1.18")] + public static Gst.Video.ColorPrimaries from_iso (uint value); + [Version (since = "1.6")] + public unowned Gst.Video.ColorPrimariesInfo? get_info (); + [Version (since = "1.22")] + public bool is_equivalent (Gst.Video.ColorPrimaries other); + [Version (since = "1.18")] + public uint to_iso (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_COLOR_RANGE_", type_id = "gst_video_color_range_get_type ()")] + [GIR (name = "VideoColorRange")] + public enum ColorRange { + UNKNOWN, + @0_255, + @16_235; + public void offsets (Gst.Video.FormatInfo info, [CCode (array_length = false)] out unowned int offset[4], [CCode (array_length = false)] out unowned int scale[4]); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_DECODER_REQUEST_SYNC_POINT_", type_id = "gst_video_decoder_request_sync_point_flags_get_type ()")] + [Flags] + [GIR (name = "VideoDecoderRequestSyncPointFlags")] + [Version (since = "1.20")] + public enum DecoderRequestSyncPointFlags { + DISCARD_INPUT, + CORRUPT_OUTPUT + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_DITHER_FLAG_", type_id = "gst_video_dither_flags_get_type ()")] + [Flags] + [GIR (name = "VideoDitherFlags")] + public enum DitherFlags { + NONE, + INTERLACED, + QUANTIZE + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_DITHER_", type_id = "gst_video_dither_method_get_type ()")] + [GIR (name = "VideoDitherMethod")] + public enum DitherMethod { + NONE, + VERTERR, + FLOYD_STEINBERG, + SIERRA_LITE, + BAYER + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FIELD_ORDER_", type_id = "gst_video_field_order_get_type ()")] + [GIR (name = "VideoFieldOrder")] + [Version (since = "1.12")] + public enum FieldOrder { + UNKNOWN, + TOP_FIELD_FIRST, + BOTTOM_FIELD_FIRST; + public static Gst.Video.FieldOrder from_string (string order); + public unowned string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FLAG_", type_id = "gst_video_flags_get_type ()")] + [Flags] + [GIR (name = "VideoFlags")] + public enum Flags { + NONE, + VARIABLE_FPS, + PREMULTIPLIED_ALPHA + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FORMAT_", type_id = "gst_video_format_get_type ()")] + [GIR (name = "VideoFormat")] + public enum Format { + UNKNOWN, + ENCODED, + I420, + YV12, + YUY2, + UYVY, + AYUV, + [CCode (cname = "GST_VIDEO_FORMAT_RGBx")] + RGBX, + [CCode (cname = "GST_VIDEO_FORMAT_BGRx")] + BGRX, + [CCode (cname = "GST_VIDEO_FORMAT_xRGB")] + XRGB, + [CCode (cname = "GST_VIDEO_FORMAT_xBGR")] + XBGR, + RGBA, + BGRA, + ARGB, + ABGR, + RGB, + BGR, + Y41B, + Y42B, + YVYU, + Y444, + [CCode (cname = "GST_VIDEO_FORMAT_v210")] + V210, + [CCode (cname = "GST_VIDEO_FORMAT_v216")] + V216, + NV12, + NV21, + GRAY8, + GRAY16_BE, + GRAY16_LE, + [CCode (cname = "GST_VIDEO_FORMAT_v308")] + V308, + RGB16, + BGR16, + RGB15, + BGR15, + UYVP, + A420, + RGB8P, + YUV9, + YVU9, + IYU1, + ARGB64, + AYUV64, + [CCode (cname = "GST_VIDEO_FORMAT_r210")] + R210, + I420_10BE, + I420_10LE, + I422_10BE, + I422_10LE, + Y444_10BE, + Y444_10LE, + GBR, + GBR_10BE, + GBR_10LE, + NV16, + NV24, + NV12_64Z32, + A420_10BE, + A420_10LE, + A422_10BE, + A422_10LE, + A444_10BE, + A444_10LE, + NV61, + P010_10BE, + P010_10LE, + IYU2, + VYUY, + GBRA, + GBRA_10BE, + GBRA_10LE, + GBR_12BE, + GBR_12LE, + GBRA_12BE, + GBRA_12LE, + I420_12BE, + I420_12LE, + I422_12BE, + I422_12LE, + Y444_12BE, + Y444_12LE, + GRAY10_LE32, + NV12_10LE32, + NV16_10LE32, + NV12_10LE40, + Y210, + Y410, + VUYA, + BGR10A2_LE, + RGB10A2_LE, + Y444_16BE, + Y444_16LE, + P016_BE, + P016_LE, + P012_BE, + P012_LE, + Y212_BE, + Y212_LE, + Y412_BE, + Y412_LE, + [Version (since = "1.18")] + NV12_4L4, + [Version (since = "1.18")] + NV12_32L32, + [Version (since = "1.20")] + RGBP, + [Version (since = "1.20")] + BGRP, + [Version (since = "1.20")] + AV12, + [Version (since = "1.20")] + ARGB64_LE, + [Version (since = "1.20")] + ARGB64_BE, + [Version (since = "1.20")] + RGBA64_LE, + [Version (since = "1.20")] + RGBA64_BE, + [Version (since = "1.20")] + BGRA64_LE, + [Version (since = "1.20")] + BGRA64_BE, + [Version (since = "1.20")] + ABGR64_LE, + [Version (since = "1.20")] + ABGR64_BE, + [Version (since = "1.22")] + NV12_16L32S, + [Version (since = "1.22")] + NV12_8L128, + [Version (since = "1.22")] + NV12_10BE_8L128; + public static Gst.Video.Format from_fourcc (uint32 fourcc); + public static Gst.Video.Format from_masks (int depth, int bpp, int endianness, uint red_mask, uint green_mask, uint blue_mask, uint alpha_mask); + public static Gst.Video.Format from_string (string format); + public unowned Gst.Video.FormatInfo? get_info (); + [Version (since = "1.2")] + public void* get_palette (out size_t size); + public uint32 to_fourcc (); + public unowned string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FORMAT_FLAG_", type_id = "gst_video_format_flags_get_type ()")] + [Flags] + [GIR (name = "VideoFormatFlags")] + public enum FormatFlags { + YUV, + RGB, + GRAY, + ALPHA, + LE, + PALETTE, + COMPLEX, + UNPACK, + TILED, + [Version (since = "1.22")] + SUBTILES + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FRAME_FLAG_", type_id = "gst_video_frame_flags_get_type ()")] + [Flags] + [GIR (name = "VideoFrameFlags")] + public enum FrameFlags { + NONE, + INTERLACED, + TFF, + RFF, + ONEFIELD, + MULTIPLE_VIEW, + FIRST_IN_BUNDLE, + TOP_FIELD, + BOTTOM_FIELD + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_FRAME_MAP_FLAG_", type_id = "gst_video_frame_map_flags_get_type ()")] + [Flags] + [GIR (name = "VideoFrameMapFlags")] + [Version (since = "1.6")] + public enum FrameMapFlags { + NO_REF, + LAST + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_GL_TEXTURE_ORIENTATION_X_", type_id = "gst_video_gl_texture_orientation_get_type ()")] + [GIR (name = "VideoGLTextureOrientation")] + public enum GLTextureOrientation { + NORMAL_Y_NORMAL, + NORMAL_Y_FLIP, + FLIP_Y_NORMAL, + FLIP_Y_FLIP + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_GL_TEXTURE_TYPE_", type_id = "gst_video_gl_texture_type_get_type ()")] + [GIR (name = "VideoGLTextureType")] + public enum GLTextureType { + LUMINANCE, + LUMINANCE_ALPHA, + RGB16, + RGB, + RGBA, + R, + RG + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_GAMMA_MODE_", type_id = "gst_video_gamma_mode_get_type ()")] + [GIR (name = "VideoGammaMode")] + [Version (since = "1.6")] + public enum GammaMode { + NONE, + REMAP + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_INTERLACE_MODE_", type_id = "gst_video_interlace_mode_get_type ()")] + [GIR (name = "VideoInterlaceMode")] + public enum InterlaceMode { + PROGRESSIVE, + INTERLEAVED, + MIXED, + FIELDS, + ALTERNATE; + [Version (since = "1.6")] + public static Gst.Video.InterlaceMode from_string (string mode); + [Version (since = "1.6")] + public unowned string to_string (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_MATRIX_MODE_", type_id = "gst_video_matrix_mode_get_type ()")] + [GIR (name = "VideoMatrixMode")] + [Version (since = "1.6")] + public enum MatrixMode { + FULL, + INPUT_ONLY, + OUTPUT_ONLY, + NONE + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_MULTIVIEW_FLAGS_", type_id = "gst_video_multiview_flags_get_type ()")] + [Flags] + [GIR (name = "VideoMultiviewFlags")] + public enum MultiviewFlags { + NONE, + RIGHT_VIEW_FIRST, + LEFT_FLIPPED, + LEFT_FLOPPED, + RIGHT_FLIPPED, + RIGHT_FLOPPED, + HALF_ASPECT, + MIXED_MONO + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_", type_id = "gst_video_multiview_frame_packing_get_type ()")] + [GIR (name = "VideoMultiviewFramePacking")] + public enum MultiviewFramePacking { + NONE, + MONO, + LEFT, + RIGHT, + SIDE_BY_SIDE, + SIDE_BY_SIDE_QUINCUNX, + COLUMN_INTERLEAVED, + ROW_INTERLEAVED, + TOP_BOTTOM, + CHECKERBOARD + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_MULTIVIEW_MODE_", type_id = "gst_video_multiview_mode_get_type ()")] + [GIR (name = "VideoMultiviewMode")] + public enum MultiviewMode { + NONE, + MONO, + LEFT, + RIGHT, + SIDE_BY_SIDE, + SIDE_BY_SIDE_QUINCUNX, + COLUMN_INTERLEAVED, + ROW_INTERLEAVED, + TOP_BOTTOM, + CHECKERBOARD, + FRAME_BY_FRAME, + MULTIVIEW_FRAME_BY_FRAME, + SEPARATED; + [Version (since = "1.6")] + public static Gst.Video.MultiviewMode from_caps_string (string caps_mview_mode); + [Version (since = "1.6")] + public unowned string to_caps_string (); + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigationCommand", cprefix = "GST_NAVIGATION_COMMAND_", type_id = "gst_navigation_command_get_type ()")] + [GIR (name = "NavigationCommand")] + public enum NavigationCommand { + INVALID, + MENU1, + MENU2, + MENU3, + MENU4, + MENU5, + MENU6, + MENU7, + LEFT, + RIGHT, + UP, + DOWN, + ACTIVATE, + PREV_ANGLE, + NEXT_ANGLE + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigationEventType", cprefix = "GST_NAVIGATION_EVENT_", type_id = "gst_navigation_event_type_get_type ()")] + [GIR (name = "NavigationEventType")] + public enum NavigationEventType { + INVALID, + KEY_PRESS, + KEY_RELEASE, + MOUSE_BUTTON_PRESS, + MOUSE_BUTTON_RELEASE, + MOUSE_MOVE, + COMMAND, + [Version (since = "1.18")] + MOUSE_SCROLL, + [Version (since = "1.22")] + TOUCH_DOWN, + [Version (since = "1.22")] + TOUCH_MOTION, + [Version (since = "1.22")] + TOUCH_UP, + [Version (since = "1.22")] + TOUCH_FRAME, + [Version (since = "1.22")] + TOUCH_CANCEL + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigationMessageType", cprefix = "GST_NAVIGATION_MESSAGE_", type_id = "gst_navigation_message_type_get_type ()")] + [GIR (name = "NavigationMessageType")] + public enum NavigationMessageType { + INVALID, + MOUSE_OVER, + COMMANDS_CHANGED, + ANGLES_CHANGED, + EVENT + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigationModifierType", cprefix = "GST_NAVIGATION_MODIFIER_", type_id = "gst_navigation_modifier_type_get_type ()")] + [Flags] + [GIR (name = "NavigationModifierType")] + [Version (since = "1.22")] + public enum NavigationModifierType { + NONE, + SHIFT_MASK, + LOCK_MASK, + CONTROL_MASK, + ALT_MASK, + BUTTON1_MASK, + BUTTON2_MASK, + BUTTON3_MASK, + BUTTON4_MASK, + BUTTON5_MASK, + SUPER_MASK, + HYPER_MASK, + META_MASK, + MASK + } + [CCode (cheader_filename = "gst/video/video.h", cname = "GstNavigationQueryType", cprefix = "GST_NAVIGATION_QUERY_", type_id = "gst_navigation_query_type_get_type ()")] + [GIR (name = "NavigationQueryType")] + public enum NavigationQueryType { + INVALID, + COMMANDS, + ANGLES + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_ORIENTATION_", type_id = "gst_video_orientation_method_get_type ()")] + [GIR (name = "VideoOrientationMethod")] + [Version (since = "1.10")] + public enum OrientationMethod { + IDENTITY, + @90R, + @180, + @90L, + HORIZ, + VERT, + UL_LR, + UR_LL, + AUTO, + CUSTOM + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_OVERLAY_FORMAT_FLAG_", type_id = "gst_video_overlay_format_flags_get_type ()")] + [Flags] + [GIR (name = "VideoOverlayFormatFlags")] + public enum OverlayFormatFlags { + NONE, + PREMULTIPLIED_ALPHA, + GLOBAL_ALPHA + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_PACK_FLAG_", type_id = "gst_video_pack_flags_get_type ()")] + [Flags] + [GIR (name = "VideoPackFlags")] + public enum PackFlags { + NONE, + TRUNCATE_RANGE, + INTERLACED + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_PRIMARIES_MODE_", type_id = "gst_video_primaries_mode_get_type ()")] + [GIR (name = "VideoPrimariesMode")] + [Version (since = "1.6")] + public enum PrimariesMode { + NONE, + MERGE_ONLY, + FAST + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_RESAMPLER_FLAG_", type_id = "gst_video_resampler_flags_get_type ()")] + [Flags] + [GIR (name = "VideoResamplerFlags")] + [Version (since = "1.6")] + public enum ResamplerFlags { + NONE, + HALF_TAPS + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_RESAMPLER_METHOD_", type_id = "gst_video_resampler_method_get_type ()")] + [GIR (name = "VideoResamplerMethod")] + [Version (since = "1.6")] + public enum ResamplerMethod { + NEAREST, + LINEAR, + CUBIC, + SINC, + LANCZOS + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_SCALER_FLAG_", type_id = "gst_video_scaler_flags_get_type ()")] + [Flags] + [GIR (name = "VideoScalerFlags")] + public enum ScalerFlags { + NONE, + INTERLACED + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_TILE_MODE_", type_id = "gst_video_tile_mode_get_type ()")] + [GIR (name = "VideoTileMode")] + public enum TileMode { + UNKNOWN, + ZFLIPZ_2X2, + [Version (since = "1.18")] + LINEAR + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_TILE_TYPE_", type_id = "gst_video_tile_type_get_type ()")] + [GIR (name = "VideoTileType")] + public enum TileType { + INDEXED + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_TIME_CODE_FLAGS_", type_id = "gst_video_time_code_flags_get_type ()")] + [Flags] + [GIR (name = "VideoTimeCodeFlags")] + [Version (since = "1.10")] + public enum TimeCodeFlags { + NONE, + DROP_FRAME, + INTERLACED + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_TRANSFER_", type_id = "gst_video_transfer_function_get_type ()")] + [GIR (name = "VideoTransferFunction")] + public enum TransferFunction { + UNKNOWN, + GAMMA10, + GAMMA18, + GAMMA20, + GAMMA22, + BT709, + SMPTE240M, + SRGB, + GAMMA28, + LOG100, + LOG316, + BT2020_12, + ADOBERGB, + BT2020_10, + SMPTE2084, + ARIB_STD_B67, + [Version (since = "1.18")] + BT601; + [Version (since = "1.20")] + public double decode (double val); + [Version (since = "1.20")] + public double encode (double val); + [Version (since = "1.18")] + public static Gst.Video.TransferFunction from_iso (uint value); + [Version (since = "1.18")] + public bool is_equivalent (uint from_bpp, Gst.Video.TransferFunction to_func, uint to_bpp); + [Version (since = "1.18")] + public uint to_iso (); + } + [CCode (cheader_filename = "gst/video/video.h", cprefix = "GST_VIDEO_VBI_PARSER_RESULT_", type_id = "gst_video_vbi_parser_result_get_type ()")] + [GIR (name = "VideoVBIParserResult")] + [Version (since = "1.16")] + public enum VBIParserResult { + DONE, + OK, + ERROR + } + [CCode (cheader_filename = "gst/video/video.h", has_target = false)] + public delegate bool AffineTransformationGetMatrix (Gst.Video.AffineTransformationMeta meta, float matrix); + [CCode (cheader_filename = "gst/video/video.h", instance_pos = 2.9)] + public delegate void ConvertSampleCallback (Gst.Sample sample, GLib.Error error); + [CCode (cheader_filename = "gst/video/video.h", has_target = false)] + public delegate void FormatPack (Gst.Video.FormatInfo info, Gst.Video.PackFlags flags, void* src, int sstride, void* data, int stride, Gst.Video.ChromaSite chroma_site, int y, int width); + [CCode (cheader_filename = "gst/video/video.h", has_target = false)] + public delegate void FormatUnpack (Gst.Video.FormatInfo info, Gst.Video.PackFlags flags, void* dest, void* data, int stride, int x, int y, int width); + [CCode (cheader_filename = "gst/video/video.h", has_target = false)] + public delegate bool GLTextureUpload (Gst.Video.GLTextureUploadMeta meta, uint texture_id); + [CCode (cheader_filename = "gst/video/video.h", has_target = false, has_typedef = false)] + public delegate bool MetaMapVFunc (Gst.Video.Meta meta, uint plane, Gst.MapInfo info, void* data, int stride, Gst.MapFlags flags); + [CCode (cheader_filename = "gst/video/video.h", has_target = false, has_typedef = false)] + public delegate bool MetaUnmapVFunc (Gst.Video.Meta meta, uint plane, Gst.MapInfo info); + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META")] + public const string BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT")] + public const string BUFFER_POOL_OPTION_VIDEO_ALIGNMENT; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META")] + [Version (since = "1.2.2")] + public const string BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_BUFFER_POOL_OPTION_VIDEO_META")] + public const string BUFFER_POOL_OPTION_VIDEO_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_CAPS_FEATURE_FORMAT_INTERLACED")] + [Version (since = "1.16.")] + public const string CAPS_FEATURE_FORMAT_INTERLACED; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META")] + public const string CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META")] + public const string CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_CAPS_FEATURE_META_GST_VIDEO_META")] + public const string CAPS_FEATURE_META_GST_VIDEO_META; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION")] + public const string CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT2020")] + public const string COLORIMETRY_BT2020; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT2020_10")] + public const string COLORIMETRY_BT2020_10; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT2100_HLG")] + public const string COLORIMETRY_BT2100_HLG; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT2100_PQ")] + public const string COLORIMETRY_BT2100_PQ; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT601")] + public const string COLORIMETRY_BT601; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_BT709")] + public const string COLORIMETRY_BT709; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_SMPTE240M")] + public const string COLORIMETRY_SMPTE240M; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COLORIMETRY_SRGB")] + public const string COLORIMETRY_SRGB; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_A")] + public const int COMP_A; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_B")] + public const int COMP_B; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_G")] + public const int COMP_G; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_INDEX")] + public const int COMP_INDEX; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_PALETTE")] + public const int COMP_PALETTE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_R")] + public const int COMP_R; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_U")] + public const int COMP_U; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_V")] + public const int COMP_V; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_COMP_Y")] + public const int COMP_Y; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_ALPHA_MODE")] + public const string CONVERTER_OPT_ALPHA_MODE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE")] + public const string CONVERTER_OPT_ALPHA_VALUE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_ASYNC_TASKS")] + [Version (since = "1.20")] + public const string CONVERTER_OPT_ASYNC_TASKS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_BORDER_ARGB")] + public const string CONVERTER_OPT_BORDER_ARGB; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_CHROMA_MODE")] + public const string CONVERTER_OPT_CHROMA_MODE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD")] + public const string CONVERTER_OPT_CHROMA_RESAMPLER_METHOD; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT")] + public const string CONVERTER_OPT_DEST_HEIGHT; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DEST_WIDTH")] + public const string CONVERTER_OPT_DEST_WIDTH; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DEST_X")] + public const string CONVERTER_OPT_DEST_X; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DEST_Y")] + public const string CONVERTER_OPT_DEST_Y; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DITHER_METHOD")] + public const string CONVERTER_OPT_DITHER_METHOD; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION")] + public const string CONVERTER_OPT_DITHER_QUANTIZATION; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_FILL_BORDER")] + public const string CONVERTER_OPT_FILL_BORDER; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_GAMMA_MODE")] + public const string CONVERTER_OPT_GAMMA_MODE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_MATRIX_MODE")] + public const string CONVERTER_OPT_MATRIX_MODE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE")] + public const string CONVERTER_OPT_PRIMARIES_MODE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD")] + public const string CONVERTER_OPT_RESAMPLER_METHOD; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS")] + public const string CONVERTER_OPT_RESAMPLER_TAPS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT")] + public const string CONVERTER_OPT_SRC_HEIGHT; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_SRC_WIDTH")] + public const string CONVERTER_OPT_SRC_WIDTH; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_SRC_X")] + public const string CONVERTER_OPT_SRC_X; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_SRC_Y")] + public const string CONVERTER_OPT_SRC_Y; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_CONVERTER_OPT_THREADS")] + public const string CONVERTER_OPT_THREADS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_DECODER_MAX_ERRORS")] + public const int DECODER_MAX_ERRORS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_DECODER_SINK_NAME")] + public const string DECODER_SINK_NAME; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_DECODER_SRC_NAME")] + public const string DECODER_SRC_NAME; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_ENCODER_SINK_NAME")] + public const string ENCODER_SINK_NAME; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_ENCODER_SRC_NAME")] + public const string ENCODER_SRC_NAME; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_FORMATS_ALL")] + public const string FORMATS_ALL; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_FPS_RANGE")] + public const string FPS_RANGE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_MAX_COMPONENTS")] + public const int MAX_COMPONENTS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_MAX_PLANES")] + public const int MAX_PLANES; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_META_TAG_VIDEO_COLORSPACE_STR")] + [Version (since = "1.2")] + public const string META_TAG_VIDEO_COLORSPACE_STR; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_META_TAG_VIDEO_ORIENTATION_STR")] + [Version (since = "1.2")] + public const string META_TAG_VIDEO_ORIENTATION_STR; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_META_TAG_VIDEO_SIZE_STR")] + [Version (since = "1.2")] + public const string META_TAG_VIDEO_SIZE_STR; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_META_TAG_VIDEO_STR")] + [Version (since = "1.2")] + public const string META_TAG_VIDEO_STR; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_CUBIC_B")] + public const string RESAMPLER_OPT_CUBIC_B; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_CUBIC_C")] + public const string RESAMPLER_OPT_CUBIC_C; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_ENVELOPE")] + public const string RESAMPLER_OPT_ENVELOPE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_MAX_TAPS")] + public const string RESAMPLER_OPT_MAX_TAPS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_SHARPEN")] + public const string RESAMPLER_OPT_SHARPEN; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_RESAMPLER_OPT_SHARPNESS")] + public const string RESAMPLER_OPT_SHARPNESS; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_SCALER_OPT_DITHER_METHOD")] + public const string SCALER_OPT_DITHER_METHOD; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_SIZE_RANGE")] + public const string SIZE_RANGE; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_TILE_TYPE_MASK")] + public const int TILE_TYPE_MASK; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_TILE_TYPE_SHIFT")] + public const int TILE_TYPE_SHIFT; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_TILE_X_TILES_MASK")] + public const int TILE_X_TILES_MASK; + [CCode (cheader_filename = "gst/video/video.h", cname = "GST_VIDEO_TILE_Y_TILES_SHIFT")] + public const int TILE_Y_TILES_SHIFT; + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type afd_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoAFDMeta.get_info")] + public static unowned Gst.MetaInfo? afd_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type affine_transformation_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoAffineTransformationMeta.get_info")] + public static unowned Gst.MetaInfo? affine_transformation_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type bar_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoBarMeta.get_info")] + public static unowned Gst.MetaInfo? bar_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool blend (Gst.Video.Frame dest, Gst.Video.Frame src, int x, int y, float global_alpha); + [CCode (cheader_filename = "gst/video/video.h")] + public static void blend_scale_linear_RGBA (Gst.Video.Info src, Gst.Buffer src_buffer, int dest_height, int dest_width, out unowned Gst.Video.Info dest, out Gst.Buffer dest_buffer); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_afd_meta")] + [Version (since = "1.18")] + public static unowned Gst.Video.AFDMeta? buffer_add_video_afd_meta (Gst.Buffer buffer, uint8 field, Gst.Video.AFDSpec spec, Gst.Video.AFDValue afd); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_affine_transformation_meta")] + [Version (since = "1.8")] + public static unowned Gst.Video.AffineTransformationMeta? buffer_add_video_affine_transformation_meta (Gst.Buffer buffer); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_bar_meta")] + [Version (since = "1.18")] + public static unowned Gst.Video.BarMeta? buffer_add_video_bar_meta (Gst.Buffer buffer, uint8 field, bool is_letterbox, uint bar_data1, uint bar_data2); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_caption_meta")] + [Version (since = "1.16")] + public static unowned Gst.Video.CaptionMeta? buffer_add_video_caption_meta (Gst.Buffer buffer, Gst.Video.CaptionType caption_type, [CCode (array_length_cname = "size", array_length_pos = 3.1, array_length_type = "gsize")] uint8[] data); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_codec_alpha_meta")] + [Version (since = "1.20")] + public static unowned Gst.Video.CodecAlphaMeta? buffer_add_video_codec_alpha_meta (Gst.Buffer buffer, owned Gst.Buffer alpha_buffer); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_gl_texture_upload_meta")] + public static unowned Gst.Video.GLTextureUploadMeta? buffer_add_video_gl_texture_upload_meta (Gst.Buffer buffer, Gst.Video.GLTextureOrientation texture_orientation, uint n_textures, Gst.Video.GLTextureType texture_type, [CCode (delegate_target_pos = 5.5)] Gst.Video.GLTextureUpload upload, GLib.BoxedCopyFunc user_data_copy, GLib.BoxedFreeFunc user_data_free); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_meta")] + public static unowned Gst.Video.Meta? buffer_add_video_meta (Gst.Buffer buffer, Gst.Video.FrameFlags flags, Gst.Video.Format format, uint width, uint height); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_meta_full")] + public static unowned Gst.Video.Meta? buffer_add_video_meta_full (Gst.Buffer buffer, Gst.Video.FrameFlags flags, Gst.Video.Format format, uint width, uint height, uint n_planes, [CCode (array_length = false)] size_t offset[4], [CCode (array_length = false)] int stride[4]); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_overlay_composition_meta")] + public static unowned Gst.Video.OverlayCompositionMeta? buffer_add_video_overlay_composition_meta (Gst.Buffer buf, Gst.Video.OverlayComposition? comp); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_region_of_interest_meta")] + public static unowned Gst.Video.RegionOfInterestMeta? buffer_add_video_region_of_interest_meta (Gst.Buffer buffer, string roi_type, uint x, uint y, uint w, uint h); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_region_of_interest_meta_id")] + public static unowned Gst.Video.RegionOfInterestMeta? buffer_add_video_region_of_interest_meta_id (Gst.Buffer buffer, GLib.Quark roi_type, uint x, uint y, uint w, uint h); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_sei_user_data_unregistered_meta")] + [Version (since = "1.22")] + public static unowned Gst.Video.SEIUserDataUnregisteredMeta? buffer_add_video_sei_user_data_unregistered_meta (Gst.Buffer buffer, uint8 uuid, uint8 data, size_t size); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_time_code_meta")] + [Version (since = "1.10")] + public static unowned Gst.Video.TimeCodeMeta? buffer_add_video_time_code_meta (Gst.Buffer buffer, Gst.Video.TimeCode tc); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_add_video_time_code_meta_full")] + [Version (since = "1.10")] + public static unowned Gst.Video.TimeCodeMeta? buffer_add_video_time_code_meta_full (Gst.Buffer buffer, uint fps_n, uint fps_d, GLib.DateTime latest_daily_jam, Gst.Video.TimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint field_count); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_get_video_meta")] + public static unowned Gst.Video.Meta? buffer_get_video_meta (Gst.Buffer buffer); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_get_video_meta_id")] + public static unowned Gst.Video.Meta? buffer_get_video_meta_id (Gst.Buffer buffer, int id); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_get_video_region_of_interest_meta_id")] + public static unowned Gst.Video.RegionOfInterestMeta? buffer_get_video_region_of_interest_meta_id (Gst.Buffer buffer, int id); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_pool_config_get_video_alignment")] + public static bool buffer_pool_config_get_video_alignment (Gst.Structure config, Gst.Video.Alignment align); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_buffer_pool_config_set_video_alignment")] + public static void buffer_pool_config_set_video_alignment (Gst.Structure config, Gst.Video.Alignment align); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool calculate_display_ratio (out uint dar_n, out uint dar_d, uint video_width, uint video_height, uint video_par_n, uint video_par_d, uint display_par_n, uint display_par_d); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type caption_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoCaptionMeta.get_info")] + public static unowned Gst.MetaInfo? caption_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoCaptionType.from_caps", since = "1.16")] + public static Gst.Video.CaptionType caption_type_from_caps (Gst.Caps caps); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoCaptionType.to_caps", since = "1.16")] + public static Gst.Caps caption_type_to_caps (Gst.Video.CaptionType type); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.20")] + public static void center_rect (Gst.Video.Rectangle src, Gst.Video.Rectangle dst, out Gst.Video.Rectangle result, bool scaling); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (deprecated = true, deprecated_since = "1.20")] + public static Gst.Video.ChromaSite chroma_from_string (string s); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoChromaSite.from_string", since = "1.20")] + public static Gst.Video.ChromaSite chroma_site_from_string (string s); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoChromaSite.to_string", since = "1.20")] + public static string? chroma_site_to_string (Gst.Video.ChromaSite site); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (deprecated = true, deprecated_since = "1.20")] + public static unowned string chroma_to_string (Gst.Video.ChromaSite site); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.20")] + public static GLib.Type codec_alpha_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoCodecAlphaMeta.get_info", since = "1.20")] + public static unowned Gst.MetaInfo? codec_alpha_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorMatrix.from_iso", since = "1.18")] + public static Gst.Video.ColorMatrix color_matrix_from_iso (uint value); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorMatrix.get_Kr_Kb", since = "1.6")] + public static bool color_matrix_get_Kr_Kb (Gst.Video.ColorMatrix matrix, out double Kr, out double Kb); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorMatrix.to_iso", since = "1.18")] + public static uint color_matrix_to_iso (Gst.Video.ColorMatrix matrix); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorPrimaries.from_iso", since = "1.18")] + public static Gst.Video.ColorPrimaries color_primaries_from_iso (uint value); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorPrimaries.get_info", since = "1.6")] + public static unowned Gst.Video.ColorPrimariesInfo? color_primaries_get_info (Gst.Video.ColorPrimaries primaries); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorPrimaries.is_equivalent", since = "1.22")] + public static bool color_primaries_is_equivalent (Gst.Video.ColorPrimaries primaries, Gst.Video.ColorPrimaries other); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorPrimaries.to_iso", since = "1.18")] + public static uint color_primaries_to_iso (Gst.Video.ColorPrimaries primaries); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoColorRange.offsets")] + public static void color_range_offsets (Gst.Video.ColorRange range, Gst.Video.FormatInfo info, [CCode (array_length = false)] out unowned int offset[4], [CCode (array_length = false)] out unowned int scale[4]); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (deprecated = true, deprecated_since = "1.20", since = "1.6")] + public static double color_transfer_decode (Gst.Video.TransferFunction func, double val); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (deprecated = true, deprecated_since = "1.20", since = "1.6")] + public static double color_transfer_encode (Gst.Video.TransferFunction func, double val); + [CCode (cheader_filename = "gst/video/video.h")] + public static Gst.Sample convert_sample (Gst.Sample sample, Gst.Caps to_caps, Gst.ClockTime timeout) throws GLib.Error; + [CCode (cheader_filename = "gst/video/video.h")] + public static void convert_sample_async (Gst.Sample sample, Gst.Caps to_caps, Gst.ClockTime timeout, owned Gst.Video.ConvertSampleCallback callback); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type crop_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoCropMeta.get_info")] + public static unowned Gst.MetaInfo? crop_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool event_is_force_key_unit (Gst.Event event); + [CCode (cheader_filename = "gst/video/video.h")] + public static Gst.Event event_new_downstream_force_key_unit (Gst.ClockTime timestamp, Gst.ClockTime stream_time, Gst.ClockTime running_time, bool all_headers, uint count); + [CCode (cheader_filename = "gst/video/video.h")] + public static Gst.Event event_new_still_frame (bool in_still); + [CCode (cheader_filename = "gst/video/video.h")] + public static Gst.Event event_new_upstream_force_key_unit (Gst.ClockTime running_time, bool all_headers, uint count); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool event_parse_downstream_force_key_unit (Gst.Event event, out Gst.ClockTime timestamp, out Gst.ClockTime stream_time, out Gst.ClockTime running_time, out bool all_headers, out uint count); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool event_parse_still_frame (Gst.Event event, out bool in_still); + [CCode (cheader_filename = "gst/video/video.h")] + public static bool event_parse_upstream_force_key_unit (Gst.Event event, out Gst.ClockTime running_time, out bool all_headers, out uint count); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFieldOrder.from_string", since = "1.12")] + public static Gst.Video.FieldOrder field_order_from_string (string order); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFieldOrder.to_string", since = "1.12")] + public static unowned string field_order_to_string (Gst.Video.FieldOrder order); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.from_fourcc")] + public static Gst.Video.Format format_from_fourcc (uint32 fourcc); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.from_masks")] + public static Gst.Video.Format format_from_masks (int depth, int bpp, int endianness, uint red_mask, uint green_mask, uint blue_mask, uint alpha_mask); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.from_string")] + public static Gst.Video.Format format_from_string (string format); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.get_info")] + public static unowned Gst.Video.FormatInfo? format_get_info (Gst.Video.Format format); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.get_palette", since = "1.2")] + public static void* format_get_palette (Gst.Video.Format format, out size_t size); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.to_fourcc")] + public static uint32 format_to_fourcc (Gst.Video.Format format); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFormat.to_string")] + public static unowned string format_to_string (Gst.Video.Format format); + [CCode (array_length_pos = 0.1, array_length_type = "guint", cheader_filename = "gst/video/video.h")] + [Version (since = "1.18")] + public static unowned Gst.Video.Format[] formats_raw (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFrame.map")] + public static bool frame_map (out Gst.Video.Frame frame, Gst.Video.Info info, Gst.Buffer buffer, Gst.MapFlags flags); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoFrame.map_id")] + public static bool frame_map_id (out Gst.Video.Frame frame, Gst.Video.Info info, Gst.Buffer buffer, int id, Gst.MapFlags flags); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type gl_texture_upload_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoGLTextureUploadMeta.get_info")] + public static unowned Gst.MetaInfo? gl_texture_upload_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static bool guess_framerate (Gst.ClockTime duration, out int dest_n, out int dest_d); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoInfo.from_caps")] + public static bool info_from_caps (out unowned Gst.Video.Info info, Gst.Caps caps); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoInfo.init")] + public static void info_init (out unowned Gst.Video.Info info); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoInterlaceMode.from_string", since = "1.6")] + public static Gst.Video.InterlaceMode interlace_mode_from_string (string mode); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoInterlaceMode.to_string", since = "1.6")] + public static unowned string interlace_mode_to_string (Gst.Video.InterlaceMode mode); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.22")] + public static bool is_common_aspect_ratio (int width, int height, int par_n, int par_d); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_is_video_overlay_prepare_window_handle_message")] + public static bool is_video_overlay_prepare_window_handle_message (Gst.Message msg); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.18")] + public static Gst.Caps make_raw_caps ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] Gst.Video.Format[]? formats); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.18")] + public static Gst.Caps make_raw_caps_with_features ([CCode (array_length_cname = "len", array_length_pos = 1.5, array_length_type = "guint")] Gst.Video.Format[]? formats, owned Gst.CapsFeatures? features); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoMasteringDisplayInfo.from_string", since = "1.18")] + public static bool mastering_display_info_from_string (out Gst.Video.MasteringDisplayInfo minfo, string mastering); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoMeta.get_info")] + public static unowned Gst.MetaInfo? meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoMetaTransform.scale_get_quark")] + public static GLib.Quark meta_transform_scale_get_quark (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static unowned GLib.Value? multiview_get_doubled_height_modes (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static unowned GLib.Value? multiview_get_doubled_size_modes (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static unowned GLib.Value? multiview_get_doubled_width_modes (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static unowned GLib.Value? multiview_get_mono_modes (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static unowned GLib.Value? multiview_get_unpacked_modes (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static bool multiview_guess_half_aspect (Gst.Video.MultiviewMode mv_mode, uint width, uint height, uint par_n, uint par_d); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoMultiviewMode.from_caps_string", since = "1.6")] + public static Gst.Video.MultiviewMode multiview_mode_from_caps_string (string caps_mview_mode); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoMultiviewMode.to_caps_string", since = "1.6")] + public static unowned string multiview_mode_to_caps_string (Gst.Video.MultiviewMode mview_mode); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.6")] + public static void multiview_video_info_change_mode (Gst.Video.Info info, Gst.Video.MultiviewMode out_mview_mode, Gst.Video.MultiviewFlags out_mview_flags); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_get_coordinates")] + [Version (replacement = "Navigation.event_get_coordinates", since = "1.22")] + public static bool navigation_event_get_coordinates (Gst.Event event, out double x, out double y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_get_type")] + [Version (replacement = "Navigation.event_get_type")] + public static Gst.Video.NavigationEventType navigation_event_get_type (Gst.Event event); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_command")] + [Version (replacement = "Navigation.event_new_command", since = "1.22")] + public static Gst.Event navigation_event_new_command (Gst.Video.NavigationCommand command); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_key_press")] + [Version (replacement = "Navigation.event_new_key_press", since = "1.22")] + public static Gst.Event navigation_event_new_key_press (string key, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_key_release")] + [Version (replacement = "Navigation.event_new_key_release", since = "1.22")] + public static Gst.Event navigation_event_new_key_release (string key, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_mouse_button_press")] + [Version (replacement = "Navigation.event_new_mouse_button_press", since = "1.22")] + public static Gst.Event navigation_event_new_mouse_button_press (int button, double x, double y, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_mouse_button_release")] + [Version (replacement = "Navigation.event_new_mouse_button_release", since = "1.22")] + public static Gst.Event navigation_event_new_mouse_button_release (int button, double x, double y, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_mouse_move")] + [Version (replacement = "Navigation.event_new_mouse_move", since = "1.22")] + public static Gst.Event navigation_event_new_mouse_move (double x, double y, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_mouse_scroll")] + [Version (replacement = "Navigation.event_new_mouse_scroll", since = "1.22")] + public static Gst.Event navigation_event_new_mouse_scroll (double x, double y, double delta_x, double delta_y, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_touch_cancel")] + [Version (replacement = "Navigation.event_new_touch_cancel", since = "1.22")] + public static Gst.Event navigation_event_new_touch_cancel (Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_touch_down")] + [Version (replacement = "Navigation.event_new_touch_down", since = "1.22")] + public static Gst.Event navigation_event_new_touch_down (uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_touch_frame")] + [Version (replacement = "Navigation.event_new_touch_frame", since = "1.22")] + public static Gst.Event navigation_event_new_touch_frame (Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_touch_motion")] + [Version (replacement = "Navigation.event_new_touch_motion", since = "1.22")] + public static Gst.Event navigation_event_new_touch_motion (uint identifier, double x, double y, double pressure, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_new_touch_up")] + [Version (replacement = "Navigation.event_new_touch_up", since = "1.22")] + public static Gst.Event navigation_event_new_touch_up (uint identifier, double x, double y, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_command")] + [Version (replacement = "Navigation.event_parse_command")] + public static bool navigation_event_parse_command (Gst.Event event, out Gst.Video.NavigationCommand command); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_key_event")] + [Version (replacement = "Navigation.event_parse_key_event")] + public static bool navigation_event_parse_key_event (Gst.Event event, out unowned string key); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_modifier_state")] + [Version (replacement = "Navigation.event_parse_modifier_state", since = "1.22")] + public static bool navigation_event_parse_modifier_state (Gst.Event event, Gst.Video.NavigationModifierType state); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_mouse_button_event")] + [Version (replacement = "Navigation.event_parse_mouse_button_event")] + public static bool navigation_event_parse_mouse_button_event (Gst.Event event, out int button, out double x, out double y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_mouse_move_event")] + [Version (replacement = "Navigation.event_parse_mouse_move_event")] + public static bool navigation_event_parse_mouse_move_event (Gst.Event event, out double x, out double y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_mouse_scroll_event")] + [Version (replacement = "Navigation.event_parse_mouse_scroll_event", since = "1.18")] + public static bool navigation_event_parse_mouse_scroll_event (Gst.Event event, out double x, out double y, out double delta_x, out double delta_y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_touch_event")] + [Version (replacement = "Navigation.event_parse_touch_event", since = "1.22")] + public static bool navigation_event_parse_touch_event (Gst.Event event, out uint identifier, out double x, out double y, out double pressure); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_parse_touch_up_event")] + [Version (replacement = "Navigation.event_parse_touch_up_event", since = "1.22")] + public static bool navigation_event_parse_touch_up_event (Gst.Event event, out uint identifier, out double x, out double y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_event_set_coordinates")] + [Version (replacement = "Navigation.event_set_coordinates", since = "1.22")] + public static bool navigation_event_set_coordinates (Gst.Event event, double x, double y); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_get_type")] + [Version (replacement = "Navigation.message_get_type")] + public static Gst.Video.NavigationMessageType navigation_message_get_type (Gst.Message message); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_new_angles_changed")] + [Version (replacement = "Navigation.message_new_angles_changed")] + public static Gst.Message navigation_message_new_angles_changed (Gst.Object src, uint cur_angle, uint n_angles); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_new_commands_changed")] + [Version (replacement = "Navigation.message_new_commands_changed")] + public static Gst.Message navigation_message_new_commands_changed (Gst.Object src); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_new_event")] + [Version (replacement = "Navigation.message_new_event", since = "1.6")] + public static Gst.Message navigation_message_new_event (Gst.Object src, Gst.Event event); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_new_mouse_over")] + [Version (replacement = "Navigation.message_new_mouse_over")] + public static Gst.Message navigation_message_new_mouse_over (Gst.Object src, bool active); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_parse_angles_changed")] + [Version (replacement = "Navigation.message_parse_angles_changed")] + public static bool navigation_message_parse_angles_changed (Gst.Message message, out uint cur_angle, out uint n_angles); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_parse_event")] + [Version (replacement = "Navigation.message_parse_event", since = "1.6")] + public static bool navigation_message_parse_event (Gst.Message message, out Gst.Event event); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_message_parse_mouse_over")] + [Version (replacement = "Navigation.message_parse_mouse_over")] + public static bool navigation_message_parse_mouse_over (Gst.Message message, out bool active); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_get_type")] + [Version (replacement = "Navigation.query_get_type")] + public static Gst.Video.NavigationQueryType navigation_query_get_type (Gst.Query query); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_new_angles")] + [Version (replacement = "Navigation.query_new_angles")] + public static Gst.Query navigation_query_new_angles (); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_new_commands")] + [Version (replacement = "Navigation.query_new_commands")] + public static Gst.Query navigation_query_new_commands (); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_parse_angles")] + [Version (replacement = "Navigation.query_parse_angles")] + public static bool navigation_query_parse_angles (Gst.Query query, out uint cur_angle, out uint n_angles); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_parse_commands_length")] + [Version (replacement = "Navigation.query_parse_commands_length")] + public static bool navigation_query_parse_commands_length (Gst.Query query, out uint n_cmds); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_parse_commands_nth")] + [Version (replacement = "Navigation.query_parse_commands_nth")] + public static bool navigation_query_parse_commands_nth (Gst.Query query, uint nth, out Gst.Video.NavigationCommand cmd); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_set_angles")] + [Version (replacement = "Navigation.query_set_angles")] + public static void navigation_query_set_angles (Gst.Query query, uint cur_angle, uint n_angles); + [CCode (cheader_filename = "gst/video/video.h", cname = "gst_navigation_query_set_commandsv")] + [Version (replacement = "Navigation.query_set_commandsv")] + public static void navigation_query_set_commandsv (Gst.Query query, [CCode (array_length_cname = "n_cmds", array_length_pos = 1.5)] Gst.Video.NavigationCommand[] cmds); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoOrientation.from_tag", since = "1.20")] + public static bool orientation_from_tag (Gst.TagList taglist, out Gst.Video.OrientationMethod method); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type overlay_composition_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoOverlayCompositionMeta.get_info")] + public static unowned Gst.MetaInfo? overlay_composition_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoOverlay.install_properties", since = "1.14")] + public static void overlay_install_properties (GLib.ObjectClass oclass, int last_prop_id); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoOverlay.set_property", since = "1.14")] + public static bool overlay_set_property (GLib.Object object, int last_prop_id, uint property_id, GLib.Value value); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type region_of_interest_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoRegionOfInterestMeta.get_info")] + public static unowned Gst.MetaInfo? region_of_interest_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.22")] + public static GLib.Type sei_user_data_unregistered_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoSEIUserDataUnregisteredMeta.get_info", since = "1.22")] + public static unowned Gst.MetaInfo? sei_user_data_unregistered_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.22")] + public static bool sei_user_data_unregistered_parse_precision_time_stamp (Gst.Video.SEIUserDataUnregisteredMeta user_data, out uint8 status, out uint64 precision_time_stamp); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (since = "1.4")] + public static uint tile_get_index (Gst.Video.TileMode mode, int x, int y, int x_tiles, int y_tiles); + [CCode (cheader_filename = "gst/video/video.h")] + public static GLib.Type time_code_meta_api_get_type (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTimeCodeMeta.get_info")] + public static unowned Gst.MetaInfo? time_code_meta_get_info (); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTransferFunction.decode", since = "1.20")] + public static double transfer_function_decode (Gst.Video.TransferFunction func, double val); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTransferFunction.encode", since = "1.20")] + public static double transfer_function_encode (Gst.Video.TransferFunction func, double val); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTransferFunction.from_iso", since = "1.18")] + public static Gst.Video.TransferFunction transfer_function_from_iso (uint value); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTransferFunction.is_equivalent", since = "1.18")] + public static bool transfer_function_is_equivalent (Gst.Video.TransferFunction from_func, uint from_bpp, Gst.Video.TransferFunction to_func, uint to_bpp); + [CCode (cheader_filename = "gst/video/video.h")] + [Version (replacement = "VideoTransferFunction.to_iso", since = "1.18")] + public static uint transfer_function_to_iso (Gst.Video.TransferFunction func); + } +} diff --git a/main/vapi/libgcrypt.vapi b/main/vapi/libgcrypt.vapi new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/main/vapi/libgcrypt.vapi diff --git a/main/vapi/libomemo-c.vapi b/main/vapi/libomemo-c.vapi new file mode 100644 index 00000000..8a2b17d3 --- /dev/null +++ b/main/vapi/libomemo-c.vapi @@ -0,0 +1,692 @@ +namespace Omemo { + + [CCode (cname = "int", cprefix = "SG_ERR_", cheader_filename = "omemo/signal_protocol.h", has_type_id = false)] + public enum ErrorCode { + [CCode (cname = "SG_SUCCESS")] + SUCCESS, + NOMEM, + INVAL, + UNKNOWN, + DUPLICATE_MESSAGE, + INVALID_KEY, + INVALID_KEY_ID, + INVALID_MAC, + INVALID_MESSAGE, + INVALID_VERSION, + LEGACY_MESSAGE, + NO_SESSION, + STALE_KEY_EXCHANGE, + UNTRUSTED_IDENTITY, + VRF_SIG_VERIF_FAILED, + INVALID_PROTO_BUF, + FP_VERSION_MISMATCH, + FP_IDENT_MISMATCH; + } + + [CCode (cname = "SG_ERR_MINIMUM", cheader_filename = "omemo/signal_protocol.h")] + public const int MIN_ERROR_CODE; + + [CCode (cname = "int", cprefix = "SG_LOG_", cheader_filename = "omemo/signal_protocol.h", has_type_id = false)] + public enum LogLevel { + ERROR, + WARNING, + NOTICE, + INFO, + DEBUG + } + + [CCode (cname = "signal_throw_gerror_by_code_", cheader_filename = "omemo/signal_protocol.h")] + private int throw_by_code(int code, string? message = null) throws GLib.Error { + if (code < 0 && code > MIN_ERROR_CODE) { + throw new GLib.Error(-1, code, "%s: %s", message ?? "libomemo-c error", ((ErrorCode)code).to_string()); + } + return code; + } + + [CCode (cname = "int", cprefix = "SG_CIPHER_", cheader_filename = "omemo/signal_protocol.h", has_type_id = false)] + public enum Cipher { + AES_CTR_NOPADDING, + AES_CBC_PKCS5, + AES_GCM_NOPADDING + } + + [Compact] + [CCode (cname = "signal_type_base", ref_function="signal_type_ref_vapi", unref_function="signal_type_unref_vapi", cheader_filename="omemo/signal_protocol_types.h,src/crypto/omemo/helper.h")] + public class TypeBase { + } + + [Compact] + [CCode (cname = "signal_buffer", cprefix = "signal_buffer_", cheader_filename = "omemo/signal_protocol_types.h", free_function="signal_buffer_free")] + public class Buffer { + [CCode (cname = "signal_buffer_alloc")] + public Buffer(size_t len); + [CCode (cname = "signal_buffer_create")] + public Buffer.from(uint8[] data); + + public Buffer copy(); + public Buffer append(uint8[] data); + public int compare(Buffer other); + + public uint8 get(int i) { return data[i]; } + public void set(int i, uint8 val) { data[i] = val; } + + public uint8[] data { get { int x = (int)len(); unowned uint8[] res = _data(); res.length = x; return res; } } + + [CCode (array_length = false, cname = "signal_buffer_data")] + private unowned uint8[] _data(); + private size_t len(); + } + + [Compact] + [CCode (cname = "signal_int_list", cheader_filename = "omemo/signal_protocol_types.h", free_function="signal_int_list_free")] + public class IntList { + [CCode (cname = "signal_int_list_alloc")] + public IntList(); + [CCode (cname = "signal_int_list_push_back")] + public int add(int value); + public uint size { [CCode (cname = "signal_int_list_size")] get; } + [CCode (cname = "signal_int_list_at")] + public int get(uint index); + } + + [Compact] + [CCode (cname = "session_builder", cprefix = "session_builder_", free_function="session_builder_free", cheader_filename = "omemo/session_builder.h")] + public class SessionBuilder { + [CCode (cname = "session_builder_process_pre_key_bundle")] + private int process_pre_key_bundle_(PreKeyBundle pre_key_bundle); + [CCode (cname = "session_builder_process_pre_key_bundle_")] + public void process_pre_key_bundle(PreKeyBundle pre_key_bundle) throws GLib.Error { + throw_by_code(process_pre_key_bundle_(pre_key_bundle)); + } + public int version { get; set; } + } + + [Compact] + [CCode (cname = "session_pre_key_bundle", cprefix = "session_pre_key_bundle_", cheader_filename = "omemo/session_pre_key.h")] + public class PreKeyBundle : TypeBase { + public static int create(out PreKeyBundle bundle, uint32 registration_id, int device_id, uint32 pre_key_id, ECPublicKey? pre_key_public, + uint32 signed_pre_key_id, ECPublicKey? signed_pre_key_public, uint8[]? signed_pre_key_signature, ECPublicKey? identity_key); + public uint32 registration_id { get; } + public int device_id { get; } + public uint32 pre_key_id { get; } + public ECPublicKey pre_key { owned get; } + public uint32 signed_pre_key_id { get; } + public ECPublicKey signed_pre_key { owned get; } + public Buffer signed_pre_key_signature { owned get; } + public ECPublicKey identity_key { owned get; } + } + + [Compact] + [CCode (cname = "session_pre_key", cprefix = "session_pre_key_", cheader_filename = "omemo/session_pre_key.h,src/crypto/omemo/helper.h")] + public class PreKeyRecord : TypeBase { + public static int create(out PreKeyRecord pre_key, uint32 id, ECKeyPair key_pair); + //public static int deserialize(out PreKeyRecord pre_key, uint8[] data, NativeContext global_context); + [CCode (instance_pos = 2)] + public int serialze(out Buffer buffer); + public uint32 id { get; } + public ECKeyPair key_pair { get; } + } + + [Compact] + [CCode (cname = "session_record", cprefix = "session_record_", cheader_filename = "omemo/signal_protocol_types.h")] + public class SessionRecord : TypeBase { + public SessionState state { get; } + public Buffer user_record { get; } + } + + [Compact] + [CCode (cname = "session_state", cprefix = "session_state_", cheader_filename = "omemo/session_state.h")] + public class SessionState : TypeBase { + //public static int create(out SessionState state, NativeContext context); + //public static int deserialize(out SessionState state, uint8[] data, NativeContext context); + //public static int copy(out SessionState state, SessionState other_state, NativeContext context); + [CCode (instance_pos = 2)] + public int serialze(out Buffer buffer); + + public uint32 session_version { get; set; } + public ECPublicKey local_identity_key { get; set; } + public ECPublicKey remote_identity_key { get; set; } + //public Ratchet.RootKey root_key { get; set; } + public uint32 previous_counter { get; set; } + public ECPublicKey sender_ratchet_key { get; } + public ECKeyPair sender_ratchet_key_pair { get; } + //public Ratchet.ChainKey sender_chain_key { get; set; } + public uint32 remote_registration_id { get; set; } + public uint32 local_registration_id { get; set; } + public int needs_refresh { get; set; } + public ECPublicKey alice_base_key { get; set; } + } + + [Compact] + [CCode (cname = "session_signed_pre_key", cprefix = "session_signed_pre_key_", cheader_filename = "omemo/session_pre_key.h")] + public class SignedPreKeyRecord : TypeBase { + public static int create(out SignedPreKeyRecord pre_key, uint32 id, uint64 timestamp, ECKeyPair key_pair, uint8[] signature, uint8[]? signature_omemo); + [CCode (instance_pos = 2)] + public int serialize(out Buffer buffer); + + public uint32 id { get; } + public uint64 timestamp { get; } + public ECKeyPair key_pair { get; } + public uint8[] signature { [CCode (cname = "session_signed_pre_key_get_signature_")] get { int x = (int)get_signature_len(); unowned uint8[] res = get_signature(); res.length = x; return res; } } + public uint8[] signature_omemo { [CCode (cname = "session_signed_pre_key_get_signature_omemo_")] get { int x = (int)get_signature_omemo_len(); unowned uint8[] res = get_signature_omemo(); res.length = x; return res; } } + + [CCode (array_length = false, cname = "session_signed_pre_key_get_signature")] + private unowned uint8[] get_signature(); + private size_t get_signature_len(); + [CCode (array_length = false, cname = "session_signed_pre_key_get_signature_omemo")] + private unowned uint8[] get_signature_omemo(); + private size_t get_signature_omemo_len(); + } + + /** + * Address of an OMEMO message recipient + */ + [Compact] + [CCode (cname = "signal_protocol_address", cprefix = "signal_protocol_address_", cheader_filename = "omemo/signal_protocol.h,src/crypto/omemo/helper.h")] + public class Address { + public Address(string name, int32 device_id); + public int32 device_id { get; set; } + public string name { owned get; set; } + } + + /** + * A representation of a (group + sender + device) tuple + */ + [Compact] + [CCode (cname = "signal_protocol_sender_key_name")] + public class SenderKeyName { + [CCode (cname = "group_id", array_length_cname="group_id_len")] + private char* group_id_; + private size_t group_id_len; + public Address sender; + } + + [Compact] + [CCode (cname = "ec_public_key", cprefix = "ec_public_key_", cheader_filename = "omemo/curve.h,src/crypto/omemo/helper.h")] + public class ECPublicKey : TypeBase { + [CCode (cname = "curve_generate_public_key")] + public static int generate(out ECPublicKey public_key, ECPrivateKey private_key); + [CCode (instance_pos = 1, cname = "ec_public_key_serialize")] + private int serialize_([CCode (pos = 0)] out Buffer buffer); + [CCode (cname = "ec_public_key_serialize_")] + public uint8[] serialize() { + Buffer buffer; + int code = serialize_(out buffer); + if (code < 0 && code > MIN_ERROR_CODE) { + // Can only throw for invalid arguments or out of memory. + GLib.assert_not_reached(); + } + return buffer.data; + } + [CCode (instance_pos = 1, cname = "ec_public_key_serialize_omemo")] + private int serialize_omemo_([CCode (pos = 0)] out Buffer buffer); + [CCode (cname = "ec_public_key_serialize_omemo_")] + public uint8[] serialize_omemo() { + Buffer buffer; + int code = serialize_omemo_(out buffer); + if (code < 0 && code > MIN_ERROR_CODE) { + // Can only throw for invalid arguments or out of memory. + GLib.assert_not_reached(); + } + return buffer.data; + } + public Buffer ed { owned get; } + public Buffer mont { owned get; } + public int compare(ECPublicKey other); + public int memcmp(ECPublicKey other); + } + + [Compact] + [CCode (cname = "ec_private_key", cprefix = "ec_private_key_", cheader_filename = "omemo/curve.h,src/crypto/omemo/helper.h")] + public class ECPrivateKey : TypeBase { + [CCode (instance_pos = 1, cname = "ec_private_key_serialize")] + private int serialize_([CCode (pos = 0)] out Buffer buffer); + [CCode (cname = "ec_private_key_serialize_")] + public uint8[] serialize() throws GLib.Error { + Buffer buffer; + int code = serialize_(out buffer); + if (code < 0 && code > MIN_ERROR_CODE) { + // Can only throw for invalid arguments or out of memory. + GLib.assert_not_reached(); + } + return buffer.data; + } + public int compare(ECPublicKey other); + } + + [Compact] + [CCode (cname = "ec_key_pair", cprefix="ec_key_pair_", cheader_filename = "omemo/curve.h,src/crypto/omemo/helper.h")] + public class ECKeyPair : TypeBase { + public static int create(out ECKeyPair key_pair, ECPublicKey public_key, ECPrivateKey private_key); + public ECPublicKey public { get; } + public ECPrivateKey private { get; } + } + + [CCode (cname = "ratchet_message_keys", cheader_filename = "omemo/ratchet.h")] + public class MessageKeys { + } + + [Compact] + [CCode (cname = "ratchet_identity_key_pair", cprefix = "ratchet_identity_key_pair_", cheader_filename = "omemo/ratchet.h,src/crypto/omemo/helper.h")] + public class IdentityKeyPair : TypeBase { + public static int create(out IdentityKeyPair key_pair, ECPublicKey public_key, ECPrivateKey private_key); + public int serialze(out Buffer buffer); + public ECPublicKey public { get; } + public ECPrivateKey private { get; } + } + + [Compact] + [CCode (cname = "ec_public_key_list")] + public class PublicKeyList {} + + /** + * The main entry point for OMEMO encrypt/decrypt operations. + * + * Once a session has been established with session_builder, + * this class can be used for all encrypt/decrypt operations within + * that session. + */ + [Compact] + [CCode (cname = "session_cipher", cprefix = "session_cipher_", cheader_filename = "omemo/session_cipher.h", free_function = "session_cipher_free")] + public class SessionCipher { + public void* user_data { get; set; } + public DecryptionCallback decryption_callback { set; } + [CCode (cname = "session_cipher_encrypt")] + private int encrypt_(uint8[] padded_message, out CiphertextMessage encrypted_message); + [CCode (cname = "session_cipher_encrypt_")] + public CiphertextMessage encrypt(uint8[] padded_message) throws GLib.Error { + CiphertextMessage res; + throw_by_code(encrypt_(padded_message, out res)); + return res; + } + [CCode (cname = "session_cipher_decrypt_pre_key_signal_message")] + private int decrypt_pre_key_message_(PreKeyOmemoMessage ciphertext, void* decrypt_context, out Buffer plaintext); + [CCode (cname = "session_cipher_decrypt_pre_key_signal_message_")] + public uint8[] decrypt_pre_key_message(PreKeyOmemoMessage ciphertext, void* decrypt_context = null) throws GLib.Error { + Buffer res; + throw_by_code(decrypt_pre_key_message_(ciphertext, decrypt_context, out res)); + return res.data; + } + [CCode (cname = "session_cipher_decrypt_signal_message")] + private int decrypt_message_(OmemoMessage ciphertext, void* decrypt_context, out Buffer plaintext); + [CCode (cname = "session_cipher_decrypt_signal_message_")] + public uint8[] decrypt_message(OmemoMessage ciphertext, void* decrypt_context = null) throws GLib.Error { + Buffer res; + throw_by_code(decrypt_message_(ciphertext, decrypt_context, out res)); + return res.data; + } + public int get_remote_registration_id(out uint32 remote_id); + [CCode (cname = "session_cipher_get_session_version")] + private int get_session_version_(out uint32 version); + [CCode (cname = "session_cipher_get_session_version_")] + public uint32 get_session_version() throws GLib.Error { + uint32 res; + throw_by_code(get_session_version_(out res)); + return res; + } + public uint32 version { get; set; } + + [CCode (has_target = false)] + public delegate int DecryptionCallback(SessionCipher cipher, Buffer plaintext, void* decrypt_context); + } + + [CCode (cname = "int", cheader_filename = "omemo/protocol.h", has_type_id = false)] + public enum CiphertextType { + [CCode (cname = "CIPHERTEXT_SIGNAL_TYPE")] + SIGNAL, + [CCode (cname = "CIPHERTEXT_PREKEY_TYPE")] + PREKEY, + [CCode (cname = "CIPHERTEXT_SENDERKEY_TYPE")] + SENDERKEY, + [CCode (cname = "CIPHERTEXT_SENDERKEY_DISTRIBUTION_TYPE")] + SENDERKEY_DISTRIBUTION + } + + [Compact] + [CCode (cname = "ciphertext_message", cprefix = "ciphertext_message_", cheader_filename = "omemo/protocol.h,src/crypto/omemo/helper.h")] + public abstract class CiphertextMessage : TypeBase { + public CiphertextType type { get; } + [CCode (cname = "ciphertext_message_get_serialized")] + private unowned Buffer get_serialized_(); + public uint8[] serialized { [CCode (cname = "ciphertext_message_get_serialized_")] get { + return get_serialized_().data; + }} + } + [Compact] + [CCode (cname = "signal_message", cprefix = "signal_message_", cheader_filename = "omemo/protocol.h,src/crypto/omemo/helper.h")] + public class OmemoMessage : CiphertextMessage { + public ECPublicKey sender_ratchet_key { get; } + public uint8 message_version { get; } + public uint32 counter { get; } + public Buffer body { get; } + //public int verify_mac(uint8 message_version, ECPublicKey sender_identity_key, ECPublicKey receiver_identity_key, uint8[] mac, NativeContext global_context); + public static int is_legacy(uint8[] data); + } + [Compact] + [CCode (cname = "pre_key_signal_message", cprefix = "pre_key_signal_message_", cheader_filename = "omemo/protocol.h,src/crypto/omemo/helper.h")] + public class PreKeyOmemoMessage : CiphertextMessage { + public uint8 message_version { get; } + public ECPublicKey identity_key { get; } + public uint32 registration_id { get; } + public uint32 pre_key_id { get; } + public uint32 signed_pre_key_id { get; } + public ECPublicKey base_key { get; } + public OmemoMessage message { get; } + } + [Compact] + [CCode (cname = "sender_key_message", cprefix = "sender_key_message_", cheader_filename = "omemo/protocol.h,src/crypto/omemo/helper.h")] + public class SenderKeyMessage : CiphertextMessage { + public uint32 key_id { get; } + public uint32 iteration { get; } + public Buffer ciphertext { get; } + } + [Compact] + [CCode (cname = "sender_key_distribution_message", cprefix = "sender_key_distribution_message_", cheader_filename = "omemo/protocol.h,src/crypto/omemo/helper.h")] + public class SenderKeyDistributionMessage : CiphertextMessage { + public uint32 id { get; } + public uint32 iteration { get; } + public Buffer chain_key { get; } + public ECPublicKey signature_key { get; } + } + + [CCode (cname = "signal_vala_encrypt", cheader_filename = "src/crypto/omemo/helper.h")] + private static int aes_encrypt_(out Buffer output, int cipher, uint8[] key, uint8[] iv, uint8[] plaintext, void *user_data); + + [CCode (cname = "signal_vala_encrypt_")] + public uint8[] aes_encrypt(int cipher, uint8[] key, uint8[] iv, uint8[] plaintext) throws GLib.Error { + Buffer buf; + throw_by_code(aes_encrypt_(out buf, cipher, key, iv, plaintext, null)); + return buf.data; + } + + [CCode (cname = "signal_vala_decrypt", cheader_filename = "src/crypto/omemo/helper.h")] + private static int aes_decrypt_(out Buffer output, int cipher, uint8[] key, uint8[] iv, uint8[] ciphertext, void *user_data); + + [CCode (cname = "signal_vala_decrypt_")] + public uint8[] aes_decrypt(int cipher, uint8[] key, uint8[] iv, uint8[] ciphertext) throws GLib.Error { + Buffer buf; + throw_by_code(aes_decrypt_(out buf, cipher, key, iv, ciphertext, null)); + return buf.data; + } + + [Compact] + [CCode (cname = "signal_context", cprefix="signal_context_", free_function="signal_context_destroy", cheader_filename = "omemo/signal_protocol.h")] + public class NativeContext { + public static int create(out NativeContext context, void* user_data); + public int set_crypto_provider(NativeCryptoProvider crypto_provider); + public int set_locking_functions(LockingFunc lock, LockingFunc unlock); + public int set_log_function(LogFunc log); + } + [CCode (has_target = false)] + public delegate void LockingFunc(void* user_data); + [CCode (has_target = false)] + public delegate void LogFunc(LogLevel level, string message, size_t len, void* user_data); + + [Compact] + [CCode (cname = "signal_crypto_provider", cheader_filename = "omemo/signal_protocol.h")] + public struct NativeCryptoProvider { + public RandomFunc random_func; + public HmacSha256Init hmac_sha256_init_func; + public HmacSha256Update hmac_sha256_update_func; + public HmacSha256Final hmac_sha256_final_func; + public HmacSha256Cleanup hmac_sha256_cleanup_func; + public Sha512DigestInit sha512_digest_init_func; + public Sha512DigestUpdate sha512_digest_update_func; + public Sha512DigestFinal sha512_digest_final_func; + public Sha512DigestCleanup sha512_digest_cleanup_func; + public CryptFunc encrypt_func; + public CryptFunc decrypt_func; + public void* user_data; + } + [CCode (has_target = false)] + public delegate int RandomFunc(uint8[] data, void* user_data); + [CCode (has_target = false)] + public delegate int HmacSha256Init(out void* hmac_context, uint8[] key, void* user_data); + [CCode (has_target = false)] + public delegate int HmacSha256Update(void* hmac_context, uint8[] data, void* user_data); + [CCode (has_target = false)] + public delegate int HmacSha256Final(void* hmac_context, out Buffer buffer, void* user_data); + [CCode (has_target = false)] + public delegate int HmacSha256Cleanup(void* hmac_context, void* user_data); + [CCode (has_target = false)] + public delegate int Sha512DigestInit(out void* digest_context, void* user_data); + [CCode (has_target = false)] + public delegate int Sha512DigestUpdate(void* digest_context, uint8[] data, void* user_data); + [CCode (has_target = false)] + public delegate int Sha512DigestFinal(void* digest_context, out Buffer buffer, void* user_data); + [CCode (has_target = false)] + public delegate int Sha512DigestCleanup(void* digest_context, void* user_data); + [CCode (has_target = false)] + public delegate int CryptFunc(out Buffer output, Cipher cipher, uint8[] key, uint8[] iv, uint8[] content, void* user_data); + + [Compact] + [CCode (cname = "signal_protocol_session_store", cheader_filename = "omemo/signal_protocol.h")] + public struct NativeSessionStore { + public LoadSessionFunc load_session_func; + public GetSubDeviceSessionsFunc get_sub_device_sessions_func; + public StoreSessionFunc store_session_func; + public ContainsSessionFunc contains_session_func; + public DeleteSessionFunc delete_session_func; + public DeleteAllSessionsFunc delete_all_sessions_func; + public DestroyFunc destroy_func; + public void* user_data; + } + [CCode (has_target = false)] + public delegate int LoadSessionFunc(out Buffer record, out Buffer user_record, [CCode (type = "const signal_protocol_address *")] Address address, void* user_data); + [CCode (has_target = false)] + public delegate int GetSubDeviceSessionsFunc(out IntList sessions, [CCode (array_length_type = "size_t", type = "const char *")] char[] name, void* user_data); + [CCode (has_target = false)] + public delegate int StoreSessionFunc([CCode (type = "const signal_protocol_address *")] Address address, [CCode (array_length_type = "size_t")] uint8[] record, [CCode (array_length_type = "size_t")] uint8[] user_record, void* user_data); + [CCode (has_target = false)] + public delegate int ContainsSessionFunc([CCode (type = "const signal_protocol_address *")] Address address, void* user_data); + [CCode (has_target = false)] + public delegate int DeleteSessionFunc([CCode (type = "const signal_protocol_address *")] Address address, void* user_data); + [CCode (has_target = false)] + public delegate int DeleteAllSessionsFunc([CCode (array_length_type = "size_t", type = "const char *")] char[] name, void* user_data); + + [Compact] + [CCode (cname = "signal_protocol_identity_key_store", cheader_filename = "omemo/signal_protocol.h")] + public struct NativeIdentityKeyStore { + GetIdentityKeyPairFunc get_identity_key_pair; + GetLocalRegistrationIdFunc get_local_registration_id; + SaveIdentityFunc save_identity; + IsTrustedIdentityFunc is_trusted_identity; + DestroyFunc destroy_func; + void* user_data; + } + [CCode (has_target = false)] + public delegate int GetIdentityKeyPairFunc(out Buffer public_data, out Buffer private_data, void* user_data); + [CCode (has_target = false)] + public delegate int GetLocalRegistrationIdFunc(void* user_data, out uint32 registration_id); + [CCode (has_target = false)] + public delegate int SaveIdentityFunc([CCode (type = "const signal_protocol_address *")] Address address, [CCode (array_length_type = "size_t")] uint8[] key, void* user_data); + [CCode (has_target = false)] + public delegate int IsTrustedIdentityFunc([CCode (type = "const signal_protocol_address *")] Address address, [CCode (array_length_type = "size_t")] uint8[] key, void* user_data); + + [Compact] + [CCode (cname = "signal_protocol_pre_key_store", cheader_filename = "omemo/signal_protocol.h")] + public struct NativePreKeyStore { + LoadPreKeyFunc load_pre_key; + StorePreKeyFunc store_pre_key; + ContainsPreKeyFunc contains_pre_key; + RemovePreKeyFunc remove_pre_key; + DestroyFunc destroy_func; + void* user_data; + } + [CCode (has_target = false)] + public delegate int LoadPreKeyFunc(out Buffer record, uint32 pre_key_id, void* user_data); + [CCode (has_target = false)] + public delegate int StorePreKeyFunc(uint32 pre_key_id, [CCode (array_length_type = "size_t")] uint8[] record, void* user_data); + [CCode (has_target = false)] + public delegate int ContainsPreKeyFunc(uint32 pre_key_id, void* user_data); + [CCode (has_target = false)] + public delegate int RemovePreKeyFunc(uint32 pre_key_id, void* user_data); + + + [Compact] + [CCode (cname = "signal_protocol_signed_pre_key_store", cheader_filename = "omemo/signal_protocol.h")] + public struct NativeSignedPreKeyStore { + LoadPreKeyFunc load_signed_pre_key; + StorePreKeyFunc store_signed_pre_key; + ContainsPreKeyFunc contains_signed_pre_key; + RemovePreKeyFunc remove_signed_pre_key; + DestroyFunc destroy_func; + void* user_data; + } + + + [Compact] + [CCode (cname = "signal_protocol_sender_key_store")] + public struct NativeSenderKeyStore { + StoreSenderKeyFunc store_sender_key; + LoadSenderKeyFunc load_sender_key; + DestroyFunc destroy_func; + void* user_data; + } + [CCode (has_target = false)] + public delegate int StoreSenderKeyFunc(SenderKeyName sender_key_name, [CCode (array_length_type = "size_t")] uint8[] record, [CCode (array_length_type = "size_t")] uint8[] user_record, void* user_data); + [CCode (has_target = false)] + public delegate int LoadSenderKeyFunc(out Buffer record, out Buffer user_record, SenderKeyName sender_key_name, void* user_data); + + [CCode (has_target = false)] + public delegate void DestroyFunc(void* user_data); + + [Compact] + [CCode (cname = "signal_protocol_store_context", cprefix = "signal_protocol_store_context_", free_function="signal_protocol_store_context_destroy", cheader_filename = "omemo/signal_protocol.h")] + public class NativeStoreContext { + public static int create(out NativeStoreContext context, NativeContext global_context); + public int set_session_store(NativeSessionStore store); + public int set_pre_key_store(NativePreKeyStore store); + public int set_signed_pre_key_store(NativeSignedPreKeyStore store); + public int set_identity_key_store(NativeIdentityKeyStore store); + public int set_sender_key_store(NativeSenderKeyStore store); + } + + + [CCode (cheader_filename = "omemo/signal_protocol.h")] + namespace Protocol { + + /** + * Interface to the pre-key store. + * These functions will use the callbacks in the provided + * signal_protocol_store_context instance and operate in terms of higher level + * library data structures. + */ + [CCode (lower_case_cprefix = "signal_protocol_pre_key_")] + namespace PreKey { + public int load_key(NativeStoreContext context, out PreKeyRecord pre_key, uint32 pre_key_id); + public int store_key(NativeStoreContext context, PreKeyRecord pre_key); + public int contains_key(NativeStoreContext context, uint32 pre_key_id); + public int remove_key(NativeStoreContext context, uint32 pre_key_id); + } + + [CCode (lower_case_cprefix = "signal_protocol_signed_pre_key_")] + namespace SignedPreKey { + public int load_key(NativeStoreContext context, out SignedPreKeyRecord pre_key, uint32 pre_key_id); + public int store_key(NativeStoreContext context, SignedPreKeyRecord pre_key); + public int contains_key(NativeStoreContext context, uint32 pre_key_id); + public int remove_key(NativeStoreContext context, uint32 pre_key_id); + } + + /** + * Interface to the session store. + * These functions will use the callbacks in the provided + * signal_protocol_store_context instance and operate in terms of higher level + * library data structures. + */ + [CCode (lower_case_cprefix = "signal_protocol_session_")] + namespace Session { + public int load_session(NativeStoreContext context, out SessionRecord record, Address address, int32 version = 3); + public int get_sub_device_sessions(NativeStoreContext context, out IntList sessions, char[] name); + public int store_session(NativeStoreContext context, Address address, SessionRecord record); + public int contains_session(NativeStoreContext context, Address address); + public int delete_session(NativeStoreContext context, Address address); + public int delete_all_sessions(NativeStoreContext context, char[] name); + } + + [CCode (lower_case_cprefix = "signal_protocol_identity_")] + namespace Identity { + public int get_key_pair(NativeStoreContext store_context, out IdentityKeyPair key_pair); + public int get_local_registration_id(NativeStoreContext store_context, out uint32 registration_id); + public int save_identity(NativeStoreContext store_context, Address address, ECPublicKey identity_key); + public int is_trusted_identity(NativeStoreContext store_context, Address address, ECPublicKey identity_key); + } + + [CCode (cheader_filename = "omemo/key_helper.h", lower_case_cprefix = "signal_protocol_key_helper_")] + namespace KeyHelper { + [Compact] + [CCode (cname = "signal_protocol_key_helper_pre_key_list_node", cprefix = "signal_protocol_key_helper_key_list_", free_function="signal_protocol_key_helper_key_list_free")] + public class PreKeyListNode { + public PreKeyRecord element(); + public PreKeyListNode next(); + } + + public int generate_identity_key_pair(out IdentityKeyPair key_pair, NativeContext global_context); + public int generate_registration_id(out int32 registration_id, int extended_range, NativeContext global_context); + public int get_random_sequence(out int value, int max, NativeContext global_context); + public int generate_pre_keys(out PreKeyListNode head, uint start, uint count, NativeContext global_context); + public int generate_last_resort_pre_key(out PreKeyRecord pre_key, NativeContext global_context); + public int generate_signed_pre_key(out SignedPreKeyRecord signed_pre_key, IdentityKeyPair identity_key_pair, uint32 signed_pre_key_id, uint64 timestamp, NativeContext global_context); + public int upgrade_signed_pre_key(ref SignedPreKeyRecord signed_pre_key, IdentityKeyPair identity_key_pair, NativeContext global_context); + public int generate_sender_signing_key(out ECKeyPair key_pair, NativeContext global_context); + public int generate_sender_key(out Buffer key_buffer, NativeContext global_context); + public int generate_sender_key_id(out int32 key_id, NativeContext global_context); + } + } + + [CCode (cheader_filename = "omemo/curve.h")] + namespace Curve { + [CCode (cname = "curve_calculate_agreement")] + public int calculate_agreement([CCode (array_length = false)] out uint8[] shared_key_data, ECPublicKey public_key, ECPrivateKey private_key); + [CCode (cname = "curve_calculate_signature")] + public int calculate_signature(NativeContext context, out Buffer signature, ECPrivateKey signing_key, uint8[] message); + [CCode (cname = "curve_verify_signature")] + public int verify_signature(ECPublicKey signing_key, uint8[] message, uint8[] signature); + } + + [CCode (cname = "session_builder_create", cheader_filename = "omemo/session_builder.h")] + public static int session_builder_create(out SessionBuilder builder, NativeStoreContext store, Address remote_address, NativeContext global_context); + [CCode (cname = "session_cipher_create", cheader_filename = "omemo/session_cipher.h")] + public static int session_cipher_create(out SessionCipher cipher, NativeStoreContext store, Address remote_address, NativeContext global_context); + [CCode (cname = "pre_key_signal_message_deserialize", cheader_filename = "omemo/protocol.h")] + public static int pre_key_message_deserialize(out PreKeyOmemoMessage message, uint8[] data, NativeContext global_context); + [CCode (cname = "pre_key_signal_message_deserialize_omemo", cheader_filename = "omemo/protocol.h")] + public static int pre_key_message_deserialize_omemo(out PreKeyOmemoMessage message, uint8[] data, uint32 remote_registration_id, NativeContext global_context); + [CCode (cname = "pre_key_signal_message_copy", cheader_filename = "omemo/protocol.h")] + public static int pre_key_message_copy(out PreKeyOmemoMessage message, PreKeyOmemoMessage other_message, NativeContext global_context); + [CCode (cname = "signal_message_create", cheader_filename = "omemo/protocol.h")] + public static int message_create(out OmemoMessage message, uint8 message_version, uint8[] mac_key, ECPublicKey sender_ratchet_key, uint32 counter, uint32 previous_counter, uint8[] ciphertext, ECPublicKey sender_identity_key, ECPublicKey receiver_identity_key, NativeContext global_context); + [CCode (cname = "signal_message_deserialize", cheader_filename = "omemo/protocol.h")] + public static int message_deserialize(out OmemoMessage message, uint8[] data, NativeContext global_context); + [CCode (cname = "signal_message_deserialize_omemo", cheader_filename = "omemo/protocol.h")] + public static int message_deserialize_omemo(out OmemoMessage message, uint8[] data, NativeContext global_context); + [CCode (cname = "signal_message_copy", cheader_filename = "omemo/protocol.h")] + public static int message_copy(out OmemoMessage message, OmemoMessage other_message, NativeContext global_context); + [CCode (cname = "curve_generate_key_pair", cheader_filename = "omemo/curve.h")] + public static int curve_generate_key_pair(NativeContext context, out ECKeyPair key_pair); + [CCode (cname = "curve_decode_private_point", cheader_filename = "omemo/curve.h")] + public static int curve_decode_private_point(out ECPrivateKey public_key, uint8[] key, NativeContext global_context); + [CCode (cname = "curve_decode_point", cheader_filename = "omemo/curve.h")] + public static int curve_decode_point(out ECPublicKey public_key, uint8[] key, NativeContext global_context); + [CCode (cname = "curve_decode_point_ed", cheader_filename = "omemo/curve.h")] + public static int curve_decode_point_ed(out ECPublicKey public_key, uint8[] key, NativeContext global_context); + [CCode (cname = "curve_decode_point_mont", cheader_filename = "omemo/curve.h")] + public static int curve_decode_point_mont(out ECPublicKey public_key, uint8[] key, NativeContext global_context); + [CCode (cname = "curve_generate_private_key", cheader_filename = "omemo/curve.h")] + public static int curve_generate_private_key(NativeContext context, out ECPrivateKey private_key); + [CCode (cname = "ratchet_identity_key_pair_deserialize", cheader_filename = "omemo/ratchet.h")] + public static int ratchet_identity_key_pair_deserialize(out IdentityKeyPair key_pair, uint8[] data, NativeContext global_context); + [CCode (cname = "session_signed_pre_key_deserialize", cheader_filename = "omemo/signed_pre_key.h")] + public static int session_signed_pre_key_deserialize(out SignedPreKeyRecord pre_key, uint8[] data, NativeContext global_context); + + [Compact] + [CCode (cname = "hkdf_context", cprefix = "hkdf_", free_function = "hkdf_destroy", cheader_filename = "omemo/hkdf.h")] + public class NativeHkdfContext { + public static int create(out NativeHkdfContext context, int message_version, NativeContext global_context); + public int compare(NativeHkdfContext other); + public ssize_t derive_secrets([CCode (array_length = false)] out uint8[] output, uint8[] input_key_material, uint8[] salt, uint8[] info, size_t output_len); + } + + [CCode (cname = "setup_signal_vala_crypto_provider", cheader_filename = "src/crypto/omemo/helper.h")] + public static void setup_crypto_provider(NativeContext context); +} diff --git a/main/vapi/libqrencode.vapi b/main/vapi/libqrencode.vapi new file mode 100644 index 00000000..360f74a5 --- /dev/null +++ b/main/vapi/libqrencode.vapi @@ -0,0 +1,81 @@ +[CCode (cheader_filename = "qrencode.h")] +namespace Qrencode { + + [CCode (cname = "QRecLevel", cprefix = "QR_ECLEVEL_")] + public enum ECLevel { + L, + M, + Q, + H + } + + [CCode (cname = "QRencodeMode", cprefix = "QR_MODE_")] + public enum EncodeMode { + NUL, + NUM, + AN, + [CCode (cname = "QR_MODE_8")] + EIGHT_BIT, + KANJI, + STRUCTURE, + ECI, + FNC1FIRST, + FNC1SECOND + } + + [CCode (cname = "QRcode", free_function = "QRcode_free", has_type_id = false)] + [Compact] + public class QRcode { + private int version; + private int width; + [CCode (array_length = false)] + private uint8[] data; + + [CCode (cname = "QRcode_encodeString")] + public QRcode (string str, int version = 0, ECLevel level = ECLevel.L, EncodeMode hint = EncodeMode.EIGHT_BIT, bool casesensitive = true); + + public Gdk.Paintable to_paintable(int module_size) { + GLib.assert(module_size > 0); + var dst_width = width*module_size; + var dst_data = new uint8[dst_width*dst_width*3]; + expand_and_upsample(data,width,width, dst_data,dst_width,dst_width); + return new Gdk.MemoryTexture(dst_width, dst_width, Gdk.MemoryFormat.R8G8B8, + new GLib.Bytes.take((owned) dst_data), dst_width*3); + + } + + /** Does 2D nearest-neighbor upsampling of an array of single-byte + * samples, while expanding the least significant bit of each sample + * to three 0-or-255 bytes. + */ + private void expand_and_upsample( + uint8[] src, uint src_w, uint src_h, + uint8[] dst, uint dst_w, uint dst_h) { + GLib.assert(dst_w % src_w == 0); + GLib.assert(dst_h % src_h == 0); + var scale_x = dst_w/src_w, + scale_y = dst_h/src_h; + /* Doing the iteration in the order of destination samples for + * improved cache-friendliness (dst is 48 times larger than src in + * the typical case of scaling by 4x4). + * The choice of multiple nested loops over a single one is for + * avoiding a ton of divisions by non-constants. + */ + for (uint src_y = 0; src_y < src_h; ++src_y) { + for (uint repeat_y = 0; repeat_y < scale_y; ++repeat_y) { + var dst_y = src_y*scale_y + repeat_y; + for (uint src_x = 0; src_x < src_w; ++src_x) { + uint8 value = (src[src_y*src_w + src_x] & 1)==1 ? 0:255; + for (uint repeat_x = 0; repeat_x < scale_x; ++repeat_x){ + var dst_x = src_x*scale_x + repeat_x; + var dst_idx = dst_y*dst_w + dst_x; + dst[dst_idx*3+0] = value; + dst[dst_idx*3+1] = value; + dst[dst_idx*3+2] = value; + } + } + } + } + } + } +} diff --git a/main/vapi/webrtc-audio-processing.vapi b/main/vapi/webrtc-audio-processing.vapi new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/main/vapi/webrtc-audio-processing.vapi |
